Fix consul agent start problems 13/42513/1
authorBorislavG <Borislav.Glozman@amdocs.com>
Thu, 12 Apr 2018 13:57:58 +0000 (13:57 +0000)
committerBorislavG <Borislav.Glozman@amdocs.com>
Thu, 12 Apr 2018 13:57:58 +0000 (13:57 +0000)
Change-Id: I62f394b2608c8ac16c97b90658b0d4fc722659c5
Issue-ID: OOM-913
Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
kubernetes/consul/templates/deployment.yaml
kubernetes/consul/values.yaml

index 68b2391..e984e2a 100644 (file)
@@ -36,11 +36,15 @@ spec:
     spec:
       containers:
       - image: "{{ .Values.repository | default .Values.global.repository }}/{{ .Values.image }}"
-        command: ["/usr/local/bin/docker-entrypoint.sh"]
-        args: ["agent","-client","0.0.0.0","-enable-script-checks","-join","{{ .Release.Name }}-{{ index .Values "consul-server" "nameOverride" }}.{{ include "common.namespace" .}}"]
+        command:
+        - /bin/sh
+        - "-c"
+        - |
+          cp /tmp/consul/config/* /consul/config
+          /usr/local/bin/docker-entrypoint.sh agent -client 0.0.0.0 -enable-script-checks -join {{ .Release.Name }}-{{ .Values.consulServer.nameOverride }}.{{ include "common.namespace" .}}
         name: {{ include "common.name" . }}
         volumeMounts:
-        - mountPath: /consul/config
+        - mountPath: /tmp/consul/config
           name: consul-agent-config
         - mountPath: /consul/scripts
           name: consul-agent-scripts-config
index 74d0ccd..ee26f54 100644 (file)
@@ -32,7 +32,7 @@ image: consul:1.0.0
 pullPolicy: Always
 
 #subchart name
-consul-server:
+consulServer:
   nameOverride: consul-server
 
 # flag to enable debugging - application support required