From e3c0e941312d3b5c9c957d3223354dc91a746bf2 Mon Sep 17 00:00:00 2001 From: Vilmos Nebehaj Date: Tue, 18 Sep 2018 16:03:59 -0700 Subject: [PATCH 1/3] Fix javaweb example The image used for the init container runs /mv.sh, which executes `tail -f /etc/hosts` as its last command. Since this command will block forever, an explicit command should be specified for this container that just copies the sample war file to /app (otherwise the pod will get stuck forever, waiting for the init container to succeed). --- staging/javaweb-tomcat-sidecar/javaweb.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/javaweb-tomcat-sidecar/javaweb.yaml b/staging/javaweb-tomcat-sidecar/javaweb.yaml index 578f291df..776b2cd31 100644 --- a/staging/javaweb-tomcat-sidecar/javaweb.yaml +++ b/staging/javaweb-tomcat-sidecar/javaweb.yaml @@ -6,6 +6,7 @@ spec: initContainers: - image: resouer/sample:v1 name: war + command: ["sh", "-c", "cp /sample.war /app"] volumeMounts: - mountPath: /app name: app-volume From 724fd94417b8ec0527c70d8e2e991c6262af57c5 Mon Sep 17 00:00:00 2001 From: Vilmos Nebehaj Date: Tue, 18 Sep 2018 16:08:47 -0700 Subject: [PATCH 2/3] Fix indentation in javaweb-2.yaml --- staging/javaweb-tomcat-sidecar/javaweb-2.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/staging/javaweb-tomcat-sidecar/javaweb-2.yaml b/staging/javaweb-tomcat-sidecar/javaweb-2.yaml index 283a13b78..ba9179615 100644 --- a/staging/javaweb-tomcat-sidecar/javaweb-2.yaml +++ b/staging/javaweb-tomcat-sidecar/javaweb-2.yaml @@ -6,10 +6,10 @@ spec: initContainers: - image: resouer/sample:v2 name: war - command: - - "cp" - - "/sample.war" - - "/app" + command: + - "cp" + - "/sample.war" + - "/app" volumeMounts: - mountPath: /app name: app-volume From 1f595fb6695f58011ec990478d8918e0705438de Mon Sep 17 00:00:00 2001 From: Vilmos Nebehaj Date: Wed, 19 Sep 2018 08:38:42 -0700 Subject: [PATCH 3/3] Make command consistent in javaweb examples --- staging/javaweb-tomcat-sidecar/javaweb-2.yaml | 5 +---- staging/javaweb-tomcat-sidecar/javaweb.yaml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/staging/javaweb-tomcat-sidecar/javaweb-2.yaml b/staging/javaweb-tomcat-sidecar/javaweb-2.yaml index ba9179615..82cabcac9 100644 --- a/staging/javaweb-tomcat-sidecar/javaweb-2.yaml +++ b/staging/javaweb-tomcat-sidecar/javaweb-2.yaml @@ -6,10 +6,7 @@ spec: initContainers: - image: resouer/sample:v2 name: war - command: - - "cp" - - "/sample.war" - - "/app" + command: ["cp", "/sample.war", "/app"] volumeMounts: - mountPath: /app name: app-volume diff --git a/staging/javaweb-tomcat-sidecar/javaweb.yaml b/staging/javaweb-tomcat-sidecar/javaweb.yaml index 776b2cd31..e5360602a 100644 --- a/staging/javaweb-tomcat-sidecar/javaweb.yaml +++ b/staging/javaweb-tomcat-sidecar/javaweb.yaml @@ -6,7 +6,7 @@ spec: initContainers: - image: resouer/sample:v1 name: war - command: ["sh", "-c", "cp /sample.war /app"] + command: ["cp", "/sample.war", "/app"] volumeMounts: - mountPath: /app name: app-volume