Skip to content

Commit

Permalink
feat: add optional automountServiceAccountToken to webhook
Browse files Browse the repository at this point in the history
Signed-off-by: falcorocks <[email protected]>
  • Loading branch information
falcorocks committed Feb 14, 2025
1 parent 54b3961 commit 71ca3a5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/policy-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ helm uninstall [RELEASE_NAME]
| loglevel | string | `"info"` | |
| serviceMonitor.enabled | bool | `false` | |
| webhook.affinity | object | `{}` | |
| webhook.automountServiceAccountToken | bool | `true` | |
| webhook.configData | object | `{}` | |
| webhook.customLabels | object | `{}` | |
| webhook.env | object | `{}` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ spec:
tolerations:
{{- toYaml .Values.commonTolerations | nindent 8 }}
serviceAccountName: {{ include "webhook.serviceAccountName" . }}
{{- if .Values.webhook.automountServiceAccountToken }}
automountServiceAccountToken: true
{{- else }}
automountServiceAccountToken: false
{{- end }}
{{- if .Values.webhook.priorityClass }}
priorityClassName: {{ .Values.webhook.priorityClass }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions charts/policy-controller/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@
"title": "affinity",
"type": "object"
},
"automountServiceAccountToken": {
"default": true,
"required": [],
"title": "automountServiceAccountToken",
"type": "boolean"
},
"configData": {
"required": [],
"title": "configData",
Expand Down
1 change: 1 addition & 0 deletions charts/policy-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ webhook:
# defaulting: 10
# validating: 10
priorityClass: ""
automountServiceAccountToken: true

leasescleanup:
priorityClass: ""
Expand Down

0 comments on commit 71ca3a5

Please sign in to comment.