Skip to content

Commit b4fa01d

Browse files
committed
chore: add script to update argocd dependencies and images
Signed-off-by: Jonathan West <jonwest@redhat.com>
1 parent 2a10f87 commit b4fa01d

File tree

17 files changed

+778
-15
lines changed

17 files changed

+778
-15
lines changed

.github/workflows/lint.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code scans
1+
name: "Validation, verifications, and lints"
22
on:
33
pull_request:
44
paths-ignore:
@@ -28,3 +28,16 @@ jobs:
2828
- name: Ensure there is no diff in code
2929
run: |
3030
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code -- .
31+
32+
verify_argo_cd_has_updated_dependencies:
33+
name: Verify Argo CD has updated dependencies, for the given target version
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v5
38+
- name: "Call update dependencies Makefile target"
39+
run: |
40+
make update-dependencies
41+
- name: Ensure there is no unexpected diff in repository artifacts
42+
run: |
43+
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code -- .

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
66
VERSION ?= 0.17.0
77

8+
# ARGO_CD_TARGET_VERSION is the target version that argocd-operator will install.
9+
# Update this when you upgrade the Argo CD dependencies of the project.
10+
# After updating, call 'make update-dependencies'.
11+
# Notes:
12+
# - String should NOT begin with 'v' prefix, e.g. 'v3.1.1'
13+
ARGO_CD_TARGET_VERSION ?= 3.1.9
14+
815
# Try to detect Docker or Podman
916
CONTAINER_RUNTIME := $(shell command -v docker 2> /dev/null || command -v podman 2> /dev/null)
1017

@@ -363,3 +370,8 @@ if [ $$(printf '%s\n' $$requiredver $$currentver | sort -V | head -n1) = $$requi
363370
rm -rf $$TMP_DIR ;\
364371
}
365372
endef
373+
374+
# Updates upstream dependencies throughout the repository
375+
.PHONY: update-dependencies
376+
update-dependencies:
377+
"hack/update-dependencies-script/run.sh"

build/util/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Argo CD v3.1.1
2-
FROM quay.io/argoproj/argocd@sha256:a36ab0c0860c77159c16e04c7e786e7a282f04889ba9318052f0b8897d6d2040 AS argocd
1+
# Argo CD v3.1.9
2+
FROM quay.io/argoproj/argocd@sha256:9c33285c0b86a66e9cf9fcafc448e48e0ab7c4678b20b3723556bb6cce8ea0b9 as argocd
33

44
# Final Image
55
FROM docker.io/library/ubuntu:24.04

common/defaults.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const (
7070
ArgoCDDefaultArgoImage = "quay.io/argoproj/argocd"
7171

7272
// ArgoCDDefaultArgoVersion is the Argo CD container image digest to use when version not specified.
73-
ArgoCDDefaultArgoVersion = "sha256:a36ab0c0860c77159c16e04c7e786e7a282f04889ba9318052f0b8897d6d2040" // v3.1.1
73+
ArgoCDDefaultArgoVersion = "sha256:9c33285c0b86a66e9cf9fcafc448e48e0ab7c4678b20b3723556bb6cce8ea0b9" // v3.1.9
7474

7575
// ArgoCDDefaultBackupKeyLength is the length of the generated default backup key.
7676
ArgoCDDefaultBackupKeyLength = 32
@@ -191,10 +191,10 @@ const (
191191
ArgoCDDefaultRedisSuffix = "redis"
192192

193193
// ArgoCDDefaultRedisVersion is the Redis container image tag to use when not specified.
194-
ArgoCDDefaultRedisVersion = "sha256:ddd16a9b1575a774c7e62956be8daa1de5b32cfb5c25b7a216aefed8e0919f9b" // 7.2.7-alpine
194+
ArgoCDDefaultRedisVersion = "sha256:1a34bdba051ecd8a58ec8a3cc460acef697a1605e918149cc53d920673c1a0a7" // 7.2.11-alpine
195195

196196
// ArgoCDDefaultRedisVersionHA is the Redis container image tag to use when not specified in HA mode.
197-
ArgoCDDefaultRedisVersionHA = "sha256:ddd16a9b1575a774c7e62956be8daa1de5b32cfb5c25b7a216aefed8e0919f9b" // 7.2.7-alpine
197+
ArgoCDDefaultRedisVersionHA = "sha256:1a34bdba051ecd8a58ec8a3cc460acef697a1605e918149cc53d920673c1a0a7" // 7.2.11-alpine
198198

199199
// ArgoCDDefaultRepoMetricsPort is the default listen port for the Argo CD repo server metrics.
200200
ArgoCDDefaultRepoMetricsPort = 8084

config/crd/bases/argoproj.io_applications.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5887,4 +5887,4 @@ spec:
58875887
type: object
58885888
served: true
58895889
storage: true
5890-
subresources: {}
5890+
subresources: {}

config/crd/bases/argoproj.io_applicationsets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17721,4 +17721,4 @@ spec:
1772117721
served: true
1772217722
storage: true
1772317723
subresources:
17724-
status: {}
17724+
status: {}

config/crd/bases/argoproj.io_appprojects.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,4 +363,4 @@ spec:
363363
- spec
364364
type: object
365365
served: true
366-
storage: true
366+
storage: true

controllers/argocd/applicationset_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ func TestGetApplicationSetContainerImage(t *testing.T) {
14811481
cr.Spec.Image = ""
14821482
cr.Spec.Version = ""
14831483
out = getApplicationSetContainerImage(&cr)
1484-
assert.Equal(t, "quay.io/argoproj/argocd@sha256:a36ab0c0860c77159c16e04c7e786e7a282f04889ba9318052f0b8897d6d2040", out)
1484+
assert.Equal(t, "quay.io/argoproj/argocd@"+common.ArgoCDDefaultArgoVersion, out)
14851485

14861486
// when env var is not set and spec image and version fields are set, spec fields should be returned
14871487
cr.Spec.Image = "customimage"
@@ -1502,5 +1502,5 @@ func TestGetApplicationSetContainerImage(t *testing.T) {
15021502
cr.Spec.Version = ""
15031503
os.Setenv(common.ArgoCDImageEnvName, "")
15041504
out = getApplicationSetContainerImage(&cr)
1505-
assert.Equal(t, "customimage@sha256:a36ab0c0860c77159c16e04c7e786e7a282f04889ba9318052f0b8897d6d2040", out)
1505+
assert.Equal(t, "customimage@"+common.ArgoCDDefaultArgoVersion, out)
15061506
}

controllers/argocd/dex_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ func TestReconcileArgoCD_reconcileDexDeployment_withUpdate(t *testing.T) {
583583
Containers: []corev1.Container{
584584
{
585585
Name: "dex",
586-
Image: "ghcr.io/dexidp/dex@sha256:b08a58c9731c693b8db02154d7afda798e1888dc76db30d34c4a0d0b8a26d913",
586+
Image: "ghcr.io/dexidp/dex@sha256:b08a58c9731c693b8db02154d7afda798e1888dc76db30d34c4a0d0b8a26d913", // (v2.43.0) NOTE: this value is modified by dependency update script
587587
Command: []string{
588588
"/shared/argocd-dex",
589589
"rundex",

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/argoproj-labs/argocd-operator
33
go 1.24.6
44

55
require (
6-
github.com/argoproj/argo-cd/v3 v3.1.8
6+
github.com/argoproj/argo-cd/v3 v3.1.9
77
github.com/argoproj/gitops-engine v0.7.1-0.20250905160054-e48120133eec
88
github.com/cert-manager/cert-manager v1.15.4
99
github.com/go-logr/logr v1.4.3
@@ -175,6 +175,7 @@ require (
175175
)
176176

177177
replace (
178+
// This replace block is from Argo CD v3.1.9 go.mod
178179
github.com/golang/protobuf => github.com/golang/protobuf v1.5.4
179180
github.com/grpc-ecosystem/grpc-gateway => github.com/grpc-ecosystem/grpc-gateway v1.16.0
180181

0 commit comments

Comments
 (0)