kubernetes-helm

How to get the name of a child chart with Helm?

谁说我不能喝 提交于 2019-12-05 00:44:29
I have a helm chart that requires stable/redis as a child chart. The parent chart needs to expose the redis service as an environment variable. The redis chart includes a template called redis.fullname . How can I refer to this in my parent chart? I.e. I want something like this in my parent deployment but it doesn't work: kind: Deployment spec: template: containers: env: - name: REDIS_CLUSTER_SERVICE_HOST value: {{ template "redis.fullname" . }} You can use '{{ .Release.Name }}-redis' in your parent chart. I had same requirement. This is my example in case you want to take a look -> https:/

Kubernetes Helm, combine two variables with a string in the middle

拜拜、爱过 提交于 2019-12-04 22:57:36
I’m trying to change the value of a variable if another variable it set by combining the two with a dash in the middle, I’m not sure of the syntax to do this, I’m thinking of somethings like: {{- $serviceNamespace := .Values.serviceNamespace -}} {{- $serviceTag := .Values.serviceTag -}} {{- if $serviceTag}} {{- $serviceNamespace := .Values.serviceNamespace "-" .Values.serviceTag -}} {{- end}} Is this correct? if serviceNamespace was hello and serviceTag was 1.0.0 would I end up with serviceNamespace being hello-1.0.0 ? For concatenation just use printf: {{- $serviceNamespace := printf "%s-%s"

Automatically use secret when pulling from private registry

醉酒当歌 提交于 2019-12-04 18:18:03
问题 Is it possible to globally (or at least per namespace), configure kubernetes to always use an image pull secret when connecting to a private repo? There are two use cases: when a user specifies a container in our private registry in a deployment when a user points a Helm chart at our private repo (and so we have no control over the image pull secret tag). I know it is possible to do this on a service account basis but without writing a controller to add this to every new service account

How to uninstall / remove tiller from Kubernetes manually?

 ̄綄美尐妖づ 提交于 2019-12-04 14:34:35
I've by mistake installed an unsecured configuration of tiller. I've tried helm reset but something must have corrupted because now when I try to install helm: $HELM_HOME has been configured at /home/chris/.helm. Warning: Tiller is already installed in the cluster. (Use --client-only to suppress this message, or --upgrade to upgrade Tiller to the current version.) Happy Helming! However if I try helm ls I get: Error: could not find tiller . So because helm reset is insufficient, or there is some bugs, which resources do I need to delete in order to be able to reinstall helm correctly ( helm

Set value in dependency of Helm chart

陌路散爱 提交于 2019-12-04 14:18:29
I want to use the postgresql chart as a requirements for my Helm chart. My requirements.yaml file hence looks like this: dependencies: - name: "postgresql" version: "3.10.0" repository: "@stable" In the postgreSQL Helm chart I now want to set the username with the property postgresqlUsername (see https://github.com/helm/charts/tree/master/stable/postgresql for all properties). Where do I have to specify this property in my project so that it gets propagated to the postgreSQL dependency? This topic is very clearly described here: https://helm.sh/docs/developing_charts/#using-the-child-parent

How can you reuse dynamically provisioned PersistentVolumes with Helm on GKE?

寵の児 提交于 2019-12-04 13:42:33
问题 I am trying to deploy a helm chart which uses PersistentVolumeClaim and StorageClass to dynamically provision the required sotrage. This works as expected, but I can't find any configuration which allows a workflow like helm delete xxx # Make some changes and repackage chart helm install --replace xxx I don't want to run the release constantly, and I want to reuse the storage in deployments in the future. Setting the storage class to reclaimPolicy: Retain keeps the disks, but helm will delete

Helm: generate comma separated list

若如初见. 提交于 2019-12-04 12:01:44
问题 Using Helm templates, I'm trying to generate a list of server names based on a number in values.yaml. The dot for this template is set to the number (its a float64). {{- define "zkservers" -}} {{- $zkservers := list -}} {{- range int . | until -}} {{- $zkservers := print "zk-" . ".zookeeper" | append $zkservers -}} {{- end -}} {{- join "," $zkservers -}} {{- end -}} For an input of, say, 3 I'm expecting this to produce: zk-0.zookeeper,zk-1.zookeeper,zk-2.zookeeper It produces nothing. I

`Error: could not find tiller` when running `helm version`

坚强是说给别人听的谎言 提交于 2019-12-04 06:58:30
问题 I have minikube and kubectl installed: $ minikube version minikube version: v1.4.0 commit: 7969c25a98a018b94ea87d949350f3271e9d64b6 $ kubectl version Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:

Helm wait till dependency deployment are ready on kubernetes

时间秒杀一切 提交于 2019-12-04 05:30:47
问题 I'm using helm chart to deploy my application on kubernetes. But services that I'm using in my stack depends on other services how do I make sure helm will not deploy until the dependencies are up? 回答1: Typically you don't; you just let Helm (or kubectl apply -f ) start everything in one shot and let it retry starting everything. The most common pattern is for a container process to simply crash at startup if an external service isn't available; the Kubernetes Pod mechanism will restart the

helm overriding Chart and Values yaml from a base template chart

回眸只為那壹抹淺笑 提交于 2019-12-04 04:53:42
I have defined a parent chart called base-microservice and is available at mycompany.github.com/pages/base-microservice Structure is as follows : base-microservice - templates - deployment.yaml - ingress.yaml - service.yaml - Chart.yaml - values.yaml - index.yaml - base-microservice-0.1.0.tgz I would like to define a customapp chart which inherits from the parent chart. Structure is as follows : customapp-service - customapp - Chart.yaml - charts - requirements.yaml - values.yaml - src requirements.yaml is as follows : dependencies: - name: base-microservice repository: https://mycompany