[bug] Not possible to configure httpGet under health probes. #694
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We wanted to configure the
/api/healthz
URL under our liveness probes, as defined here: https://docs.gitea.com/installation/install-on-kubernetes#health-check-endpoint. However, something about in helm chart isn't allowing this. We even tried overwriting the tcpSocket block with an empty dictionary and this didn't help either.I'm not even sure what's up here. The
templates/gitea/deployment.yaml
file looks like it should just overwrite the entire probe section, but that does not appear to be what's happening here. We even tried removing the helm deployment entirely and reinstalling fresh.Error:
Example values:
I can reproduce this issue in my environment; I'm unable to install the gitea chart with httpGet or exec liveness or readiness probes. It seems this is because tcpSocket is specified in the defaults as a populated dict, and the deployment.yaml template takes whatever is under gitea.livenessProbe or gitea.readinessProbe with the toYaml function. The only way I could think of to get around this while using the official chart is to set tcpSocket explicitly to null, but whether this is intended or not it seems Helm doesn't remove the entry from values but still uses the default. If that is a bug, I believe it should be brought to the Helm project as an issue, but in the meantime there may be a way to work around this with a helper function so that tcpSocket can be easily removed as needed while remaining the default.
I will also say personally I think it makes more sense to have the httpGet probe to /api/healthz as the default, but regardless I think it should be configurable.