Skip to content

Commit 210f917

Browse files
XSAMfmulero
andauthored
[bitnami/etcd] Add param auth.token.enabled to disable etcd auth (bitnami#14273)
* Add param auth.token.enabled for etcd chart to disable etcd auth Signed-off-by: Sam Xie <sam@samxie.me> * Bump chart version to 8.7.0 Signed-off-by: Sam Xie <sam@samxie.me> * Update README Signed-off-by: Sam Xie <sam@samxie.me> Signed-off-by: Sam Xie <sam@samxie.me> Co-authored-by: Fran Mulero <fmulero@vmware.com>
1 parent 0a287df commit 210f917

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

bitnami/etcd/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ name: etcd
2626
sources:
2727
- https://github.com/bitnami/containers/tree/main/bitnami/etcd
2828
- https://coreos.com/etcd/
29-
version: 8.6.0
29+
version: 8.7.0

bitnami/etcd/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ The command removes all the Kubernetes components associated with the chart and
9393
| `auth.rbac.rootPassword` | Root user password. The root user is always `root` | `""` |
9494
| `auth.rbac.existingSecret` | Name of the existing secret containing credentials for the root user | `""` |
9595
| `auth.rbac.existingSecretPasswordKey` | Name of key containing password to be retrieved from the existing secret | `""` |
96+
| `auth.token.enabled` | Enables token authentication | `true` |
9697
| `auth.token.type` | Authentication token type. Allowed values: 'simple' or 'jwt' | `jwt` |
9798
| `auth.token.privateKey.filename` | Name of the file containing the private key for signing the JWT token | `jwt-token.pem` |
9899
| `auth.token.privateKey.existingSecret` | Name of the existing secret containing the private key for signing the JWT token | `""` |

bitnami/etcd/templates/_helpers.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Get the secret password key to be retrieved from etcd secret.
110110
Return true if a secret object should be created for the etcd token private key
111111
*/}}
112112
{{- define "etcd.token.createSecret" -}}
113-
{{- if and (eq .Values.auth.token.type "jwt") (empty .Values.auth.token.privateKey.existingSecret) }}
113+
{{- if and (eq .Values.auth.token.enabled true) (eq .Values.auth.token.type "jwt") (empty .Values.auth.token.privateKey.existingSecret) }}
114114
{{- true -}}
115115
{{- end -}}
116116
{{- end -}}

bitnami/etcd/templates/statefulset.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,14 @@ spec:
162162
name: {{ include "etcd.secretName" . }}
163163
key: {{ include "etcd.secretPasswordKey" . }}
164164
{{- end }}
165+
{{- if .Values.auth.token.enabled }}
165166
- name: ETCD_AUTH_TOKEN
166167
{{- if eq .Values.auth.token.type "jwt" }}
167168
value: {{ printf "jwt,priv-key=/opt/bitnami/etcd/certs/token/%s,sign-method=%s,ttl=%s" .Values.auth.token.privateKey.filename .Values.auth.token.signMethod .Values.auth.token.ttl | quote }}
168169
{{- else if eq .Values.auth.token.type "simple" }}
169170
value: "simple"
170171
{{- end }}
172+
{{- end }}
171173
- name: ETCD_ADVERTISE_CLIENT_URLS
172174
value: "{{ $etcdClientProtocol }}://$(MY_POD_NAME).{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}:{{ .Values.containerPorts.client }},{{ $etcdClientProtocol }}://{{ $etcdFullname }}.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}:{{ coalesce .Values.service.ports.client .Values.service.port }}"
173175
- name: ETCD_LISTEN_CLIENT_URLS

bitnami/etcd/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ auth:
117117
## ref: https://etcd.io/docs/latest/learning/design-auth-v3/#two-types-of-tokens-simple-and-jwt
118118
##
119119
token:
120+
## @param auth.token.enabled Enables token authentication
121+
##
122+
enabled: true
120123
## @param auth.token.type Authentication token type. Allowed values: 'simple' or 'jwt'
121124
## ref: https://etcd.io/docs/latest/op-guide/configuration/#--auth-token
122125
##

0 commit comments

Comments
 (0)