fix helm shared value argument position #47
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to Test the Fix
Notes:
1. Prepare the GitOps Build Lib
Fetch the fix branch from GitHub:
https://github.com/cloudogu/gitops-build-lib/tree/bugfix/helm-wrong-order-with-values-shared
Edit the remotes and push this fix branch into the Gob SCM Manager repository of gitops-build-lib.
2. Update the Petclinic Helm Repo
Open the Jenkinsfile in the petclinic-helm repo and change the Version String:
http://scmm.localhost/scm/repo/argocd/petclinic-helm/code/sources/main/Jenkinsfile/
String getGitOpsBuildLibVersion() { '0.7.0'}
to
String getGitOpsBuildLibVersion() { 'bugfix/helm-wrong-order-with-values-shared'}
Jenkins should now start building and redeploying petclinic. Wait for finishing the Jenkins Build.
3. Verify the Fix
Edit values-shared.yaml:
http://scmm.localhost/scm/repo/argocd/petclinic-helm/code/sources/main/k8s/values-shared.yaml
Add an extra environment variable:
Edit values-staging.yaml:
http://scmm.localhost/scm/repo/argocd/petclinic-helm/code/sources/main/k8s/values-staging.yaml
Add another variable:
4. Expected Behavior
After the container build, the environment variables should respect staging overrides:
Foo=Bar (from shared) Foo=Baz (from staging)
Additional note: Helm chart substitution use the helm template command e.g.
Wrong: helm template bla spring-boot-helm-chart-with-dependency/ -f petclinic-helm/k8s/values-staging.yaml -f petclinic-helm/k8s/values-shared.yaml Correct: helm template bla spring-boot-helm-chart-with-dependency/ -f petclinic-helm/k8s/values-shared.yaml -f petclinic-helm/