-
Notifications
You must be signed in to change notification settings - Fork 87
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
KSOPS not working with ArgoCD - no error #217
Comments
🤖 Hello @dunnjt, Nice to meet you! I'm a bot here to help you with your KSOPS and ArgoCD issues while we wait for a human maintainer. I'm here to help you solve bugs, answer questions, and guide you through contributing to the project. I'm currently reviewing your issue and will provide a detailed response shortly. |
🤖 Based on the information you've provided and similar issues I found in the KSOPS repository, there could be several reasons why KSOPS isn't working with ArgoCD in your case.
Please verify these configurations and make sure they are correctly set up. If the issue persists, it would be helpful to have more detailed logs or error messages. Regarding your question about the compatibility of ArgoCD with KSOPS version v4.2.5, I wasn't able to find specific information about this in the KSOPS repository. However, it would be helpful to know the exact version of ArgoCD you're using to further investigate this issue. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Hey @dunnjt thanks for making an issue. At a glance it looks like it could be a yaml formatting issue. The apiVersion: viaduct.ai/v1
kind: ksops
metadata:
name: test-secret-generator
annotations:
config.kubernetes.io/function: |
exec:
path: ksops
secretFrom:
- metadata:
name: my-secrets
namespace: test
labels:
app: test
annotations:
kustomize.config.k8s.io/needs-hash: "false"
type: Opaque
files:
- secrets.yaml Also, is there a reason for the test generator? secretGenerator:
- name: test-generator
literals:
- FRUIT=apple
- VEGETABLE=carrot Let me know if either of these help |
@devstein Thanks for the follow-up. The To troubleshoot further, I created a secondary kube cluster with an installation of ArgoCD (same version), loaded KSOPS, used the same Kustomize repo as before and everything worked as expected. The only difference I can see is on the working installation it's deploying in-cluster, whereas on the non-working install, it's deploying to a remote cluster. On the non-working install, I exec'ed into ArgoCD's At this point it seems more like an ArgoCD issue, but I haven't been able to unlock the root cause. |
Found the problem, the argocd-cm was being overwritten and |
I'm unable to find the root cause for why KSOPS isn't working with ArgoCD. I can test my setup locally and everything works as expected. On Argo, the repo-server seems configured properly, but doesn't create the Secret. There are also no errors to help debug.
My Kustomization flow is as follows:
kustomization.yaml
secret-generator.yaml
secret.yaml is a standard SOPS file encrypted with an AWS KMS key.
Locally I can run
kustomize build --enable-alpha-plugins --enable-exec .
and I'll see the output of both the KSOPS generated secret and the standard secretFrom generators secret.On ArgoCD we are using the Argo Helm chart version "5.45.0". Passing the chart values as described in the documentation with
I can exec into the repo-server pod and run
kustomize version
which gives mev5.2.1+ksops.v4.2.5
. I canecho $AWS_SECRET_ACCESS_KEY
and it will provide me with my AWS credential. I have also set thekustomize.buildOptions
in the argocd-cm.When I sync the application in Argo, I only see my secretFrom secret created, NOT the KSOPS secret. The trouble is there are no errors. From Argo UI, the sync is healthy. I've put the repo-server into debug mode and found no logs related to ksops. I've even tried purposefully mucking up the implementation to force errors, which they do appear, however, when I put my config back to its original state, the errors go away, but no Secret is created.
Any idea where it could have gone wrong?
The text was updated successfully, but these errors were encountered: