diff --git a/Dockerfile b/Dockerfile index 79edd5c75..16e3cb41b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,7 +79,7 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.4.15 && \ #################################################################################################### FROM alpine:latest AS back-end-dev -RUN apk update && apk add ca-certificates git gpg gpg-agent openssh-client +RUN apk update && apk add ca-certificates git gpg gpg-agent openssh-client tini COPY bin/credential-helper /usr/local/bin/credential-helper COPY bin/controlplane/kargo /usr/local/bin/kargo @@ -87,6 +87,7 @@ COPY bin/controlplane/kargo /usr/local/bin/kargo RUN adduser -D -H -u 1000 kargo USER 1000:0 +ENTRYPOINT ["/sbin/tini", "--"] CMD ["/usr/local/bin/kargo"] #################################################################################################### @@ -119,4 +120,5 @@ FROM ${BASE_IMAGE}:latest-${TARGETARCH} AS final COPY --from=back-end-builder /kargo/bin/ /usr/local/bin/ COPY --from=tools /tools/ /usr/local/bin/ +ENTRYPOINT ["/sbin/tini", "--"] CMD ["/usr/local/bin/kargo"] diff --git a/charts/kargo/templates/controller/deployment.yaml b/charts/kargo/templates/controller/deployment.yaml index 3f5fe5478..88631e9a1 100644 --- a/charts/kargo/templates/controller/deployment.yaml +++ b/charts/kargo/templates/controller/deployment.yaml @@ -57,7 +57,8 @@ spec: - name: controller image: {{ include "kargo.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/usr/local/bin/kargo", "controller"] + command: ["/sbin/tini", "--", "/usr/local/bin/kargo"] + args: ["controller"] env: - name: GOMEMLIMIT valueFrom: diff --git a/charts/kargo/templates/garbage-collector/cron-job.yaml b/charts/kargo/templates/garbage-collector/cron-job.yaml index db27005b6..0943061c5 100644 --- a/charts/kargo/templates/garbage-collector/cron-job.yaml +++ b/charts/kargo/templates/garbage-collector/cron-job.yaml @@ -56,7 +56,8 @@ spec: - name: garbage-collector image: {{ include "kargo.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/usr/local/bin/kargo", "garbage-collector"] + command: ["/sbin/tini", "--", "/usr/local/bin/kargo"] + args: ["garbage-collector"] env: - name: GOMEMLIMIT valueFrom: diff --git a/charts/kargo/templates/management-controller/deployment.yaml b/charts/kargo/templates/management-controller/deployment.yaml index 05081f720..b0f39f671 100644 --- a/charts/kargo/templates/management-controller/deployment.yaml +++ b/charts/kargo/templates/management-controller/deployment.yaml @@ -57,7 +57,8 @@ spec: - name: management-controller image: {{ include "kargo.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/usr/local/bin/kargo", "management-controller"] + command: ["/sbin/tini", "--", "/usr/local/bin/kargo"] + args: ["management-controller"] env: - name: GOMEMLIMIT valueFrom: diff --git a/charts/kargo/templates/webhooks-server/deployment.yaml b/charts/kargo/templates/webhooks-server/deployment.yaml index b4e86dd99..ffde69802 100644 --- a/charts/kargo/templates/webhooks-server/deployment.yaml +++ b/charts/kargo/templates/webhooks-server/deployment.yaml @@ -57,7 +57,8 @@ spec: - name: webhooks-server image: {{ include "kargo.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} - command: ["/usr/local/bin/kargo", "webhooks-server"] + command: ["/sbin/tini", "--", "/usr/local/bin/kargo"] + args: ["webhooks-server"] env: - name: GOMEMLIMIT valueFrom: diff --git a/kargo-base.apko.yaml b/kargo-base.apko.yaml index 451ded016..49feb0e9a 100644 --- a/kargo-base.apko.yaml +++ b/kargo-base.apko.yaml @@ -11,6 +11,7 @@ contents: - gpg-agent~2 - helm~3 # Required for Kustomize Helm plugin - openssh-client~9 + - tini accounts: groups: