Skip to content

Commit

Permalink
Only enable Rollouts when enabled in Helm chart.
Browse files Browse the repository at this point in the history
This prevents a permission issue in case Rollouts is available on a cluster, but the user does not have permission to use it (e.g. as a tenant on a cluster without cluster admin rights), and therefore also may not set permissions for it.

See issue stakater#231.
  • Loading branch information
sfynx committed Jun 16, 2021
1 parent 0e6ec1d commit 2e2fd2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rules:
- update
- patch
{{- end }}
{{- if or (.Capabilities.APIVersions.Has "argoproj.io/v1alpha1") (.Values.reloader.isArgoRollouts) }}
{{- if and (.Capabilities.APIVersions.Has "argoproj.io/v1alpha1") (.Values.reloader.isArgoRollouts) }}
- apiGroups:
- "argoproj.io"
- ""
Expand Down
2 changes: 1 addition & 1 deletion deployments/kubernetes/chart/reloader/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rules:
- update
- patch
{{- end }}
{{- if or (.Capabilities.APIVersions.Has "argoproj.io/v1alpha1") (.Values.reloader.isArgoRollouts) }}
{{- if and (.Capabilities.APIVersions.Has "argoproj.io/v1alpha1") (.Values.reloader.isArgoRollouts) }}
- apiGroups:
- "argoproj.io"
- ""
Expand Down

0 comments on commit 2e2fd2a

Please sign in to comment.