Open rbrendler opened 6 months ago
YAML is kinda stupid and can't handle the mutually exclusive relationship exec
and httpGet
have in practice. Helm's merge logic doesn't let you define a complete livenessProbe
value, it applies anything you provide as overlay atop the defaults in values.yaml. startupProbe
doesn't have this issue because it has no actual default, just an example comment.
Does setting httpGet: {}
knock the default out? It should.
YAML is kinda stupid and can't handle the mutually exclusive relationship
exec
andhttpGet
have in practice. Helm's merge logic doesn't let you define a completelivenessProbe
value, it applies anything you provide as overlay atop the defaults in values.yaml.startupProbe
doesn't have this issue because it has no actual default, just an example comment.Does setting
httpGet: {}
knock the default out? It should.
Nope, just tested this out
values.yaml
livenessProbe:
httpGet: {}
exec:
command:
- python3.10
- /home/kong/scripts/liveness_probe.py
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
renders out to
livenessProbe:
exec:
command:
- python3.10
- /home/kong/scripts/liveness_probe.py
failureThreshold: 3
httpGet:
path: /status
port: status
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
Opened up a PR for a fix, but this looks like it's an actual helm bug https://github.com/helm/helm/issues/12991
When overriding liveness probe, I get my probe plus the default one defined. The extra handler triggers a K8S error.
Chart.yaml:
values.yaml:
Running
helm dep up
andhelm template .
renders the following in my Deployment:Note that my
exec
handler is followed by the default KonghttpGet
handler, which triggers an error in K8S.Same code behaves as expected with startup probes, only liveness and readiness probes have a problem.