Skip to content

Commit b0b287d

Browse files
author
Ubuntu
committed
fix #162
1 parent 5c76b97 commit b0b287d

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: |
2323
curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v0.23.0/kind-linux-amd64
2424
chmod +x /tmp/kind
25-
/tmp/kind create cluster --config=$GITHUB_WORKSPACE/.bin/kind-conf.yml --image=kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e
25+
/tmp/kind create cluster --config=$GITHUB_WORKSPACE/.bin/kind-conf.yml --image=kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8
2626
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
2727
kubectl patch daemonsets -n projectcontour envoy -p '{"spec":{"template":{"spec":{"nodeSelector":{"ingress-ready":"true"}}}}}'
2828
- name: setup chaos mesh

templates/serviceaccount.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.serviceAccount.create -}}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "openldap.serviceAccountName" . }}
6+
namespace: {{ .Release.Namespace | quote }}
7+
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
8+
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
9+
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
10+
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
11+
{{- end }}
12+
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
13+
{{- end -}}

templates/statefulset.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ spec:
142142
- mountPath: /bitnami
143143
name: data
144144
{{- end }}
145-
{{- /*
146-
serviceAccountName: {{ template "openldap.serviceAccountName" . }}
147-
*/ -}}
145+
146+
serviceAccountName: {{ template "openldap.serviceAccountName" . }}
148147
{{- include "openldap.imagePullSecrets" . | nindent 6 }}
149148
{{- if .Values.hostAliases }}
150149
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
@@ -363,4 +362,4 @@ spec:
363362
{{- else if (not .Values.persistence.enabled) }}
364363
- name: data
365364
emptyDir: {}
366-
{{- end }}
365+
{{- end }}

values.yaml

+12-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pdb:
122122
# userPasswords: bitnami1, bitnami2
123123

124124
## Group to create and add list of user above
125-
## Default set by bitnami image
125+
## Default set by bitnami image
126126
# group: readers
127127

128128
# Custom openldap schema files used to be used in addition to default schemas
@@ -365,16 +365,25 @@ sidecars: {}
365365
## command: ['sh', '-c', 'echo "hello world"']
366366
##
367367
initContainers: {}
368-
## ServiceAccount configuration
368+
369+
## Service Account
370+
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
369371
##
370372
serviceAccount:
371-
## @param serviceAccount.create Specifies whether a ServiceAccount should be created
373+
## @param serviceAccount.create Enable creation of ServiceAccount for Apache pod
372374
##
373375
create: true
374376
## @param serviceAccount.name The name of the ServiceAccount to use.
375377
## If not set and create is true, a name is generated using the common.names.fullname template
376378
##
377379
name: ""
380+
## @param serviceAccount.automountServiceAccountToken Allows auto mount of ServiceAccountToken on the serviceAccount created
381+
## Can be set to false if pods using this serviceAccount do not need to use K8s API
382+
##
383+
automountServiceAccountToken: false
384+
## @param serviceAccount.annotations Additional custom annotations for the ServiceAccount
385+
##
386+
annotations: {}
378387

379388
## @section Init Container Parameters
380389

0 commit comments

Comments
 (0)