Skip to content

Commit 87365ef

Browse files
committed
feat(helm): new value to opt-out from cluster-wide view access to secrets
1 parent a917763 commit 87365ef

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

charts/gitops-server/templates/role.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ rules:
1515
{{- with .Values.rbac.impersonationResourceNames }}
1616
resourceNames: {{ . | toJson }}
1717
{{- end }}
18+
{{- if .Values.rbac.viewSecretsEnabled }}
1819
# Access to enterprise entitlement
1920
- apiGroups: [""]
2021
resources: [ "secrets" ]
@@ -26,6 +27,7 @@ rules:
2627
{{- with (or .Values.rbac.viewSecretsResourceNames .Values.rbac.viewSecrets) }}
2728
resourceNames: {{ . | toJson }}
2829
{{- end }}
30+
{{- end }}
2931

3032
# The service account needs to read namespaces to know where it can query
3133
- apiGroups: [ "" ]

charts/gitops-server/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ rbac:
6363
impersonationResourceNames: []
6464
# -- Limit the type of principal that can be impersonated
6565
impersonationResources: ["users", "groups"]
66+
# -- Specifies whether the service account should have cluster-wide view access to secrets.
67+
# If enabled, the secrets permitted to read can be limited by name with `viewSecretsResourceNames`.
68+
viewSecretsEnabled: true
6669
# -- If non-empty, this limits the secrets that can be accessed by
6770
# the service account to the specified ones, e.g. `['weave-gitops-enterprise-credentials']`
6871
viewSecretsResourceNames: ["cluster-user-auth", "oidc-auth"]

0 commit comments

Comments
 (0)