argocd-vault-plugin
argocd-vault-plugin copied to clipboard
Helm AVP for Sidecar Usage Documentation Improvement
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:
- Go to https://argocd-vault-plugin.readthedocs.io/en/stable/usage/
- Scroll down to the 'With Helm' -> For sidecar configured plugins step
- Neither
Init
norhelm 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.
Thanks @Nathan-Moignard can you create a PR with your suggested changes?