X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Faai%2Ftemplates%2Felasticsearch-deployment.yaml;h=7eae172c3bbc6f1af2e1cc97a1ffbc41a6819c89;hb=b19df8009d73ba3273f3529fced4c96c2cc4a4a6;hp=680f942c52939a90fea2346ab74017e915128601;hpb=fcef994a85ee1e2f581e2dc2d2f2ab968632db25;p=oom.git diff --git a/kubernetes/aai/templates/elasticsearch-deployment.yaml b/kubernetes/aai/templates/elasticsearch-deployment.yaml index 680f942c52..7eae172c3b 100644 --- a/kubernetes/aai/templates/elasticsearch-deployment.yaml +++ b/kubernetes/aai/templates/elasticsearch-deployment.yaml @@ -5,6 +5,7 @@ metadata: name: elasticsearch namespace: "{{ .Values.nsPrefix }}-aai" spec: + replicas: {{ .Values.elasticsearchReplicas }} selector: matchLabels: app: elasticsearch @@ -14,6 +15,28 @@ spec: app: elasticsearch name: elasticsearch spec: + initContainers: + - command: + - /bin/sh + - -c + - | + mkdir -p /logroot/elasticsearch/es-data + chmod -R 777 /logroot/elasticsearch/es-data + chown -R root:root /logroot + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + securityContext: + privileged: true + image: {{ .Values.image.es_bb }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: init-sysctl + volumeMounts: + - name: elasticsearch-data + mountPath: /logroot/ hostname: elasticsearch containers: - name: elasticsearch @@ -31,6 +54,7 @@ spec: mountPath: /etc/localtime readOnly: true - name: elasticsearch-config + subPath: elasticsearch.yml mountPath: /usr/share/elasticsearch/config/elasticsearch.yml - name: elasticsearch-data mountPath: /usr/share/elasticsearch/data @@ -39,11 +63,11 @@ spec: hostPath: path: /etc/localtime - name: elasticsearch-config - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/config/elasticsearch.yml" + configMap: + name: aai-elasticsearch-configmap - name: elasticsearch-data hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/es-data" + path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/data" imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }} \ No newline at end of file +#{{ end }}