Merge "change in log config seg"
authorAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Wed, 24 Jan 2018 17:45:39 +0000 (17:45 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 24 Jan 2018 17:45:39 +0000 (17:45 +0000)
kubernetes/log/templates/elasticsearch-deployment.yaml
kubernetes/log/values.yaml

index 74ab921..bbf7260 100644 (file)
@@ -18,9 +18,14 @@ spec:
     spec:
       initContainers:
       - command:
-        - sysctl
-        - -w
-        - vm.max_map_count=262144
+        - /bin/sh
+        - -c
+        - |
+          sysctl -w vm.max_map_count=262144
+          mkdir -p /logroot/elasticsearch/logs
+          mkdir -p /logroot/elasticsearch/data
+          chmod -R 777 /logroot/elasticsearch
+          chown -R root:root /logroot
         env:
         - name: NAMESPACE
           valueFrom:
@@ -32,6 +37,9 @@ spec:
         image: {{ .Values.image.es_bb }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: init-sysctl
+        volumeMounts:
+        - name: elasticsearch-logs
+          mountPath: /logroot/
       containers:
       - name: elasticsearch
         image: {{ .Values.image.elasticsearch}}
@@ -59,7 +67,7 @@ spec:
             claimName: elasticsearch-db
         - name: elasticsearch-logs
           hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/elasticsearch/logs
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/
         - name: elasticsearch-conf
           configMap:
             name: elasticsearch-configmap
index 0441830..3ee3529 100644 (file)
@@ -1,5 +1,5 @@
 nsPrefix: onap
-pullPolicy: Always 
+pullPolicy: Always
 nodePortPrefix: 302
 image:
   readiness: oomk8s/readiness-check:1.0.0
@@ -7,4 +7,3 @@ image:
   kibana: docker.elastic.co/kibana/kibana:5.5.0
   elasticsearch: docker.elastic.co/elasticsearch/elasticsearch:5.5.0
   es_bb: busybox
-