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.
25 lines
594 B
YAML
25 lines
594 B
YAML
# ArgoCD CMP plugin for SOPS secret decryption
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: argocd-cmp-cm
|
|
namespace: argocd
|
|
data:
|
|
sops-secrets-v1.0.yaml: |
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: ConfigManagementPlugin
|
|
metadata:
|
|
name: sops-secrets-v1.0
|
|
spec:
|
|
generate:
|
|
command: [sh, -c]
|
|
args:
|
|
- |
|
|
# Find all .enc.yaml files and decrypt them
|
|
find . -name '*.enc.yaml' -type f | while read -r file; do
|
|
sops -d "$file"
|
|
done
|
|
discover:
|
|
find:
|
|
glob: "**/*.enc.yaml"
|