Update to spire-controller-manager 0.4.2 (#195)

This commit is contained in:
kfox1111
2024-01-25 12:07:10 +01:00
committed by GitHub
parent 3e1c5199b7
commit e8d527cd9a
9 changed files with 21 additions and 7 deletions
@@ -29,7 +29,9 @@ data:
cacheNamespaces:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.controllerManager.validatingWebhookConfiguration.enabled }}
validatingWebhookConfigurationName: {{ .Release.Namespace }}-{{ include "spire-controller-manager.fullname" . }}-webhook
{{- end }}
clusterName: {{ include "spire-lib.cluster-name" . }}
trustDomain: {{ include "spire-lib.trust-domain" . }}
ignoreNamespaces:
@@ -39,4 +41,5 @@ data:
spireServerSocketPath: "/tmp/spire-server/private/api.sock"
className: {{ include "spire-server.controller-manager-class-name" . | quote}}
watchClassless: {{ .Values.controllerManager.watchClassless | toYaml }}
parentIDTemplate: {{ .Values.controllerManager.parentIDTemplate | quote }}
{{- end }}
@@ -37,9 +37,11 @@ rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch"]
{{- if .Values.controllerManager.validatingWebhookConfiguration.enabled }}
- apiGroups: ["admissionregistration.k8s.io"]
resources: ["validatingwebhookconfigurations"]
verbs: ["get", "list", "patch", "watch"]
{{- end }}
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
@@ -1,4 +1,4 @@
{{- if eq (.Values.controllerManager.enabled | toString) "true" }}
{{- if and (eq (.Values.controllerManager.enabled | toString) "true") .Values.controllerManager.validatingWebhookConfiguration.enabled }}
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
@@ -1,5 +1,5 @@
{{- if eq ((dig "installAndUpgradeHooks" "enabled" .Values.controllerManager.installAndUpgradeHook.enabled .Values.global) | toString) "true" }}
{{- if eq (.Values.controllerManager.enabled | toString) "true" }}
{{- if and (eq (.Values.controllerManager.enabled | toString) "true") .Values.controllerManager.validatingWebhookConfiguration.enabled }}
{{- if eq .Values.controllerManager.validatingWebhookConfiguration.failurePolicy "Fail" }}
apiVersion: v1
kind: ServiceAccount
@@ -1,5 +1,5 @@
{{- if eq ((dig "installAndUpgradeHooks" "enabled" .Values.controllerManager.installAndUpgradeHook.enabled .Values.global) | toString) "true" }}
{{- if eq (.Values.controllerManager.enabled | toString) "true" }}
{{- if and (eq (.Values.controllerManager.enabled | toString) "true") .Values.controllerManager.validatingWebhookConfiguration.enabled }}
{{- if eq .Values.controllerManager.validatingWebhookConfiguration.failurePolicy "Fail" }}
apiVersion: v1
kind: ServiceAccount
@@ -1,5 +1,5 @@
{{- if eq ((dig "installAndUpgradeHooks" "enabled" .Values.controllerManager.installAndUpgradeHook.enabled .Values.global) | toString) "true" }}
{{- if eq (.Values.controllerManager.enabled | toString) "true" }}
{{- if and (eq (.Values.controllerManager.enabled | toString) "true") .Values.controllerManager.validatingWebhookConfiguration.enabled }}
{{- if eq .Values.controllerManager.validatingWebhookConfiguration.failurePolicy "Fail" }}
apiVersion: v1
kind: ServiceAccount
@@ -202,8 +202,10 @@ spec:
{{- if .Values.controllerManager.expandEnv }}
- --expand-env
{{- end }}
{{- if gt (len .Values.controllerManager.extraEnv) 0 }}
env:
- name: ENABLE_WEBHOOKS
value: {{ .Values.controllerManager.validatingWebhookConfiguration.enabled | toString | quote }}
{{- if gt (len .Values.controllerManager.extraEnv) 0 }}
{{- .Values.controllerManager.extraEnv | toYaml | nindent 12 }}
{{- end }}
ports: