summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--f3s/argocd/values.yaml17
1 files changed, 10 insertions, 7 deletions
diff --git a/f3s/argocd/values.yaml b/f3s/argocd/values.yaml
index 45ba916..75d3c91 100644
--- a/f3s/argocd/values.yaml
+++ b/f3s/argocd/values.yaml
@@ -76,18 +76,21 @@ repoServer:
extraContainers:
- name: ssh-agent
image: alpine:3.19
- securityContext:
- runAsUser: 999
- runAsGroup: 999
command:
- sh
- -c
- |
+ # Install openssh as root
apk add --no-cache openssh
- eval $(ssh-agent -s -a /tmp/ssh-agent/socket)
- ssh-add /tmp/ssh-key/sshPrivateKey
- # Keep agent running
- while true; do sleep 3600; done
+ # Create argocd user if it doesn't exist
+ adduser -D -u 999 argocd 2>/dev/null || true
+ # Start ssh-agent as argocd user
+ su argocd -s /bin/sh -c '
+ eval $(ssh-agent -s -a /tmp/ssh-agent/socket)
+ ssh-add /tmp/ssh-key/sshPrivateKey
+ # Keep agent running
+ while true; do sleep 3600; done
+ '
volumeMounts:
- name: ssh-agent-socket
mountPath: /tmp/ssh-agent