Add an easy to use identity for child servers (#302)

Signed-off-by: Kevin Fox <[email protected]>
Co-authored-by: Faisal Memon <[email protected]>
This commit is contained in:
kfox1111
2024-04-16 08:35:07 -07:00
committed by GitHub
co-authored by Faisal Memon
parent 1304364770
commit 260b02f973
3 changed files with 17 additions and 3 deletions
@@ -9,7 +9,10 @@ values:
{{ .namespaces | toYaml | nindent 2 }}
{{- end }}
{{- define "spire-controller-manager-identity-podselector" }}
{{- if eq .type "oidc-discovery-provider" }}
{{- if eq .type "child-servers" }}
matchLabels:
component: server
{{- else if eq .type "oidc-discovery-provider" }}
matchLabels:
release: {{ .Release.Name }}
release-namespace: {{ .Release.Namespace }}
@@ -34,8 +37,8 @@ matchLabels:
{{- if eq ($root.Values.controllerManager.enabled | toString) "true" }}
{{- if or (not (hasKey $value "enabled")) (eq ($value.enabled | toString) "true") }}
{{- $type := dig "type" "base" $value }}
{{- if not (has $type (list "base" "raw" "oidc-discovery-provider" "test-keys")) }}
{{- fail (printf "Type given: %s, must be one of [base, raw, oidc-discovery-provider, test-keys]" $type) }}
{{- if not (has $type (list "base" "raw" "child-servers" "oidc-discovery-provider" "test-keys")) }}
{{- fail (printf "Type given: %s, must be one of [base, raw, child-servers, oidc-discovery-provider, test-keys]" $type) }}
{{- end }}
{{- $namespaceSelector := deepCopy (dig "namespaceSelector" (dict) $value) }}
{{- if ne $type "raw" }}