summaryrefslogtreecommitdiffstats
path: root/components/aai-elasticsearch
diff options
context:
space:
mode:
Diffstat (limited to 'components/aai-elasticsearch')
-rw-r--r--components/aai-elasticsearch/templates/deployment.yaml7
-rw-r--r--components/aai-elasticsearch/templates/pv.yaml42
-rw-r--r--components/aai-elasticsearch/templates/pvc.yaml36
-rw-r--r--components/aai-elasticsearch/values.yaml4
4 files changed, 84 insertions, 5 deletions
diff --git a/components/aai-elasticsearch/templates/deployment.yaml b/components/aai-elasticsearch/templates/deployment.yaml
index 0c54738..3b8141c 100644
--- a/components/aai-elasticsearch/templates/deployment.yaml
+++ b/components/aai-elasticsearch/templates/deployment.yaml
@@ -60,7 +60,7 @@ spec:
- name: elasticsearch-data
mountPath: /logroot/
containers:
- - name: {{ include "common.name" . }}
+ - name: {{ include "common.name" . }}
image: "{{ .Values.global.loggingRepository }}/{{ .Values.image }}"
imagePullPolicy: {{ .Values.pullPolicy | default .Values.global.pullPolicy }}
ports:
@@ -105,7 +105,6 @@ spec:
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
-
volumes:
- name: localtime
hostPath:
@@ -114,8 +113,8 @@ spec:
configMap:
name: {{ include "common.fullname" . }}-es-config
- name: elasticsearch-data
- hostPath:
- path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+ persistentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}-data
restartPolicy: {{ .Values.restartPolicy }}
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/components/aai-elasticsearch/templates/pv.yaml b/components/aai-elasticsearch/templates/pv.yaml
new file mode 100644
index 0000000..f62c040
--- /dev/null
+++ b/components/aai-elasticsearch/templates/pv.yaml
@@ -0,0 +1,42 @@
+{{/*
+# Copyright ▒ 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+{{- if eq "True" (include "common.needPV" .) -}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+ name: {{ include "common.fullname" . }}
+ annotations:
+ "helm.sh/hook": pre-upgrade,pre-install
+ "helm.sh/hook-weight": "0"
+ "helm.sh/hook-delete-policy": before-hook-creation
+spec:
+ capacity:
+ storage: {{ .Values.persistence.size}}
+ accessModes:
+ - {{ .Values.persistence.accessMode }}
+ persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+ storageClassName: "{{ include "common.fullname" . }}-data"
+ hostPath:
+ path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}} \ No newline at end of file
diff --git a/components/aai-elasticsearch/templates/pvc.yaml b/components/aai-elasticsearch/templates/pvc.yaml
new file mode 100644
index 0000000..a3425d3
--- /dev/null
+++ b/components/aai-elasticsearch/templates/pvc.yaml
@@ -0,0 +1,36 @@
+{{/*
+# Copyright ▒ 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+ name: {{ include "common.fullname" . }}-data
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+{{- if .Values.persistence.annotations }}
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+ accessModes:
+ - {{ .Values.persistence.accessMode }}
+ resources:
+ requests:
+ storage: {{ .Values.persistence.size }}
+ storageClassName: {{ include "common.storageClass" . }}
diff --git a/components/aai-elasticsearch/values.yaml b/components/aai-elasticsearch/values.yaml
index dff0703..a07423d 100644
--- a/components/aai-elasticsearch/values.yaml
+++ b/components/aai-elasticsearch/values.yaml
@@ -17,6 +17,8 @@
# Declare variables to be passed into your templates.
global: # global defaults
nodePortPrefix: 302
+ persistence:
+ mountPath: /dockerdata-nfs
# application image
image: elasticsearch/elasticsearch:6.1.2
@@ -82,7 +84,7 @@ persistence:
## GKE, AWS & OpenStack)
##
## storageClass: "-"
- accessMode: ReadWriteMany
+ accessMode: ReadWriteOnce
size: 2Gi
mountPath: /dockerdata-nfs
mountSubPath: aai/elasticsearch/data