Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametrize cluster role name #1141

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions helm/sealed-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,18 @@ The command removes all the Kubernetes components associated with the chart and

### Other Parameters

| Name | Description | Value |
| --------------------------------------------- | ------------------------------------------------------------- | ------- |
| `serviceAccount.annotations` | Annotations for Sealed Secret service account | `{}` |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `serviceAccount.labels` | Extra labels to be added to the ServiceAccount | `{}` |
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `serviceAccount.automountServiceAccountToken` | Specifies, whether to mount the service account API-token | `true` |
| `rbac.create` | Specifies whether RBAC resources should be created | `true` |
| `rbac.clusterRole` | Specifies whether the Cluster Role resource should be created | `true` |
| `rbac.labels` | Extra labels to be added to RBAC resources | `{}` |
| `rbac.pspEnabled` | PodSecurityPolicy | `false` |
| Name | Description | Value |
| --------------------------------------------- | ------------------------------------------------------------- | ------------------ |
| `serviceAccount.annotations` | Annotations for Sealed Secret service account | `{}` |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `serviceAccount.labels` | Extra labels to be added to the ServiceAccount | `{}` |
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `serviceAccount.automountServiceAccountToken` | Specifies, whether to mount the service account API-token | `true` |
| `rbac.create` | Specifies whether RBAC resources should be created | `true` |
| `rbac.clusterRole` | Specifies whether the Cluster Role resource should be created | `true` |
| `rbac.clusterRoleName` | Specifies the name for the Cluster Role resource | `secrets-unsealer` |
| `rbac.labels` | Extra labels to be added to RBAC resources | `{}` |
| `rbac.pspEnabled` | PodSecurityPolicy | `false` |

### Metrics parameters

Expand Down
2 changes: 1 addition & 1 deletion helm/sealed-secrets/templates/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: secrets-unsealer
name: {{ .Values.rbac.clusterRoleName }}
subjects:
- apiGroup: ""
kind: ServiceAccount
Expand Down
2 changes: 1 addition & 1 deletion helm/sealed-secrets/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: secrets-unsealer
name: {{ .Values.rbac.clusterRoleName }}
labels: {{- include "sealed-secrets.labels" . | nindent 4 }}
{{- if .Values.rbac.labels }}
{{- include "sealed-secrets.render" ( dict "value" .Values.rbac.labels "context" $) | nindent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions helm/sealed-secrets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ rbac:
## @param rbac.clusterRole Specifies whether the Cluster Role resource should be created
##
clusterRole: true
## @param rbac.clusterRoleName Specifies the name for the Cluster Role resource
##
clusterRoleName: "secrets-unsealer"
## @param rbac.labels Extra labels to be added to RBAC resources
##
labels: {}
Expand Down