-
Notifications
You must be signed in to change notification settings - Fork 273
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
Values.image parameters not honored by helm chart in ArgoCD #336
Comments
Not sure if this is related to #112 or not, but still refining the backlog to research if others are having this issue. |
I don't think it's related |
I'm still having this problem with the latest version of the helm chart. I think a solution could be to changed this line here:
to be something like this in {{- if .Values.image.tag }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
{{ else }}
image: {{ .Values.image.repository }}:{{ .Chart.AppVersion }}-{{( .Values.image.flavor }}
{{- end }} And then we remove the stuff about this in |
Closed the draft PR as I've just realized this is only happening through Argo CD for some reason 😨 This issue doesn't occur when I just use k3s with helm directly. I'll report in more as I figure out what the issue is! |
So, this happens if you were using argocd the old way, before they introduced the beta multiple sources feature. Here's an example of how it was broken before. You could previously only use the values.yaml in the source helm chart repo, so the only way to use your own values.yaml was to have a repo where you created a helm chart like this: Broken argocd setup causing this github issue`Chart.yaml`: ```yaml --- apiVersion: v2 version: 0.1.0 name: nextcloud dependencies: - name: nextcloud repository: https://nextcloud.github.io/helm/ version: 3.4.1 ```With the above nextcloud:
image:
repository: nextcloud
tag: 25.0.3-fpm This is the argo manifest I was using: ---
# webapp is deployed LAST because we need secrets and persistent volumes up 1st
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nextcloud-web-app
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: default
destination:
server: "https://kubernetes.default.svc"
namespace: nextcloud
source:
# helm repo
repoURL: https://gitlab.com/vleermuis_tech/goobernetes/nextcloud.git
path: helm/
helm:
valueFiles:
- values.yaml
syncPolicy:
syncOptions:
- Replace=true
automated:
prune: true
selfHeal: true Now with the Argo CD app version ---
# webapp is deployed LAST because we need secrets and persistent volumes up 1st
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nextcloud-minimal-web-app
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: default
destination:
server: "https://kubernetes.default.svc"
namespace: nextcloud
sources:
# official nextcloud helm repo
- repoURL: 'https://nextcloud.github.io/helm'
chart: nextcloud
targetRevision: 3.5.7
helm:
valueFiles:
- $values/values.yaml
# our values.yaml file locally
- repoURL: 'https://gitlab.com/vleermuis_tech/goobernetes/nextcloud.git'
targetRevision: main
ref: values
syncPolicy:
syncOptions:
- ApplyOutOfSyncOnly=true
automated:
prune: true
selfHeal: true
... This solves the problem entirely, but since this is a beta feature, it might break again 🙃 : Closing as this is fixed in my testing with Argo CD helm chart version |
With chart version:
3.4.1
I can only get the parameters underimage
to work if I put them undernextcloud
in myvalues.yaml
. As an example, I would like to use the 25.0.3-fpmimage.tag
.This is from the current
values.yaml
in this repo and if I use it, but just change the tag, it does not honor the tag I have specified:and it produces this (with
helm template nextcloud .
from the directory where I have aChart.yaml
that just references the current nextcloud chart version and a values.yaml):Wrong output rendered template
If I change my local values.yaml to put
image.tag
undernextcloud
it succeeds in the way I would expect:And produces this when I run
helm template
:Correct expected template rendered output
This could be because we're only looking for
nextcloud.image
in the deployment.yaml template:helm/charts/nextcloud/templates/deployment.yaml
Lines 48 to 58 in 315313b
Perhaps something is not working here:
helm/charts/nextcloud/templates/_helpers.tpl
Lines 42 to 51 in 315313b
If I clone this repo, and cd into
charts/nexcloud
, update thevalues.yaml
parameterimage.tag
to25.0.3-fpm
, then runhelm template nextcloud .
from that directory, the resulting rendered manifests are correct, so I think the_helpers.tpl
only applies to the base template and does not take into account additional values.yaml passed in by end users.The text was updated successfully, but these errors were encountered: