mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
feat: upgrade Kustomize to v5.0.1 (#12299)
* feat: upgrade Kustomize to v5.0.0 and Helm to v3.11.0 Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix helm3 ref Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix duplicate key Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * 3.11.1 Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * codegen Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * 5.0.1 Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * upgrade note Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
This commit is contained in:
@@ -727,17 +727,15 @@ based application which uses base Argo CD manifests from [https://github.com/arg
|
||||
Example of `kustomization.yaml`:
|
||||
|
||||
```yaml
|
||||
bases:
|
||||
- github.com/argoproj/argo-cd//manifests/cluster-install?ref=v1.0.1
|
||||
|
||||
# additional resources like ingress rules, cluster and repository secrets.
|
||||
resources:
|
||||
- github.com/argoproj/argo-cd//manifests/cluster-install?ref=v1.0.1
|
||||
- clusters-secrets.yaml
|
||||
- repos-secrets.yaml
|
||||
|
||||
# changes to config maps
|
||||
patchesStrategicMerge:
|
||||
- overlays/argo-cd-cm.yaml
|
||||
patches:
|
||||
- path: overlays/argo-cd-cm.yaml
|
||||
```
|
||||
|
||||
The live example of self managed Argo CD config is available at [https://cd.apps.argoproj.io](https://cd.apps.argoproj.io) and with configuration
|
||||
|
||||
@@ -38,8 +38,9 @@ p, role:org-admin, extensions, invoke, my-proj/*, allow
|
||||
|
||||
Note that bundled Helm version has been upgraded from 3.10.3 to 3.11.2.
|
||||
|
||||
[1]: ../../developer-guide/extensions/proxy-extensions.md
|
||||
[2]: https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/#the-extensions-resource
|
||||
## Upgraded Kustomize Version
|
||||
|
||||
Note that bundled Kustomize version has been upgraded from 4.5.7 to 5.0.1.
|
||||
|
||||
## Notifications: `^` behavior change in Sprig's semver functions
|
||||
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.
|
||||
@@ -48,6 +49,8 @@ Masterminds/semver v3 changed the behavior of the `^` prefix in semantic version
|
||||
|
||||
## 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.
|
||||
The manifests are now using [`tini` as entrypoint][3], 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]: ../../developer-guide/extensions/proxy-extensions.md
|
||||
[2]: https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/#the-extensions-resource
|
||||
[3]: https://github.com/argoproj/argo-cd/pull/12707
|
||||
|
||||
@@ -63,7 +63,7 @@ repository or kustomize base.
|
||||
For example, consider the following kustomization.yaml
|
||||
|
||||
```yaml
|
||||
bases:
|
||||
resources:
|
||||
- github.com/argoproj/argo-cd//manifests/cluster-install
|
||||
```
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
bases:
|
||||
- github.com/argoproj/argo-cd//manifests/cluster-install?ref=stable
|
||||
|
||||
patchesStrategicMerge:
|
||||
- argocd-known-hosts-mounts.yaml
|
||||
|
||||
resources:
|
||||
- github.com/argoproj/argo-cd//manifests/cluster-install?ref=stable
|
||||
- argocd-known-hosts.yaml
|
||||
|
||||
patches:
|
||||
- path: argocd-known-hosts-mounts.yaml
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
bases:
|
||||
resources:
|
||||
- ../../../manifests/base
|
||||
|
||||
configMapGenerator:
|
||||
@@ -11,5 +11,5 @@ configMapGenerator:
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
patchesStrategicMerge:
|
||||
- argocd-repo-server-deployment-patch.yaml
|
||||
patches:
|
||||
- path: argocd-repo-server-deployment-patch.yaml
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
4a2b9f7fad0355c8bea08da6dd9c48e790df5f357983280998d80b8dc7ad3def kustomize_5.0.1_darwin_amd64.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
b264fe931e85d8ca7c7ac47872695b1fa39fe2b73cfc0d58cbdca0bde69d0bc0 kustomize_5.0.1_darwin_arm64.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
dca623b36aef84fbdf28f79d02e9b3705ff641424ac1f872d5420dadb12fb78d kustomize_5.0.1_linux_amd64.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
c6e036c5c7eee4c15f7544e441ced5cb6cf9eba24a011c25008df5617cd2fb85 kustomize_5.0.1_linux_arm64.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
75df309f1efa92c57ccd15603be4fb6806e5b62f3e882d892ad34a4ee3c293f4 kustomize_5.0.1_linux_ppc64le.tar.gz
|
||||
@@ -0,0 +1 @@
|
||||
1c67b27bf72a1c5615bd901b1971a88d920da8255038f13af7bb61695b08fda5 kustomize_5.0.1_linux_s390x.tar.gz
|
||||
@@ -8,7 +8,7 @@ INSTALL_PATH="${INSTALL_PATH:-$PROJECT_ROOT/dist}"
|
||||
PATH="${INSTALL_PATH}:${PATH}"
|
||||
[ -d $INSTALL_PATH ] || mkdir -p $INSTALL_PATH
|
||||
|
||||
KUSTOMIZE_VERSION=${KUSTOMIZE_VERSION:-$kustomize4_version}
|
||||
KUSTOMIZE_VERSION=${KUSTOMIZE_VERSION:-$kustomize5_version}
|
||||
|
||||
if [ -z $INSTALL_OS ]; then
|
||||
echo "install kustomize error: unsupported operating system"
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
helm3_version=3.11.2
|
||||
kubectl_version=1.17.8
|
||||
kubectx_version=0.6.3
|
||||
kustomize4_version=4.5.7
|
||||
kustomize5_version=5.0.1
|
||||
protoc_version=3.17.3
|
||||
|
||||
@@ -30,6 +30,9 @@ spec:
|
||||
- ""
|
||||
- "--appendonly"
|
||||
- "no"
|
||||
env:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
value: ""
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
securityContext:
|
||||
|
||||
@@ -8,11 +8,14 @@ resources:
|
||||
- argocd-redis-service.yaml
|
||||
- argocd-redis-network-policy.yaml
|
||||
|
||||
vars:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
objref:
|
||||
kind: Service
|
||||
name: argocd-redis
|
||||
apiVersion: v1
|
||||
fieldref:
|
||||
fieldpath: metadata.name
|
||||
replacements:
|
||||
- source:
|
||||
kind: Service
|
||||
name: argocd-redis
|
||||
version: v1
|
||||
targets:
|
||||
- select:
|
||||
kind: Deployment
|
||||
name: argocd-redis
|
||||
fieldPaths:
|
||||
- spec.template.spec.containers.[name=redis].env.[name=ARGOCD_REDIS_SERVICE].value
|
||||
|
||||
@@ -15777,6 +15777,9 @@ spec:
|
||||
- ""
|
||||
- --appendonly
|
||||
- "no"
|
||||
env:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
value: argocd-redis
|
||||
image: redis:7.0.9-alpine
|
||||
imagePullPolicy: Always
|
||||
name: redis
|
||||
@@ -15831,7 +15834,7 @@ spec:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- argocd-redis:6379
|
||||
- $(ARGOCD_REDIS_SERVICE):6379
|
||||
env:
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
|
||||
@@ -2,10 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
|
||||
patchesStrategicMerge:
|
||||
- overlays/argocd-repo-server-deployment.yaml
|
||||
- overlays/argocd-server-deployment.yaml
|
||||
- overlays/argocd-application-controller-statefulset.yaml
|
||||
patches:
|
||||
- path: overlays/argocd-repo-server-deployment.yaml
|
||||
- path: overlays/argocd-server-deployment.yaml
|
||||
- path: overlays/argocd-application-controller-statefulset.yaml
|
||||
|
||||
|
||||
images:
|
||||
|
||||
@@ -6,7 +6,7 @@ resources:
|
||||
- argocd-redis-ha-proxy-network-policy.yaml
|
||||
- argocd-redis-ha-server-network-policy.yaml
|
||||
|
||||
patchesJson6902:
|
||||
patches:
|
||||
- target:
|
||||
version: v1
|
||||
group: ""
|
||||
|
||||
@@ -16277,6 +16277,9 @@ spec:
|
||||
- ""
|
||||
- --appendonly
|
||||
- "no"
|
||||
env:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
value: argocd-redis
|
||||
image: redis:7.0.9-alpine
|
||||
imagePullPolicy: Always
|
||||
name: redis
|
||||
@@ -16331,7 +16334,7 @@ spec:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- argocd-redis:6379
|
||||
- $(ARGOCD_REDIS_SERVICE):6379
|
||||
env:
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
|
||||
@@ -942,6 +942,9 @@ spec:
|
||||
- ""
|
||||
- --appendonly
|
||||
- "no"
|
||||
env:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
value: argocd-redis
|
||||
image: redis:7.0.9-alpine
|
||||
imagePullPolicy: Always
|
||||
name: redis
|
||||
@@ -996,7 +999,7 @@ spec:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- argocd-redis:6379
|
||||
- $(ARGOCD_REDIS_SERVICE):6379
|
||||
env:
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
bases:
|
||||
resources:
|
||||
- ../guestbook
|
||||
|
||||
patches:
|
||||
- guestbook-deployment.yaml
|
||||
- path: guestbook-deployment.yaml
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
bases:
|
||||
- ../guestbook
|
||||
|
||||
resources:
|
||||
- ../guestbook
|
||||
- config-map.yaml
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
bases:
|
||||
resources:
|
||||
- https://localhost:9443/argo-e2e/testdata.git//guestbook
|
||||
|
||||
namePrefix: child-
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
bases:
|
||||
resources:
|
||||
- https://argocd-e2e-server:9443/argo-e2e/testdata.git//guestbook
|
||||
|
||||
namePrefix: child-
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
bases:
|
||||
resources:
|
||||
- ssh://root@localhost:2222/tmp/argo-e2e/testdata.git//config-map
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
bases:
|
||||
resources:
|
||||
- ssh://root@argocd-e2e-server:2222/tmp/argo-e2e/testdata.git//config-map
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
bases:
|
||||
resources:
|
||||
- ../../../manifests/crds
|
||||
- ../../../manifests/base/config
|
||||
- ../../../manifests/cluster-rbac
|
||||
- ../../../manifests/base/notification
|
||||
|
||||
patchesStrategicMerge:
|
||||
- patches.yaml
|
||||
patches:
|
||||
- path: patches.yaml
|
||||
|
||||
@@ -5,9 +5,9 @@ resources:
|
||||
- plugin.yaml
|
||||
- app.yaml
|
||||
|
||||
patchesStrategicMerge:
|
||||
- repo-patch.yaml
|
||||
- secret-patch.yaml
|
||||
patches:
|
||||
- path: repo-patch.yaml
|
||||
- path: secret-patch.yaml
|
||||
|
||||
images:
|
||||
- name: quay.io/argoproj/argocd
|
||||
|
||||
@@ -16,7 +16,7 @@ func TestKustomizeVersion(t *testing.T) {
|
||||
test.CIOnly(t)
|
||||
out, err := argoexec.RunCommand("kustomize", argoexec.CmdOpts{}, "version")
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, out, "Version:kustomize/v4", "kustomize should be version 4")
|
||||
assert.Contains(t, out, "v5.", "kustomize should be version 5")
|
||||
}
|
||||
|
||||
// TestBuildManifests makes sure we are consistent in naming, and all kustomization.yamls are buildable
|
||||
|
||||
Reference in New Issue
Block a user