ao configmap: fixes for handling boolean and numeric values #48
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.
Summary
This is a small fix to allow the helm-generated configmap to accommodate boolean and numeric values -- it forces extra quotes into the configmap.
How to produce the error
The following snippet in
values.yaml
will cause helm deployment failure. It does not matter whether the wordfalse
is quoted, doublequoted, escaped in any way -- as long as it's recognizable as a boolean the failure will happen.Similar problems happen with any value that is JSON/YAML parseable as an integer.
Gist of the fix
Produce extra quotes in the configmap template[s] to prevent parsing of affected values as anything but string.
Affected locations
Two places I noticed that are using
.Values.global.configmap.configParams
:charts/keylime-init/templates/ca-job.yaml
-- global environment variables used to direct CA generationtemplates/configmap.yaml
-- the actual copying of environment variables into the keylime configmapWhy we need this
I cannot start to produce meaningful CI tests without disabling EK cert requirements on AWS machines (since AWS TPMs don't have EK certificates). Expect a second, much larger PR for meaningful CI tests with AWS EC2 VMs as soon as this is merged.