access-engine/charts/flex-auth/templates/deployment.yaml
tegwick 02b15a7f72
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Container Image / build-and-push (push) Successful in 1m12s
access-engine: secret-read evaluator for warden fetch checks (CUST-WP-0075)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 3775@bnt-lap001
Assistant-Session: cfacb6a5-ad5b-4f79-ac67-053e3b0d34a3
2026-10-03 08:57:11 +02:00

91 lines
3.2 KiB
YAML

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
{{- if eq (include "flex-auth.callerAuth.enabled" .) "true" }}
serviceAccountName: {{ include "flex-auth.name" . }}
{{- end }}
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
seccompProfile:
type: RuntimeDefault
containers:
- name: flex-auth
image: {{ include "flex-auth.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- toYaml .Values.args | nindent 12 }}
{{- 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 }}
{{- range .Values.callerAuth.extraBindings }}
- --caller-binding
- {{ . | quote }}
{{- end }}
{{- end }}
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
{{- 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:
{{- if .Values.callerAuth.reviewer.audience }}
audience: {{ .Values.callerAuth.reviewer.audience | quote }}
{{- end }}
expirationSeconds: {{ .Values.callerAuth.reviewer.expirationSeconds }}
path: token
- configMap:
name: kube-root-ca.crt
items:
- key: ca.crt
path: ca.crt
{{- end }}