-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config upgrade: handle helm overrides #1646
Config upgrade: handle helm overrides #1646
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1646 +/- ##
==========================================
+ Coverage 46.97% 46.99% +0.02%
==========================================
Files 130 131 +1
Lines 6252 6262 +10
==========================================
+ Hits 2937 2943 +6
- Misses 3014 3016 +2
- Partials 301 303 +2
Continue to review full report at Codecov.
|
…1585) Helm overrides have type `map[string]interface{}` which cannot be serialized to json. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> #####
…tainerTools#1585) Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
…rrides (GoogleContainerTools#1585) Helm overrides have type `map[string]interface{}` which cannot be serialized to json. Implement a custom serialization which includes the overrides as a yaml-string in json. This implementation is forwards-compatible, so that it will automatically work for future apiVersions. Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com>
1571b57
to
982b421
Compare
@nkubala Do you think this is a viable approach? Since you commented on the bug report you seem to be the right person to ask that. Besides, this PR has been open for almost a month now, and I would like to resolve this at some point. |
Thank you @corneliusweig for contributing this! This looks good to me - as in theory this shouldn't break anybody. Let's see integration tests pass and then we can merge it. |
Json serialization does not cope with helm overrides, because its type
map[string]interface{}
is not serialized by the json encoder. To deal with that, implement a fallback which includes the helm overrides as a yaml string.That way, the config upgrade is forwards compatible, so that future api-versions do not need to do any manual adaptions for a working json serialization. I also tried a much more manual approach which would have required manual tasks for future api versions 👎
One drawback of my current approach is that it requires a new struct
HelmOverrides
which is shared among all api-version schemas. However, since the content ofHelmOverrides
is opaque to Skaffold anyway, this should be ok.Fixes #1585