Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tini as ENTRYPOINT and related cosmetics #12707

Merged
merged 10 commits into from
Mar 10, 2023
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-server && \
ln -s /usr/local/bin/argocd /usr/local/bin/argocd-k8s-auth

USER $ARGOCD_USER_ID
ENTRYPOINT ["/usr/bin/tini", "--"]
5 changes: 5 additions & 0 deletions docs/2.7-2.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 2.7 to 2.8

## Tini as entrypoint

With the 2.8 release `entrypoint.sh` will be removed from the containers, because starting with 2.7, the implicit entrypoint is set to `tini` in the `Dockerfile` explicitly, and the kubernetes manifests has been updated to use it. Simply updating the containers without updating the deployment manifests will result in pod startup failures, as the old manifests are relying on `entrypoint.sh` instead of `tini`. Please make sure the manifests are updated properly before moving to 2.8.
6 changes: 6 additions & 0 deletions docs/operator-manual/upgrading/2.6-2.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ Note that bundled Helm version has been upgraded from 3.10.3 to 3.11.1.
Argo CD 2.7 upgrades Sprig templating specifically within Argo CD notifications to v3. That upgrade includes an upgrade of [Masterminds/semver](https://github.com/Masterminds/semver/releases) to v3.

Masterminds/semver v3 changed the behavior of the `^` prefix in semantic version constraints. If you are using sprig template functions in your notifications templates which include references to [Sprig's semver functions](https://masterminds.github.io/sprig/semver.html) and use the `^` prefix, read the [Masterminds/semver changelog](https://github.com/Masterminds/semver/releases/tag/v3.0.0) to understand how your notifications' behavior may change.

## Tini as entrypoint

The manifests are now using [`tini` as entrypoint][1], instead of `entrypoint.sh`. Until 2.8, `entrypoint.sh` is retained for upgrade compatibility. This means that the deployment manifests have to be updated after upgrading to 2.7, and before upgrading to 2.8 later. In case the manifests are updated before moving to 2.8, the containers will not be able to start.

[1]: https://github.com/argoproj/argo-cd/pull/12707
1 change: 1 addition & 0 deletions docs/operator-manual/upgrading/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/<v

<hr/>

* [v2.6 to v2.7](./2.6-2.7.md)
* [v2.5 to v2.6](./2.5-2.6.md)
* [v2.4 to v2.5](./2.4-2.5.md)
* [v2.3 to v2.4](./2.3-2.4.md)
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# If we're started as PID 1, we should wrap command execution through tini to
# prevent leakage of orphaned processes ("zombies").
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ spec:
app.kubernetes.io/name: argocd-application-controller
spec:
containers:
- command:
- argocd-application-controller
- args:
- /usr/local/bin/argocd-application-controller
env:
- name: ARGOCD_CONTROLLER_REPLICAS
value: "1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ spec:
app.kubernetes.io/name: argocd-applicationset-controller
spec:
containers:
- command:
- entrypoint.sh
- argocd-applicationset-controller
- args:
- /usr/local/bin/argocd-applicationset-controller
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
name: argocd-applicationset-controller
Expand Down
2 changes: 1 addition & 1 deletion manifests/base/dex/argocd-dex-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
- name: copyutil
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
command: [cp, -n, /usr/local/bin/argocd, /shared/argocd-dex]
command: [/bin/cp, -n, /usr/local/bin/argocd, /shared/argocd-dex]
volumeMounts:
- mountPath: /shared
name: static-files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ spec:
- key: ca.crt
path: ca.crt
containers:
- command:
- argocd-notifications
- args:
- /usr/local/bin/argocd-notifications
workingDir: /app
livenessProbe:
tcpSocket:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ spec:
- name: argocd-repo-server
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
command: [ "sh", "-c", "entrypoint.sh argocd-repo-server --redis $(ARGOCD_REDIS_SERVICE):6379"]
args:
- /usr/local/bin/argocd-repo-server
- "--redis"
- "$(ARGOCD_REDIS_SERVICE):6379"
env:
- name: ARGOCD_RECONCILIATION_TIMEOUT
valueFrom:
Expand Down Expand Up @@ -194,7 +197,7 @@ spec:
name: plugins
initContainers:
- command:
- cp
- /bin/cp
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
Expand Down
3 changes: 2 additions & 1 deletion manifests/base/server/argocd-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ spec:
- name: argocd-server
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
command: [argocd-server]
args:
- /usr/local/bin/argocd-server
env:
- name: ARGOCD_SERVER_INSECURE
valueFrom:
Expand Down
19 changes: 9 additions & 10 deletions manifests/core-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15489,9 +15489,8 @@ spec:
app.kubernetes.io/name: argocd-applicationset-controller
spec:
containers:
- command:
- entrypoint.sh
- argocd-applicationset-controller
- args:
- /usr/local/bin/argocd-applicationset-controller
env:
- name: NAMESPACE
valueFrom:
Expand Down Expand Up @@ -15690,10 +15689,10 @@ spec:
weight: 5
automountServiceAccountToken: false
containers:
- command:
- sh
- -c
- entrypoint.sh argocd-repo-server --redis argocd-redis:6379
- args:
- /usr/local/bin/argocd-repo-server
- --redis
- argocd-redis:6379
env:
- name: ARGOCD_RECONCILIATION_TIMEOUT
valueFrom:
Expand Down Expand Up @@ -15869,7 +15868,7 @@ spec:
name: plugins
initContainers:
- command:
- cp
- /bin/cp
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
Expand Down Expand Up @@ -15955,8 +15954,8 @@ spec:
topologyKey: kubernetes.io/hostname
weight: 5
containers:
- command:
- argocd-application-controller
- args:
- /usr/local/bin/argocd-application-controller
env:
- name: ARGOCD_CONTROLLER_REPLICAS
value: "1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
spec:
containers:
- name: argocd-application-controller
command:
- argocd-application-controller
args:
- /usr/local/bin/argocd-application-controller
- --redis
- "argocd-redis-ha-haproxy:6379"
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ spec:
topologyKey: topology.kubernetes.io/zone
containers:
- name: argocd-repo-server
command:
- entrypoint.sh
- argocd-repo-server
args:
- /usr/local/bin/argocd-repo-server
- --redis
- "argocd-redis-ha-haproxy:6379"
4 changes: 2 additions & 2 deletions manifests/ha/base/overlays/argocd-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
env:
- name: ARGOCD_API_SERVER_REPLICAS
value: '2'
command:
- argocd-server
args:
- /usr/local/bin/argocd-server
- --redis
- "argocd-redis-ha-haproxy:6379"
26 changes: 12 additions & 14 deletions manifests/ha/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16690,9 +16690,8 @@ spec:
app.kubernetes.io/name: argocd-applicationset-controller
spec:
containers:
- command:
- entrypoint.sh
- argocd-applicationset-controller
- args:
- /usr/local/bin/argocd-applicationset-controller
env:
- name: NAMESPACE
valueFrom:
Expand Down Expand Up @@ -16864,7 +16863,7 @@ spec:
name: argocd-dex-server-tls
initContainers:
- command:
- cp
- /bin/cp
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
Expand Down Expand Up @@ -16919,8 +16918,8 @@ spec:
app.kubernetes.io/name: argocd-notifications-controller
spec:
containers:
- command:
- argocd-notifications
- args:
- /usr/local/bin/argocd-notifications
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
livenessProbe:
Expand Down Expand Up @@ -17092,9 +17091,8 @@ spec:
topologyKey: kubernetes.io/hostname
automountServiceAccountToken: false
containers:
- command:
- entrypoint.sh
- argocd-repo-server
- args:
- /usr/local/bin/argocd-repo-server
- --redis
- argocd-redis-ha-haproxy:6379
env:
Expand Down Expand Up @@ -17272,7 +17270,7 @@ spec:
name: plugins
initContainers:
- command:
- cp
- /bin/cp
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
Expand Down Expand Up @@ -17356,8 +17354,8 @@ spec:
app.kubernetes.io/name: argocd-server
topologyKey: kubernetes.io/hostname
containers:
- command:
- argocd-server
- args:
- /usr/local/bin/argocd-server
- --redis
- argocd-redis-ha-haproxy:6379
env:
Expand Down Expand Up @@ -17664,8 +17662,8 @@ spec:
topologyKey: kubernetes.io/hostname
weight: 5
containers:
- command:
- argocd-application-controller
- args:
- /usr/local/bin/argocd-application-controller
- --redis
- argocd-redis-ha-haproxy:6379
env:
Expand Down
26 changes: 12 additions & 14 deletions manifests/ha/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1494,9 +1494,8 @@ spec:
app.kubernetes.io/name: argocd-applicationset-controller
spec:
containers:
- command:
- entrypoint.sh
- argocd-applicationset-controller
- args:
- /usr/local/bin/argocd-applicationset-controller
env:
- name: NAMESPACE
valueFrom:
Expand Down Expand Up @@ -1668,7 +1667,7 @@ spec:
name: argocd-dex-server-tls
initContainers:
- command:
- cp
- /bin/cp
- -n
- /usr/local/bin/argocd
- /shared/argocd-dex
Expand Down Expand Up @@ -1723,8 +1722,8 @@ spec:
app.kubernetes.io/name: argocd-notifications-controller
spec:
containers:
- command:
- argocd-notifications
- args:
- /usr/local/bin/argocd-notifications
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
livenessProbe:
Expand Down Expand Up @@ -1896,9 +1895,8 @@ spec:
topologyKey: kubernetes.io/hostname
automountServiceAccountToken: false
containers:
- command:
- entrypoint.sh
- argocd-repo-server
- args:
- /usr/local/bin/argocd-repo-server
- --redis
- argocd-redis-ha-haproxy:6379
env:
Expand Down Expand Up @@ -2076,7 +2074,7 @@ spec:
name: plugins
initContainers:
- command:
- cp
- /bin/cp
- -n
- /usr/local/bin/argocd
- /var/run/argocd/argocd-cmp-server
Expand Down Expand Up @@ -2160,8 +2158,8 @@ spec:
app.kubernetes.io/name: argocd-server
topologyKey: kubernetes.io/hostname
containers:
- command:
- argocd-server
- args:
- /usr/local/bin/argocd-server
- --redis
- argocd-redis-ha-haproxy:6379
env:
Expand Down Expand Up @@ -2468,8 +2466,8 @@ spec:
topologyKey: kubernetes.io/hostname
weight: 5
containers:
- command:
- argocd-application-controller
- args:
- /usr/local/bin/argocd-application-controller
- --redis
- argocd-redis-ha-haproxy:6379
env:
Expand Down
Loading