argocd-vault-plugin icon indicating copy to clipboard operation
argocd-vault-plugin copied to clipboard

Helm AVP for Sidecar Usage Documentation Improvement

Open Nathan-Moignard opened this issue 1 year ago • 1 comments

Describe the bug Hi, I was following the official documentation on the avp-helm sidecar usage but I was struggling on a error with malformed YAML as input. I then discovered thanks to the ConfigMap code extract that the init step was required. My mistake was regrouping the helm dependency build with the other commands in the generate step. I am writing this issue to improve the documentation by adding the init step in the avp-helm sidecar code extract.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://argocd-vault-plugin.readthedocs.io/en/stable/usage/
  2. Scroll down to the 'With Helm' -> For sidecar configured plugins step
  3. Neither Init nor helm dependency build step not present in code example

Expected behavior I thought that the displayed example would work with a subchart.

Comparison Documentation/Fixed Before:

    ---
    apiVersion: argoproj.io/v1alpha1
    kind: ConfigManagementPlugin
    metadata:
      name: argocd-vault-plugin-helm
    spec:
      allowConcurrency: true
      discover:
        find:
          command:
            - sh
            - "-c"
            - "find . -name 'Chart.yaml' && find . -name 'values.yaml'"
      generate:
        command:
          - sh
          - "-c"
          - |
            helm template $ARGOCD_APP_NAME --include-crds . |
            argocd-vault-plugin generate -
      lockRepo: false

After:

    ---
    apiVersion: argoproj.io/v1alpha1
    kind: ConfigManagementPlugin
    metadata:
      name: argocd-vault-plugin-helm
    spec:
      allowConcurrency: true
      init:
        command:
          - sh
          - "-c"
          - "helm dependency build"
      discover:
        find:
          command:
            - sh
            - "-c"
            - "find . -name 'Chart.yaml'"
      generate:
        command:
          - sh
          - "-c"
          - |
            helm template $ARGOCD_APP_NAME --include-crds -n $ARGOCD_APP_NAMESPACE ${ARGOCD_ENV_HELM_ARGS} . |
            argocd-vault-plugin generate -s vault-configuration -
      lockRepo: false

Don't hesitate if you have further question.

Nathan-Moignard avatar Jul 12 '23 10:07 Nathan-Moignard

Thanks @Nathan-Moignard can you create a PR with your suggested changes?

werne2j avatar Jul 13 '23 22:07 werne2j