Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpg issue - /app/config/gpg/keys: no such file or directory #4

Closed
pigletto opened this issue Dec 14, 2020 · 2 comments
Closed

gpg issue - /app/config/gpg/keys: no such file or directory #4

pigletto opened this issue Dec 14, 2020 · 2 comments

Comments

@pigletto
Copy link

I've followed the documentation on "Using Sops with a GPG key" but the container ceases to start due to the following:

gpg: directory '/home/argocd/.gnupg' created
gpg: keybox '/home/argocd/.gnupg/pubring.kbx' created
gpg: /home/argocd/.gnupg/trustdb.gpg: trustdb created
gpg: key 5C863630055D4A17: public key "XYZ" imported
gpg: key 5C863630055D4A17: secret key imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
time="2020-12-14T11:05:33Z" level=info msg="Initializing GnuPG keyring at /app/config/gpg/keys"
time="2020-12-14T11:05:33Z" level=fatal msg="stat /app/config/gpg/keys: no such file or directory"

I've used the v1.8.1_c2c.1 image and also tried the previous one.

My configuration (helmfile):

    values:
      - global:
          image:
            repository: "camptocamp/argocd"
#            tag: "v1.8.1_c2c.1"
            tag: "v1.7.10_c2c.1"
          securityContext:
            fsGroup: 2000
      - repoServer:
          volumes:
            - name: "gpg-private-key"
              secret:
                secretName: "argocd-secret"
                items:
                  - key: "gpg.privkey.asc"
                    path: "privkey.asc"
                defaultMode: 0600
          volumeMounts:
            - name: "gpg-private-key"
              mountPath: "/app/config/gpg"
      - configs:
          secret:
            extra:
              gpg.privkey.asc: |-
                {{ .Values | get "GPG_PRIVKEY_FOR_HELM" "" | nindent 18 }}
@yann-soubeyrand
Copy link
Member

Hi @pigletto,

Which version of the Helm chart are you using to deploy Argo CD? Are you deploying on OpenShift?

@pigletto
Copy link
Author

The helm chart for argo cd is 2.10.0. I'm deploying to DigitalOcean's Kubernetes (1.19.3 the newest available). Seems to me that base argo-cd image is using the /app/config/gpg location and because of that I've modified volume mount to be: /app/config/gpg2:

    volumeMounts:
            - name: "gpg-private-key"
              mountPath: "/app/config/gpg2"

and updated the argocd-repo-server-wrapper to use this location:

GPG_PRIVATE_KEY_FILE='/app/config/gpg2/privkey.asc'

Seems to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants