You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to inject values into my chart by obtaining values from the kubernetes cluster by executing certain kubectl commands. For instance, I need to inject the a value into my charts from kubernetes node labels.
The text was updated successfully, but these errors were encountered:
komal-SkyNET
changed the title
Inject values into charts from kubectl command statement result
Inject values into charts from kubectl command statement result at runtime
Jun 26, 2018
Just looking to see if there's a feature to do this from values file.
eg:
data:
environment: {{ $(kubectl get nodes --show-labels ) }}
I understand there's formatting issues and data type mismatch here, but just wondering if there's a way to execute and get output from command into values file. I've noticed --set option being used for stuff like this.
This seems like a good use case to add to the downward API. It's not possible to grab node labels, but this was requested upstream. See kubernetes/kubernetes#40610
For now, you'll have to use --set and manually inject your labels into the chart. There's no way currently to programmatically grab the node's labels on-the-fly.
I'm trying to inject values into my chart by obtaining values from the kubernetes cluster by executing certain kubectl commands. For instance, I need to inject the a value into my charts from kubernetes node labels.
Output of
helm version
:Client: &version.Version{SemVer:"v2.7.2" , GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.7.2", GitTreeState:"clean"}
Output of
kubectl version
:Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.6", GitTreeState:"clean", BuildDate:"2018-03-21T15:21:50Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.3+coreos.0", GitTreeState:"clean", BuildDate:"2017-11-13T10:18:37Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.): VMware
The text was updated successfully, but these errors were encountered: