fix(argocd): wire missing SOPS CMP plugin sidecar on repo-server, add grafana-admin secret
Sidecar container was absent from live repo-server Deployment (never in helm history), causing sops-secrets Application to fail with cmp-server socket not found — cascaded CreateContainerConfigError across every app depending on SOPS-decrypted secrets. Also fixes duplicate version field in plugin ConfigMap that produced a mismatched socket filename, and adds an initContainer to fetch the sops binary into a writable emptyDir since the sidecar runs non-root. grafana-secrets.enc.yaml rewritten from a bare values file (never valid as a K8s Secret) to a proper Secret manifest so grafana-admin now actually gets created.
This commit is contained in:
@@ -54,6 +54,61 @@ repoServer:
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
|
||||
# Fetch sops binary into shared emptyDir (runs as root; main containers can't write /usr/local/bin)
|
||||
initContainers:
|
||||
- name: install-sops
|
||||
image: alpine:3.20
|
||||
command: [sh, -c]
|
||||
args:
|
||||
- |
|
||||
wget -qO /sops-bin/sops https://github.com/getsops/sops/releases/download/v3.9.3/sops-v3.9.3.linux.amd64
|
||||
chmod +x /sops-bin/sops
|
||||
volumeMounts:
|
||||
- mountPath: /sops-bin
|
||||
name: sops-bin
|
||||
|
||||
# SOPS CMP sidecar (decrypts *.enc.yaml via argocd-cmp-cm ConfigMap plugin)
|
||||
extraContainers:
|
||||
- name: sops-secrets-v1
|
||||
command: [/var/run/argocd/argocd-cmp-server]
|
||||
image: quay.io/argoproj/argocd:v3.4.5
|
||||
env:
|
||||
- name: SOPS_AGE_KEY_FILE
|
||||
value: /sops-age/key.txt
|
||||
- name: PATH
|
||||
value: /sops-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/argocd
|
||||
name: var-files
|
||||
- mountPath: /home/argocd/cmp-server/plugins
|
||||
name: plugins
|
||||
- mountPath: /tmp
|
||||
name: cmp-tmp
|
||||
- mountPath: /home/argocd/cmp-server/config/plugin.yaml
|
||||
subPath: sops-secrets-v1.0.yaml
|
||||
name: argocd-cmp-cm
|
||||
- mountPath: /sops-age
|
||||
name: sops-age
|
||||
readOnly: true
|
||||
- mountPath: /sops-bin
|
||||
name: sops-bin
|
||||
readOnly: true
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 999
|
||||
|
||||
volumes:
|
||||
- name: sops-bin
|
||||
emptyDir: {}
|
||||
- name: cmp-tmp
|
||||
emptyDir: {}
|
||||
- name: argocd-cmp-cm
|
||||
configMap:
|
||||
name: argocd-cmp-cm
|
||||
- name: sops-age
|
||||
secret:
|
||||
secretName: sops-age
|
||||
|
||||
# Controller configuration
|
||||
controller:
|
||||
resources:
|
||||
|
||||
Reference in New Issue
Block a user