- values/application-readback.yaml: serve-readback, enforce, readback caller user-engine, ingress from user-engine only - chart: readback.enabled renders --readback-caller instead of --caller-binding - lifecycle pin to e8c57c18 (main-b5da745, lifecycle v2); previous bdac62bc - TestReadbackPinMatchesParticipantPins: same image digest and package path Founder go 2026-10-10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 735967@bnt-lap001 Assistant-Session: 5971967f-77f8-4ced-9e02-c6ef67040ffc
126 lines
4.9 KiB
YAML
126 lines
4.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "flex-auth.name" . }}
|
|
labels:
|
|
{{- include "flex-auth.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if .Values.outbox.enabled }}
|
|
{{- if ne (int .Values.replicaCount) 1 }}
|
|
{{- fail "outbox requires replicaCount=1: one writer per source and PVC" }}
|
|
{{- end }}
|
|
strategy:
|
|
type: Recreate
|
|
{{- end }}
|
|
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 .Values.outbox.enabled }}
|
|
- --outbox-dir
|
|
- {{ .Values.outbox.mountPath | quote }}
|
|
- --emission-source
|
|
- {{ required "outbox.source is required when outbox.enabled=true" .Values.outbox.source | quote }}
|
|
{{- end }}
|
|
{{- if eq (include "flex-auth.callerAuth.enabled" .) "true" }}
|
|
{{- $binding := "" }}
|
|
{{- if not (and .Values.readback .Values.readback.enabled) }}
|
|
{{- $binding = required "callerAuth.binding is required when callerAuth.mode is warn or enforce" .Values.callerAuth.binding }}
|
|
{{- end }}
|
|
- --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 }}
|
|
{{- if and .Values.readback .Values.readback.enabled }}
|
|
{{- /* serve-readback admits one readback caller and no /v1/check binding (FLEX-DEC-2026-019). */}}
|
|
- --readback-caller
|
|
- {{ required "readback.caller is required when readback.enabled=true" .Values.readback.caller | quote }}
|
|
{{- else }}
|
|
- --caller-binding
|
|
- {{ $binding | quote }}
|
|
{{- range .Values.callerAuth.extraBindings }}
|
|
- --caller-binding
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
{{- 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 or .Values.outbox.enabled (eq (include "flex-auth.callerAuth.enabled" .) "true") }}
|
|
volumeMounts:
|
|
{{- if .Values.outbox.enabled }}
|
|
- mountPath: {{ .Values.outbox.mountPath | quote }}
|
|
name: flex-auth-outbox
|
|
{{- end }}
|
|
{{- if eq (include "flex-auth.callerAuth.enabled" .) "true" }}
|
|
- mountPath: {{ .Values.callerAuth.reviewer.mountPath }}
|
|
name: flex-auth-reviewer
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if or .Values.outbox.enabled (eq (include "flex-auth.callerAuth.enabled" .) "true") }}
|
|
volumes:
|
|
{{- if .Values.outbox.enabled }}
|
|
- name: flex-auth-outbox
|
|
persistentVolumeClaim:
|
|
claimName: {{ default (printf "%s-outbox" (include "flex-auth.name" .)) .Values.outbox.existingClaim | quote }}
|
|
{{- end }}
|
|
{{- if eq (include "flex-auth.callerAuth.enabled" .) "true" }}
|
|
- 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 }}
|
|
{{- end }}
|