kubernetes-helm

Latest RabbitMQ release with exchange type x-modulus-hash?

六眼飞鱼酱① 提交于 2020-02-06 07:56:36
问题 I understand that the exchange type x-modulus-hash has given its place to x-consistent-hash . I am trying to deploy an app, the source code for which uses x-modulus-hash and I can't change it. Which version of RabbitMQ should I revert back to? I am deploying the app using the stolon/rabbitmq-ha helm chart. It would be more useful to know the suitable version for this chart. 回答1: Alright, my bad! x-modulus-hash has not been discontinued. It is an exchange type that will be add when the

Combining multiple k8s secrets into an env variable

柔情痞子 提交于 2020-02-04 08:42:16
问题 My k8s namespace contains a Secret which is created at deployment time (by svcat ), so the values are not known in advance. apiVersion: v1 kind: Secret type: Opaque metadata: name: my-database-credentials data: hostname: ... port: ... database: ... username: ... password: ... A Deployment needs to inject these values in a slightly different format: ... containers: env: - name: DATABASE_URL valueFrom: secretKeyRef: name: my-database-credentials key: jdbc:postgresql:<hostname>:<port>/<database>

Dynamic namespace variable in helm chart

情到浓时终转凉″ 提交于 2020-02-04 01:54:10
问题 I work with four teams that are using exactly the same environments that are set up in kubernetes namespaces. I have created helm charts to install those environments. Everything works fine but I have to create ingresses by hand because of the following format in hostname: <namespace>.<app>.<k8sdomain> The thing is I would like to just change context with kubectl and then run those charts instead of editing every single values.yaml to change namespace variable. Is it possible to use some

Define values for each namespace

家住魔仙堡 提交于 2020-01-30 08:07:46
问题 values.yaml replicas: { test: 1, stage: 2, prod: 3 } Here I am trying to use Helm templates to define number of replicas per namespace but am unsure of the proper syntax and pattern: deployment.yaml replicas: {{ .Values.replicas.{{ .Release.Namespace }} }} So if this were deployed to --namespace=prod , I would expect the template to return: # .Values.replicas.prod replicas: 3 回答1: All of the template functions provided by the standard Go text/template library are available. In particular,

How to use key value pair in kubernetes configmaps to mount volume

倖福魔咒の 提交于 2020-01-25 09:32:44
问题 I have created a kubernetes configmap which contains multiple key value pairs. I want to mount each value in a different path. Im using helm to create charts. apiVersion: v1 kind: ConfigMap metadata: name: {{ .Values.name }}-configmap namespace: {{ .Values.namespace }} labels: name: {{ .Values.name }}-configmap data: test1.yml: |- {{ .Files.Get .Values.test1_filename }} test2.yml: |- {{ .Files.Get .Values.test2_filename }} I want test1.yml and test2.yml to be mounted in different directories

Store Kubernetes Cluster Credentials in Jenkins and use in declarative pipeline

会有一股神秘感。 提交于 2020-01-25 09:26:11
问题 I am trying to deploy k8s cluster using Helm 3 and jenkins. Jenkins and k8s running on different servers.I merged the kubeconfig files and I had all information in one config file ./kube directory. I would like to deploy my app to the related environment and namespace according to the GIT_BRANCH value. I have two question for below script. 1.What is the best way should I store k8s cluster credentials and will use in pipeline. I saw some plugins such as Kubernetes CLI but I can not be sure

Use of Requirements.lock file in Helm charts

烈酒焚心 提交于 2020-01-23 02:16:27
问题 I am trying to understand the usage of Requirements.lock file . For using a dependent chart , we can make use of Requirements.yaml . Based on documentation Requirements.lock : rebuild the charts/ directory based on the requirements.lock file Requirements.yaml : update charts/ based on the contents of requirements.yaml Can someone explain the difference and usage of lock file and do we need to checking requirements.lock file in the repo too ? 回答1: This article says it well: Much like a runtime

how can i reference the namespace in values.yaml?

北慕城南 提交于 2020-01-15 05:45:10
问题 I would like to be able to reference the current namespace in values.yaml to use it to suffix some values like this # in values.yaml someParam: someval-{{ .Release.Namespace }} It much nicer to define it this way instead of going into all my templates and adding {{ .Release.Namespace }} . If I can do it in values.yaml it's much clearer and only needs to be defined in one place. 回答1: You can use named templates to define re-usable helper templates. E.g. In templates/_helpers.tpl : {{- define

How to use --set to set values with Prometheus chart?

你离开我真会死。 提交于 2020-01-14 12:50:04
问题 For example, set alertmanager.ingress.annotations to add two items, both of these two methods not work: $ helm install stable/prometheus \ --set alertmanager.ingress.enabled=true \ --set "alertmanager.ingress.annotations={alb.ingress.kubernetes.io/scheme: internet-facing, alb.ingress.kubernetes.io/tags: Environment=dev,Team=test}" Error: YAML parse error on prometheus/templates/alertmanager-ingress.yaml: error unmarshaling JSON: json: cannot unmarshal array into Go struct field .annotations

How to use --set to set values with Prometheus chart?

风格不统一 提交于 2020-01-14 12:49:09
问题 For example, set alertmanager.ingress.annotations to add two items, both of these two methods not work: $ helm install stable/prometheus \ --set alertmanager.ingress.enabled=true \ --set "alertmanager.ingress.annotations={alb.ingress.kubernetes.io/scheme: internet-facing, alb.ingress.kubernetes.io/tags: Environment=dev,Team=test}" Error: YAML parse error on prometheus/templates/alertmanager-ingress.yaml: error unmarshaling JSON: json: cannot unmarshal array into Go struct field .annotations