-
Notifications
You must be signed in to change notification settings - Fork 379
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
Fix Helm values parsing #474
Conversation
f31eb0a
to
f819a5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats with a good catch!
Signed-off-by: Jussi Nummelin <jnummelin@mirantis.com>
f819a5b
to
1b232cf
Compare
@ncopa @jasmingacic Had to force push and thus dismiss the reviews, could you PTAL again, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested this setup:
charts:
- name: akri-dev
chartname: akri/akri-dev
version: "0.0.42"
namespace: akri
values: |
debugEcho:
enabled: true
shared: false
agent:
allowDebugEcho: true
host:
dockerShimSock: /my/new/docker/shim/foo.sock
Which resulted with:
# sudo crictl --runtime-endpoint unix:///var/lib/k0s/run/containerd.sock ps
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID
2e50e5244dcc4 c0bd9c7f70f66 2 seconds ago Running akri-controller 2 fe89ca98b8eba
ac6573b365fd9 37c2efaddb793 2 seconds ago Running akri-agent 2
And this:
# sudo crictl --runtime-endpoint unix:///var/lib/k0s/run/containerd.sock inspect ac6573b365fd9 | grep -i hostpath
...
"hostPath": "/my/new/docker/shim/foo.sock",
Looking good
Signed-off-by: Jussi Nummelin jnummelin@mirantis.com
Issue
Fixes #447
What this PR Includes
Intorduces a cleanup function to make all nested maps being converted into
map[string]interface{}
types. By default golang parses the nested maps intomap[interface{}]interface{}
types which makes Helm to actually ignore those keys when merging the chart default values into given values.in the Helm code which merges the defaults in, there’s this:
see: https://github.com/helm/helm/blob/6aefbdcf38e14998d0bcb24030061822b1e8888d/pkg/chartutil/coalesce.go#L156-L157
The cast is not successfull with
map[interface{}]interface{}
type and thus no merging actually happenedAdds also a verification into the related smoke case that we really see the given values being propagated into place.