argoproj-labs / argocd-agent

Redefining the multi cluster story of Argo CD
Apache License 2.0
81 stars 15 forks source link

fix: agent pod is not starting because the image is running as root #203

Closed mikeshng closed 1 month ago

mikeshng commented 1 month ago

I am trying to start the agent but the agent pod is failing with the error

Error: container has runAsNonRoot and image will run as root (pod: "argocd-agent-agent-74b8b74b5b-9vlbj_argocd(b547aa02-a3ca-4b8c-b26b-fe1aa1aaeb4c)", container: argocd-agent-agent)

This fix is to make sure the image is building with a non-root user. I copied the user ID from the principal Dockerfile.