akuity / cdk8s-cmp

cdk8s config management plugins support for ArgoCD
10 stars 0 forks source link

Add this plugin to the argo-cd chart? #2

Open batazor opened 5 months ago

batazor commented 5 months ago

The article doesn't make it very clear exactly how we can add this plugin to our helm values.yaml file.

Maybe we should add it as an option to the chart right away? Or add such an example to this repository

Marvin9 commented 5 months ago

I can add example to modify helm values.

batazor commented 5 months ago

@Marvin9 That would be awesome!

Marvin9 commented 5 months ago

@batazor I will update repository but here is example of values.yaml

repoServer:
  extraContainers:
    - name: cdk8s-go # modify
      command:
        - /var/run/argocd/argocd-cmp-server
      image: 'ghcr.io/akuity/cdk8s-cmp-go:latest' # modify
      securityContext:
        runAsNonRoot: true
        runAsUser: 999
      volumeMounts:
        - mountPath: /var/run/argocd
          name: var-files
        - mountPath: /home/argocd/cmp-server/plugins
          name: plugins
        - mountPath: /home/argocd/cmp-server/config/plugin.yaml
          subPath: plugin.yaml
          name: argocd-cmp-cm
        - mountPath: /tmp
          name: cmp-tmp
  volumes:
    - name: argocd-cmp-cm
      configMap:
        name: argocd-cmp-cm
        items:
          - key: cdk8s-go.yaml # modify
            path: plugin.yaml
    - name: cmp-tmp
      emptyDir: {}
configs:
  cmp:
    create: true
    plugins:
      cdk8s-go: # modify
        init:
          command:
            - cdk8s
          args:
            - import
        generate:
          command:
            - cdk8s
            - synth
          args:
            - '--stdout'
        discover:
          fileName: '*.go'