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.
What this PR does / why we need it:
Checks the type of any environment variable containing
_log
. If it is a boolean, emit a failure instructing users to add quotes.Reverts 2edf22d, which previously addressed this by enforcing string types for all variables.
Which issue this PR fixes
Special notes for your reviewer:
In general, we don't care if YAML's stupid type coercion nonsense changes
off
tofalse
: Pod envvars are ultimately all treated as strings by Kubernetes, and Kong accepts either value for boolean config values.The various
_log
variables are a special case: these are not booleans, and the literal stringoff
is a special value that disables logging. YAML nonsense converting these to booleans (and then Kubernetes converting them back to strings) is a problem, sincefalse
is valid value for the non-special case of this of setting, where it's instead interpreted as a file path. I'm not entirely sure why using<prefix dir>/false
breaks the container (it's a valid path and Kong should be able to write to it fine), but in any case, it's something we can check special for these.Manual testing
Dunno why
--set
doesn't work to set the boolean of this for me, so these are in values.yaml files instead. With this change:Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
main
branch.