summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-02-06 17:28:53 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-06 17:28:53 +0000
commit18c2dbcdf7904d6a4030efa141fe232009362800 (patch)
tree4be478a8d1ec6ba6d2e1bd2a17d9b2e268885f25 /kubernetes
parentcb8d6dcaf8e8ca842111b4e498b37925da7371d3 (diff)
parent4e6c93342b2383c08c07df1afeef09aa3cee7336 (diff)
Merge "config seg aai elasticsearch"
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/aai/resources/config/elasticsearch/config/elasticsearch.yml (renamed from kubernetes/config/docker/init/src/config/aai/elasticsearch/config/elasticsearch.yml)0
-rw-r--r--kubernetes/aai/templates/elasticsearch-configmap.yaml9
-rw-r--r--kubernetes/aai/templates/elasticsearch-deployment.yaml31
-rw-r--r--kubernetes/aai/values.yaml1
4 files changed, 37 insertions, 4 deletions
diff --git a/kubernetes/config/docker/init/src/config/aai/elasticsearch/config/elasticsearch.yml b/kubernetes/aai/resources/config/elasticsearch/config/elasticsearch.yml
index 21e29df84b..21e29df84b 100644
--- a/kubernetes/config/docker/init/src/config/aai/elasticsearch/config/elasticsearch.yml
+++ b/kubernetes/aai/resources/config/elasticsearch/config/elasticsearch.yml
diff --git a/kubernetes/aai/templates/elasticsearch-configmap.yaml b/kubernetes/aai/templates/elasticsearch-configmap.yaml
new file mode 100644
index 0000000000..4a02346d9a
--- /dev/null
+++ b/kubernetes/aai/templates/elasticsearch-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableAaiElasticsearch }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: aai-elasticsearch-configmap
+ namespace: {{ .Values.nsPrefix }}-aai
+data:
+{{ tpl (.Files.Glob "resources/config/elasticsearch/config/elasticsearch.yml").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/aai/templates/elasticsearch-deployment.yaml b/kubernetes/aai/templates/elasticsearch-deployment.yaml
index 680f942c52..baa1cb8523 100644
--- a/kubernetes/aai/templates/elasticsearch-deployment.yaml
+++ b/kubernetes/aai/templates/elasticsearch-deployment.yaml
@@ -14,6 +14,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 +53,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 +62,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/"
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/aai/values.yaml b/kubernetes/aai/values.yaml
index 692d071d10..6912c7374a 100644
--- a/kubernetes/aai/values.yaml
+++ b/kubernetes/aai/values.yaml
@@ -28,3 +28,4 @@ image:
sparkyBeVersion: v1.1.0
gremlinServerImage: aaionap/gremlin-server
filebeat: docker.elastic.co/beats/filebeat:5.5.0
+ es_bb: busybox