From bff1e70da072b72d75d2821ebf003c371b067a79 Mon Sep 17 00:00:00 2001 From: matt-everett Date: Wed, 19 Jun 2019 07:13:44 +0100 Subject: [PATCH 1/3] Use the popular 'fullname' template definition. The template definition for 'fullname' usually incorporates the ability to not prepend the release name by using the chart name in the release name. This is useful for spinning up multiple charts with default service names, avoiding the need to spread knowledge of release names for simple deployment scenarios. --- bitnami/etcd/templates/_helpers.tpl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bitnami/etcd/templates/_helpers.tpl b/bitnami/etcd/templates/_helpers.tpl index 4bcdccbd5..d9e21f887 100644 --- a/bitnami/etcd/templates/_helpers.tpl +++ b/bitnami/etcd/templates/_helpers.tpl @@ -11,8 +11,16 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "etcd.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} {{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} {{- end -}} {{/* From ff567648c005878b3d1be21e5e496b0b3048dfe7 Mon Sep 17 00:00:00 2001 From: Matt Everett Date: Wed, 19 Jun 2019 16:55:54 +0100 Subject: [PATCH 2/3] Add nameOverride and fullnameOverride documentation. --- bitnami/etcd/README.md | 132 +++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 65 deletions(-) diff --git a/bitnami/etcd/README.md b/bitnami/etcd/README.md index 5409ca473..72eaf08a6 100644 --- a/bitnami/etcd/README.md +++ b/bitnami/etcd/README.md @@ -45,70 +45,72 @@ The command removes all the Kubernetes components associated with the chart and The following tables lists the configurable parameters of the etcd chart and their default values. -| Parameter | Description | Default | -|---------------------------------------|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------- | -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.registry` | etcd image registry | `docker.io` | -| `image.repository` | etcd Image name | `bitnami/etcd` | -| `image.tag` | etcd Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | etcd image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug values should be set | `false` | -| `statefulset.updateStrategy` | Update strategy for the stateful set | `RollingUpdate` | -| `statefulset.rollingUpdatePartition` | Partition for Rolling Update strategy | `nil` | -| `statefulset.podManagementPolicy` | Pod management policy for the stateful set | `OrderedReady` | -| `statefulset.replicaCount` | Number of etcd nodes | `1` | -| `configFileConfigMap` | ConfigMap that contains a etcd.conf.yaml to be mounted | `nil` | -| `envVarsConfigMap` | ConfigMap that contains environment variables to be set in the container | `nil` | -| `allowNoneAuthentication` | Allow to use etcd without configuring RBAC authentication | `true` | -| `maxProcs` | Set GOMAXPROCS environment variable to limit the number of CPUs | `nil` | -| `auth.rbac.enabled` | Switch to enable the etcd authentication. | `true` | -| `auth.rbac.rootPassword` | Password for the root user | `nil` | -| `auth.rbac.existingSecret` | Name of the existing secret containing the root password | `nil` | -| `auth.client.secureTransport` | Switch to encrypt client communication using TLS certificates | `false` | -| `auth.client.useAutoTLS` | Switch to automatically create the TLS certificates | `false` | -| `auth.client.enableAuthentication` | Switch to enable host authentication using TLS certificates. Requires existing secret. | `secret` | -| `auth.client.existingSecret` | Name of the existing secret containing cert files for client communication. | `nil` | -| `auth.peer.secureTransport` | Switch to encrypt peer communication using TLS certificates | `false` | -| `auth.peer.useAutoTLS` | Switch to automatically create the TLS certificates | `false` | -| `auth.peer.enableAuthentication` | Switch to enable host authentication using TLS certificates. Requires existing secret. | `false` | -| `auth.peer.existingSecret` | Name of the existing secret containing cert files for peer communication. | `nil` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `service.dnsBase` | Kubernetes service cluster dns base name | svc.cluster.local | -| `service.type` | Kubernetes Service type | `ClusterIP` | -| `service.port` | etcd client port | `2379` | -| `service.nodePort` | Port to bind to for NodePort service type (client port) | `nil` | -| `service.peerPort` | etcd peer port | `2380` | -| `service.peerNodePort` | Port to bind to for NodePort service type (peer port) | `nil` | -| `service.annotations` | Annotations for etcd service | {} | -| `service.loadBalancerIP` | loadBalancerIP if etcd service type is `LoadBalancer` | `nil` | -| `persistence.enabled` | Enable persistence using PVC | `true` | -| `persistence.storageClass` | PVC Storage Class for etcd volume | `nil` | -| `persistence.accessMode` | PVC Access Mode for etcd volume | `ReadWriteOnce` | -| `persistence.size` | PVC Storage Request for etcd volume | `8Gi` | -| `persistence.annotations` | Annotations for the PVC | `{}` | -| `affinity` | Affinity and AntiAffinity rules for pod assignment | `{}` | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `tolerations` | Toleration labels for pod assignment | `[]` | -| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `250m` | -| `livenessProbe.enabled` | Turn on and off liveness probe | `true` | -| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 10 | -| `livenessProbe.periodSeconds` | How often to perform the probe | 10 | -| `livenessProbe.timeoutSeconds` | When the probe times out | 5 | -| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 2 | -| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 | -| `readinessProbe.enabled` | Turn on and off readiness probe | `true` | -| `readinessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 5 | -| `readinessProbe.periodSeconds` | How often to perform the probe | 10 | -| `readinessProbe.timeoutSeconds` | When the probe times out | 5 | -| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 | -| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 | -| `podAnnotations` | Annotations to be added to pods | {} | -| `metrics.enabled` | Enable prometheus to access etcd metrics endpoint | `false` | -| `metrics.podAnnotations` | Annotations for enabling prometheus to access the metrics endpoint | {`prometheus.io/scrape: "true",prometheus.io/port: "2379"`} | +| Parameter | Description | Default | +| ------------------------------------ | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.registry` | etcd image registry | `docker.io` | +| `image.repository` | etcd Image name | `bitnami/etcd` | +| `image.tag` | etcd Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | etcd image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug values should be set | `false` | +| `nameOverride` | String to partially override etcd.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override etcd.fullname template with a string | `nil` | +| `statefulset.updateStrategy` | Update strategy for the stateful set | `RollingUpdate` | +| `statefulset.rollingUpdatePartition` | Partition for Rolling Update strategy | `nil` | +| `statefulset.podManagementPolicy` | Pod management policy for the stateful set | `OrderedReady` | +| `statefulset.replicaCount` | Number of etcd nodes | `1` | +| `configFileConfigMap` | ConfigMap that contains a etcd.conf.yaml to be mounted | `nil` | +| `envVarsConfigMap` | ConfigMap that contains environment variables to be set in the container | `nil` | +| `allowNoneAuthentication` | Allow to use etcd without configuring RBAC authentication | `true` | +| `maxProcs` | Set GOMAXPROCS environment variable to limit the number of CPUs | `nil` | +| `auth.rbac.enabled` | Switch to enable the etcd authentication. | `true` | +| `auth.rbac.rootPassword` | Password for the root user | `nil` | +| `auth.rbac.existingSecret` | Name of the existing secret containing the root password | `nil` | +| `auth.client.secureTransport` | Switch to encrypt client communication using TLS certificates | `false` | +| `auth.client.useAutoTLS` | Switch to automatically create the TLS certificates | `false` | +| `auth.client.enableAuthentication` | Switch to enable host authentication using TLS certificates. Requires existing secret. | `secret` | +| `auth.client.existingSecret` | Name of the existing secret containing cert files for client communication. | `nil` | +| `auth.peer.secureTransport` | Switch to encrypt peer communication using TLS certificates | `false` | +| `auth.peer.useAutoTLS` | Switch to automatically create the TLS certificates | `false` | +| `auth.peer.enableAuthentication` | Switch to enable host authentication using TLS certificates. Requires existing secret. | `false` | +| `auth.peer.existingSecret` | Name of the existing secret containing cert files for peer communication. | `nil` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `service.dnsBase` | Kubernetes service cluster dns base name | svc.cluster.local | +| `service.type` | Kubernetes Service type | `ClusterIP` | +| `service.port` | etcd client port | `2379` | +| `service.nodePort` | Port to bind to for NodePort service type (client port) | `nil` | +| `service.peerPort` | etcd peer port | `2380` | +| `service.peerNodePort` | Port to bind to for NodePort service type (peer port) | `nil` | +| `service.annotations` | Annotations for etcd service | {} | +| `service.loadBalancerIP` | loadBalancerIP if etcd service type is `LoadBalancer` | `nil` | +| `persistence.enabled` | Enable persistence using PVC | `true` | +| `persistence.storageClass` | PVC Storage Class for etcd volume | `nil` | +| `persistence.accessMode` | PVC Access Mode for etcd volume | `ReadWriteOnce` | +| `persistence.size` | PVC Storage Request for etcd volume | `8Gi` | +| `persistence.annotations` | Annotations for the PVC | `{}` | +| `affinity` | Affinity and AntiAffinity rules for pod assignment | `{}` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | Toleration labels for pod assignment | `[]` | +| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `250m` | +| `livenessProbe.enabled` | Turn on and off liveness probe | `true` | +| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 10 | +| `livenessProbe.periodSeconds` | How often to perform the probe | 10 | +| `livenessProbe.timeoutSeconds` | When the probe times out | 5 | +| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 2 | +| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 | +| `readinessProbe.enabled` | Turn on and off readiness probe | `true` | +| `readinessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 5 | +| `readinessProbe.periodSeconds` | How often to perform the probe | 10 | +| `readinessProbe.timeoutSeconds` | When the probe times out | 5 | +| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 | +| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | 1 | +| `podAnnotations` | Annotations to be added to pods | {} | +| `metrics.enabled` | Enable prometheus to access etcd metrics endpoint | `false` | +| `metrics.podAnnotations` | Annotations for enabling prometheus to access the metrics endpoint | {`prometheus.io/scrape: "true",prometheus.io/port: "2379"`} | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, @@ -275,4 +277,4 @@ Use the workaround below to upgrade from versions previous to 1.0.0. The followi ```console $ kubectl delete statefulset etcd --cascade=false -``` \ No newline at end of file +``` From 473aa3c41255e9b59fe5ddc2564c6bea68e8cb3d Mon Sep 17 00:00:00 2001 From: Matt Everett Date: Tue, 25 Jun 2019 13:46:26 +0100 Subject: [PATCH 3/3] Add nameOverride/fullnameOverride examples to values*.yaml and update version. --- bitnami/etcd/Chart.yaml | 2 +- bitnami/etcd/values-production.yaml | 6 ++++++ bitnami/etcd/values.yaml | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bitnami/etcd/Chart.yaml b/bitnami/etcd/Chart.yaml index 69d329d85..e0b59aae5 100644 --- a/bitnami/etcd/Chart.yaml +++ b/bitnami/etcd/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: etcd -version: 2.3.3 +version: 2.4.0 appVersion: 3.3.13 description: etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines keywords: diff --git a/bitnami/etcd/values-production.yaml b/bitnami/etcd/values-production.yaml index 21609ba28..30881b1a1 100644 --- a/bitnami/etcd/values-production.yaml +++ b/bitnami/etcd/values-production.yaml @@ -31,6 +31,12 @@ image: ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging debug: false + ## String to partially override etcd.fullname template (will maintain the release name) + # nameOverride: + + ## String to fully override etcd.fullname template + # fullnameOverride: + statefulset: ## Update strategy, can be set to RollingUpdate or OnDelete by default. ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets diff --git a/bitnami/etcd/values.yaml b/bitnami/etcd/values.yaml index d439bf260..b95d04517 100644 --- a/bitnami/etcd/values.yaml +++ b/bitnami/etcd/values.yaml @@ -31,6 +31,12 @@ image: ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging debug: false + ## String to partially override etcd.fullname template (will maintain the release name) + # nameOverride: + + ## String to fully override etcd.fullname template + # fullnameOverride: + statefulset: ## Update strategy, can be set to RollingUpdate or OnDelete by default. ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets