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

argocd plugin vault avp-kustomize broke argocd deployment from argocd autopilot #601

Open
rchekhina opened this issue Jan 26, 2024 · 5 comments

Comments

@rchekhina
Copy link

HI,

I have deployed argocd with autopilot and when I patch the argocd-repo-server deployment to add the avp-kustomize sidecar and after this try to add an application or a project with the argocd-autopilot command all the default apps of the bootstrap, argocd, root, and cluster-resources-in-cluster disappear from the GUI.
I have investigating and the issue is the discover of the sidecar :

apiVersion: v1
kind: ConfigMap
metadata:
  name: cmp-plugin
  namespace: argocd
data:
  avp-kustomize.yaml: |
    ---
    apiVersion: argoproj.io/v1alpha1
    kind: ConfigManagementPlugin
    metadata:
      name: argocd-vault-plugin-kustomize
    spec:
      allowConcurrency: true

      # Note: this command is run _before_ anything is done, therefore the logic is to check
      # if this looks like a Kustomize bundle
      discover:
        find:
          command:
            - find
            - "."
            - -name
            - kustomization.yaml

I have change the discover to:

      discover:
        find:
          command:
            - sh
            - "-c"
            - "find . -name 'kustomization.yaml' | xargs -I {} grep \"<path\\|avp\\.kubernetes\\.io\" {} | grep ."

Can you tell me if there is a better discover for avp-kustomize ?

versions:

  • argocd-autopilot: v0.4.17
  • argocd: 2.9.3
  • argocd-vault-plugin: 1.17.0

Best regards.

@rchekhina
Copy link
Author

Well with this discover when I add a new app and use the argocd-vault-plugin-kustomize I have this error:
couldn't find cmp-server plugin with name "argocd-vault-plugin-kustomize" supporting the given repository

if I remove the discover it works but I need to specify the plugin on the app. Can you tell me which discover i can apply to do it without breaking argocd deployed by autopilot ?

Thanks in advance.
Best regards.

@asmabahri
Copy link

Hi Rchekhina, I have the same problem did you find a solution for this?

@rchekhina
Copy link
Author

rchekhina commented Apr 20, 2024 via email

@asmabahri
Copy link

Hi Rchekhina, The only thing that worked for me while using argocd-autopilot and avp for kustomize is to remove the discover from the config and then to apply the source from plugin in the application deployment, here is my config file and the application file spec:
apiVersion: v1 kind: ConfigMap metadata: name: cmp-plugin namespace: argocd data: avp-kustomize.yaml: | --- apiVersion: argoproj.io/v1alpha1 kind: ConfigManagementPlugin metadata: name: argocd-vault-plugin-kustomize spec: generate: command: - sh - "-c" - "kustomize build . | argocd-vault-plugin generate -s argocd:vault-configuration -" lockRepo: false
and the application manifest:
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: app namespace: argocd spec: destination: namespace: default server: https://kubernetes.default.svc project: default source: path: overlays/lab plugin: name: argocd-vault-plugin-kustomize repoURL: <myrepourl< targetRevision: HEAD

@rchekhina
Copy link
Author

HI asmabahri,

thanks for the information. I have already done this. But it should be great if someone can help to find the good discover.

Best regards.

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