From c2558ba9ab9099b62b1a7cffa33b0494c3b05b1d Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Fri, 18 May 2018 13:49:41 -0500 Subject: [PATCH] Ldap: add image template function and basic tidy of template This PS adds the image template function, and also performs basic tiding of the template. Change-Id: If8f149e9e73a2e8e761c471af0a203c2dae27ff8 Signed-off-by: Pete Birley --- ldap/templates/statefulset.yaml | 41 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/ldap/templates/statefulset.yaml b/ldap/templates/statefulset.yaml index 3b89a7124..e96c489b7 100644 --- a/ldap/templates/statefulset.yaml +++ b/ldap/templates/statefulset.yaml @@ -40,30 +40,29 @@ spec: initContainers: {{ tuple $envAll "ldap" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 6 }} containers: - - name: ldap - image: {{ .Values.images.tags.ldap }} - imagePullPolicy: {{ .Values.images.pull_policy }} - env: - - name: LDAP_DOMAIN - value: {{ .Values.openldap.domain }} - - name: LDAP_ADMIN_PASSWORD - value: {{ .Values.openldap.password }} - ports: - - containerPort: {{ tuple "ldap" "internal" "ldap" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + - name: ldap +{{ tuple $envAll "ldap" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - volumeMounts: - - name: ldap-data - mountPath: /var/lib/ldap - - name: ldap-config - mountPath: /etc/ldap/slapd.d + env: + - name: LDAP_DOMAIN + value: {{ .Values.openldap.domain }} + - name: LDAP_ADMIN_PASSWORD + value: {{ .Values.openldap.password }} + ports: + - containerPort: {{ tuple "ldap" "internal" "ldap" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + volumeMounts: + - name: ldap-data + mountPath: /var/lib/ldap + - name: ldap-config + mountPath: /etc/ldap/slapd.d {{- if not .Values.storage.pvc.enabled }} volumes: - - name: ldap-data - hostPath: - path: {{ .Values.storage.host.data_path }} - - name: ldap-config - hostPath: - path: {{ .Values.storage.host.config_path }} + - name: ldap-data + hostPath: + path: {{ .Values.storage.host.data_path }} + - name: ldap-config + hostPath: + path: {{ .Values.storage.host.config_path }} {{- else }} volumeClaimTemplates: - metadata: