fix(rbac-policy): add rolebindings for non-explicit namespaces [C9S-325] (#3236)

This commit is contained in:
bernard-portainer
2026-07-23 15:26:24 +12:00
committed by GitHub
parent 4c5ec443c6
commit 8d7d2a1c2b
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -27,6 +27,10 @@ type InstallOptions struct {
KubernetesClusterAccess *KubernetesClusterAccess KubernetesClusterAccess *KubernetesClusterAccess
TakeOwnership bool TakeOwnership bool
CreateNamespace bool CreateNamespace bool
// MaxHistory caps the number of old revisions Helm keeps for this release
// on upgrade (0, the zero value, means unlimited history, matching Helm's
// own default).
MaxHistory int
// GitOps related options // GitOps related options
AutoUpdate *portainer.AutoUpdateSettings AutoUpdate *portainer.AutoUpdateSettings
+1
View File
@@ -189,6 +189,7 @@ func initUpgradeClient(actionConfig *action.Configuration, upgradeOpts options.I
upgradeClient.WaitStrategy = kube.HookOnlyStrategy upgradeClient.WaitStrategy = kube.HookOnlyStrategy
} }
upgradeClient.TakeOwnership = upgradeOpts.TakeOwnership // Equivalent to --take-ownership flag upgradeClient.TakeOwnership = upgradeOpts.TakeOwnership // Equivalent to --take-ownership flag
upgradeClient.MaxHistory = upgradeOpts.MaxHistory
err := configureChartPathOptions(&upgradeClient.ChartPathOptions, upgradeOpts.Version, upgradeOpts.Repo, upgradeOpts.Registry) err := configureChartPathOptions(&upgradeClient.ChartPathOptions, upgradeOpts.Version, upgradeOpts.Repo, upgradeOpts.Registry)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "failed to configure chart path options for helm release upgrade") return nil, errors.Wrap(err, "failed to configure chart path options for helm release upgrade")