2026-08-16 01:32:31 +02:00
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: {{ include "flex-auth.name" . }}
|
|
|
|
|
labels:
|
|
|
|
|
{{- include "flex-auth.labels" . | nindent 4 }}
|
|
|
|
|
spec:
|
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
{{- include "flex-auth.selectorLabels" . | nindent 6 }}
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
{{- include "flex-auth.labels" . | nindent 8 }}
|
|
|
|
|
spec:
|
|
|
|
|
automountServiceAccountToken: false
|
2026-08-19 12:31:08 +02:00
|
|
|
{{- if eq (include "flex-auth.callerAuth.enabled" .) "true" }}
|
|
|
|
|
serviceAccountName: {{ include "flex-auth.name" . }}
|
|
|
|
|
{{- end }}
|
2026-08-16 01:32:31 +02:00
|
|
|
securityContext:
|
|
|
|
|
runAsNonRoot: true
|
2026-08-19 14:00:53 +02:00
|
|
|
runAsUser: 65532
|
|
|
|
|
runAsGroup: 65532
|
|
|
|
|
fsGroup: 65532
|
2026-08-16 01:32:31 +02:00
|
|
|
seccompProfile:
|
|
|
|
|
type: RuntimeDefault
|
|
|
|
|
containers:
|
|
|
|
|
- name: flex-auth
|
|
|
|
|
image: {{ include "flex-auth.image" . }}
|
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
|
args:
|
|
|
|
|
{{- toYaml .Values.args | nindent 12 }}
|
2026-08-19 12:31:08 +02:00
|
|
|
{{- if eq (include "flex-auth.callerAuth.enabled" .) "true" }}
|
|
|
|
|
{{- $binding := required "callerAuth.binding is required when callerAuth.mode is warn or enforce" .Values.callerAuth.binding }}
|
|
|
|
|
- --caller-auth-mode
|
|
|
|
|
- {{ include "flex-auth.callerAuth.mode" . | quote }}
|
|
|
|
|
- --caller-kubernetes-url
|
|
|
|
|
- {{ required "callerAuth.kubernetesURL is required when callerAuth.mode is warn or enforce" .Values.callerAuth.kubernetesURL | quote }}
|
|
|
|
|
- --caller-binding
|
|
|
|
|
- {{ $binding | quote }}
|
|
|
|
|
{{- end }}
|
2026-08-16 01:32:31 +02:00
|
|
|
ports:
|
|
|
|
|
- name: http
|
|
|
|
|
containerPort: {{ .Values.service.port }}
|
|
|
|
|
livenessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: {{ .Values.health.path }}
|
|
|
|
|
port: http
|
|
|
|
|
periodSeconds: 20
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: {{ .Values.health.path }}
|
|
|
|
|
port: http
|
|
|
|
|
periodSeconds: 5
|
|
|
|
|
resources:
|
|
|
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
|
|
|
securityContext:
|
|
|
|
|
allowPrivilegeEscalation: false
|
|
|
|
|
capabilities:
|
|
|
|
|
drop:
|
|
|
|
|
- ALL
|
|
|
|
|
readOnlyRootFilesystem: true
|
2026-08-19 12:31:08 +02:00
|
|
|
{{- if eq (include "flex-auth.callerAuth.enabled" .) "true" }}
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- mountPath: {{ .Values.callerAuth.reviewer.mountPath }}
|
|
|
|
|
name: flex-auth-reviewer
|
|
|
|
|
readOnly: true
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if eq (include "flex-auth.callerAuth.enabled" .) "true" }}
|
|
|
|
|
volumes:
|
|
|
|
|
- name: flex-auth-reviewer
|
|
|
|
|
projected:
|
|
|
|
|
defaultMode: 0440
|
|
|
|
|
sources:
|
|
|
|
|
- serviceAccountToken:
|
2026-08-19 14:00:53 +02:00
|
|
|
{{- if .Values.callerAuth.reviewer.audience }}
|
2026-08-19 12:31:08 +02:00
|
|
|
audience: {{ .Values.callerAuth.reviewer.audience | quote }}
|
2026-08-19 14:00:53 +02:00
|
|
|
{{- end }}
|
2026-08-19 12:31:08 +02:00
|
|
|
expirationSeconds: {{ .Values.callerAuth.reviewer.expirationSeconds }}
|
|
|
|
|
path: token
|
|
|
|
|
- configMap:
|
|
|
|
|
name: kube-root-ca.crt
|
|
|
|
|
items:
|
|
|
|
|
- key: ca.crt
|
|
|
|
|
path: ca.crt
|
|
|
|
|
{{- end }}
|