Skip to content

Commit

Permalink
fix #162
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed May 21, 2024
1 parent 5c76b97 commit b0b287d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v0.23.0/kind-linux-amd64
chmod +x /tmp/kind
/tmp/kind create cluster --config=$GITHUB_WORKSPACE/.bin/kind-conf.yml --image=kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e
/tmp/kind create cluster --config=$GITHUB_WORKSPACE/.bin/kind-conf.yml --image=kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
kubectl patch daemonsets -n projectcontour envoy -p '{"spec":{"template":{"spec":{"nodeSelector":{"ingress-ready":"true"}}}}}'
- name: setup chaos mesh
Expand Down
13 changes: 13 additions & 0 deletions templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "openldap.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end -}}
7 changes: 3 additions & 4 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ spec:
- mountPath: /bitnami
name: data
{{- end }}
{{- /*
serviceAccountName: {{ template "openldap.serviceAccountName" . }}
*/ -}}

serviceAccountName: {{ template "openldap.serviceAccountName" . }}
{{- include "openldap.imagePullSecrets" . | nindent 6 }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
Expand Down Expand Up @@ -363,4 +362,4 @@ spec:
{{- else if (not .Values.persistence.enabled) }}
- name: data
emptyDir: {}
{{- end }}
{{- end }}
15 changes: 12 additions & 3 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pdb:
# userPasswords: bitnami1, bitnami2

## Group to create and add list of user above
## Default set by bitnami image
## Default set by bitnami image
# group: readers

# Custom openldap schema files used to be used in addition to default schemas
Expand Down Expand Up @@ -365,16 +365,25 @@ sidecars: {}
## command: ['sh', '-c', 'echo "hello world"']
##
initContainers: {}
## ServiceAccount configuration

## Service Account
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:
## @param serviceAccount.create Specifies whether a ServiceAccount should be created
## @param serviceAccount.create Enable creation of ServiceAccount for Apache pod
##
create: true
## @param serviceAccount.name The name of the ServiceAccount to use.
## If not set and create is true, a name is generated using the common.names.fullname template
##
name: ""
## @param serviceAccount.automountServiceAccountToken Allows auto mount of ServiceAccountToken on the serviceAccount created
## Can be set to false if pods using this serviceAccount do not need to use K8s API
##
automountServiceAccountToken: false
## @param serviceAccount.annotations Additional custom annotations for the ServiceAccount
##
annotations: {}

## @section Init Container Parameters

Expand Down

0 comments on commit b0b287d

Please sign in to comment.