You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gitlab-ci-pipelines-exporter: Can not disable default readiness and liveness probes by replacing them, the new ones from helm values are always added along with them.
#14
Open
caermeglaeddyv opened this issue
Aug 15, 2021
· 4 comments
When I try to use some custom health check there, it does not replace default one with httpGet, just added to it. I think maybe this is related to using "with" instruction of Helm somehow, maybe you can try to replace it with "if" which checks non-emptiness of that variable and then just "toYaml" like the following:
{{- if .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 10 }}
{{- end }}
{{- if .Values.readinessProbe }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 10 }}
{{- end }}
The text was updated successfully, but these errors were encountered:
Yes, sure, I knew about that, forgot because not using often.
I just think that it's more comfortable for users just to use empty map for that probe.
And what about setting completely different values for probes? In your case, if I do that, my values will be added to existing ones. I need also to override them via "--set ..." and then after that I need to use my values file via "-f ..."? What if I use declarative only way to manage helm releases, for example some GitOps tool like GitOps Toolkit (Flux v2) ?
mvisonneau
transferred this issue from mvisonneau/gitlab-ci-pipelines-exporter
Aug 18, 2021
mvisonneau
changed the title
Can not disable default readiness and liveness probes by replacing them, the new ones from helm values are always added along with them.
gitlab-ci-pipelines-exporter: Can not disable default readiness and liveness probes by replacing them, the new ones from helm values are always added along with them.
Aug 18, 2021
I think maybe this is related to using "with" instruction of Helm somehow, maybe you can try to replace it with "if" which checks non-emptiness of that variable and then just "toYaml" like the following:
with is shorthand for if that also makes . refer to the object within the block. What’s happening in this case is that Helm is merging the readinessProbe or livenessProbe in the defaults with the provided values (rather than replacing the defaults) before they ever reach the template. Maybe the solution is to move the defaults into the template, like this:
my values:
when I create helm templates using that values here's what I get:
When I try to use some custom health check there, it does not replace default one with httpGet, just added to it. I think maybe this is related to using "with" instruction of Helm somehow, maybe you can try to replace it with "if" which checks non-emptiness of that variable and then just "toYaml" like the following:
The text was updated successfully, but these errors were encountered: