From b71a521af8144723cdea9b37d3389669fcd8e837 Mon Sep 17 00:00:00 2001 From: Dmitriy Kalinin Date: Tue, 6 Oct 2020 13:17:46 -0400 Subject: [PATCH] add dumb-init to collect orphaned processes such as git-remote-http --- Dockerfile | 4 ++-- config/deployment.yml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1e877393a..14ea9144c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags=-buildid= -trimpath -o controller # Needs ubuntu for installing git/openssh FROM ubuntu:bionic -RUN apt-get update && apt-get install -y git openssh-client && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y git openssh-client dumb-init && rm -rf /var/lib/apt/lists/* RUN groupadd -g 2000 kapp-controller && useradd -r -u 1000 --create-home -g kapp-controller kapp-controller USER kapp-controller @@ -59,4 +59,4 @@ COPY --from=0 /usr/local/bin/sops . COPY --from=0 /usr/local/bin/kapp . ENV PATH="/:${PATH}" -ENTRYPOINT ["/kapp-controller"] +ENTRYPOINT ["dumb-init", "--", "/kapp-controller"] diff --git a/config/deployment.yml b/config/deployment.yml index c2b1618c3..c1bff2848 100644 --- a/config/deployment.yml +++ b/config/deployment.yml @@ -20,7 +20,6 @@ spec: containers: - name: kapp-controller image: kapp-controller - command: ["/kapp-controller"] args: #@ if/end data.values.dangerous_allow_shared_service_account: - -dangerous-allow-shared-service-account=true