8ce1b5f6bd
The internal intermediate CA re-key broke CA consumers because Reloader ignored Secrets and could not restart on the vault-ca-cert Secret. Enabling generic secret watching naively would restart every workload on each Vault/VSO secret rotation, so this scopes existing auto annotations to ConfigMaps and makes secret reload opt-in per Secret. - set reloader ignoreSecrets: false so Secrets are watched - convert every generic reloader.stakater.com/auto to the configmap-only configmap.reloader.stakater.com/auto form (22 annotations, 19 files) - add explicit secret.reloader.stakater.com/reload: "vault-ca-cert" to the CA consumers (artifactapi api, cephrgw-operator, puppetserver master+compiler, litellm, logarchiver) so CA rotation restarts them - add secret.reloader.stakater.com/reload: "kanidm-tls" so the cert-manager leaf renewal rolls kanidm - add docs/ca-rotation.md runbook and index it Closes #326 Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
93 lines
2.4 KiB
YAML
93 lines
2.4 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: api
|
|
namespace: artifactapi
|
|
annotations:
|
|
configmap.reloader.stakater.com/auto: "true"
|
|
secret.reloader.stakater.com/reload: "vault-ca-cert"
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: api
|
|
strategy:
|
|
rollingUpdate:
|
|
maxUnavailable: 1
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: api
|
|
spec:
|
|
automountServiceAccountToken: true
|
|
initContainers:
|
|
- name: combine-certs
|
|
image: alpine:3
|
|
command:
|
|
- sh
|
|
- -c
|
|
- cat /etc/ssl/certs/ca-certificates.crt /custom-ca/ca.crt > /combined-certs/ca-certificates.crt
|
|
volumeMounts:
|
|
- name: vault-ca-cert
|
|
mountPath: /custom-ca
|
|
readOnly: true
|
|
- name: combined-certs
|
|
mountPath: /combined-certs
|
|
containers:
|
|
- name: api
|
|
image: git.unkin.net/unkin/artifactapi:v3.7.7
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8000
|
|
name: http
|
|
protocol: TCP
|
|
envFrom:
|
|
- configMapRef:
|
|
name: api-env
|
|
optional: false
|
|
- secretRef:
|
|
name: environment
|
|
optional: false
|
|
volumeMounts:
|
|
- name: combined-certs
|
|
mountPath: /etc/ssl/combined
|
|
readOnly: true
|
|
livenessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
successThreshold: 1
|
|
timeoutSeconds: 5
|
|
readinessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
timeoutSeconds: 5
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: 4Gi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
volumes:
|
|
- name: vault-ca-cert
|
|
secret:
|
|
secretName: vault-ca-cert
|
|
items:
|
|
- key: ca.crt
|
|
path: ca.crt
|
|
- name: combined-certs
|
|
emptyDir: {}
|
|
restartPolicy: Always
|