Skip to content

Commit cf9315f

Browse files
authored
chore: update to latest argocd-operator commit 'ef7197954c1d2ba5b3f733406d294956a78d423a' (#981)
Signed-off-by: Jonathan West <jonwest@redhat.com>
1 parent 920bdbf commit cf9315f

12 files changed

+1026
-135
lines changed

bundle/manifests/argoproj.io_argocds.yaml

Lines changed: 470 additions & 44 deletions
Large diffs are not rendered by default.

cmd/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
argov1beta1api "github.com/argoproj-labs/argocd-operator/api/v1beta1"
3737
argocdcommon "github.com/argoproj-labs/argocd-operator/common"
3838
argocdprovisioner "github.com/argoproj-labs/argocd-operator/controllers/argocd"
39+
"github.com/argoproj-labs/argocd-operator/controllers/argoutil"
3940
notificationsprovisioner "github.com/argoproj-labs/argocd-operator/controllers/notificationsconfiguration"
4041
appsv1 "github.com/openshift/api/apps/v1"
4142
configv1 "github.com/openshift/api/config/v1"
@@ -231,6 +232,7 @@ func main() {
231232
LocalUsers: &argocdprovisioner.LocalUsersInfo{
232233
TokenRenewalTimers: map[string]*argocdprovisioner.TokenRenewalTimer{},
233234
},
235+
FipsConfigChecker: argoutil.NewLinuxFipsConfigChecker(),
234236
}).SetupWithManager(mgr); err != nil {
235237
setupLog.Error(err, "unable to create controller", "controller", "Argo CD")
236238
os.Exit(1)

config/crd/bases/argoproj.io_argocds.yaml

Lines changed: 470 additions & 44 deletions
Large diffs are not rendered by default.

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ go 1.24.6
44

55
require (
66
github.com/argoproj-labs/argo-rollouts-manager v0.0.6-0.20250731075119-a100fc1d88b8
7-
github.com/argoproj-labs/argocd-operator v0.14.0-rc1.0.20250828161935-75b2e086ba21
8-
github.com/argoproj/argo-cd/v3 v3.1.1
9-
github.com/argoproj/gitops-engine v0.7.1-0.20250617174952-093aef0dad58
7+
github.com/argoproj-labs/argocd-operator v0.14.0-rc1.0.20251003130632-ef7197954c1d
8+
github.com/argoproj/argo-cd/v3 v3.1.8
9+
github.com/argoproj/gitops-engine v0.7.1-0.20250905160054-e48120133eec
1010
github.com/go-logr/logr v1.4.3
1111
github.com/google/go-cmp v0.7.0
1212
github.com/google/uuid v1.6.1-0.20241114170450-2d3c2a9cc518

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFI
3131
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
3232
github.com/argoproj-labs/argo-rollouts-manager v0.0.6-0.20250731075119-a100fc1d88b8 h1:6+eo7BKrNkSIhQ1nnyCUloSNrGzghlb8r8e7GokoeBo=
3333
github.com/argoproj-labs/argo-rollouts-manager v0.0.6-0.20250731075119-a100fc1d88b8/go.mod h1:yTwzKUV79YyI764hkXdVojGYBA9yKJk3qXx5mRuQ2Xc=
34-
github.com/argoproj-labs/argocd-operator v0.14.0-rc1.0.20250828161935-75b2e086ba21 h1:3hrm9AsOV10mEKS7E7GRbpI4Zb391lw11wGM+/2hh7g=
35-
github.com/argoproj-labs/argocd-operator v0.14.0-rc1.0.20250828161935-75b2e086ba21/go.mod h1:fhN/hOiIuSANIgYxF3sxjVfTbj7MR9pkp73om6zYKMA=
36-
github.com/argoproj/argo-cd/v3 v3.1.1 h1:5qzZUtfpHTwrySprpQwpvjPUHKUz7gBs/wK7PSiVQ8I=
37-
github.com/argoproj/argo-cd/v3 v3.1.1/go.mod h1:QqvzXzddclRLN7m9XrMb1SM6rOTFP9druSh7wrapZbw=
38-
github.com/argoproj/gitops-engine v0.7.1-0.20250617174952-093aef0dad58 h1:9ESamu44v3dR9j/I4/4Aa1Fx3QSIE8ElK1CR8Z285uk=
39-
github.com/argoproj/gitops-engine v0.7.1-0.20250617174952-093aef0dad58/go.mod h1:aIBEG3ohgaC1gh/sw2On6knkSnXkqRLDoBj234Dqczw=
34+
github.com/argoproj-labs/argocd-operator v0.14.0-rc1.0.20251003130632-ef7197954c1d h1:slrUXHB/GMsy/UFKi4zggjtNfmSFX6XXlxw094InwEU=
35+
github.com/argoproj-labs/argocd-operator v0.14.0-rc1.0.20251003130632-ef7197954c1d/go.mod h1:sxYdfg7RtkSZt7F9jdDq8lha1AqpsTNeMhWFUXNEg0o=
36+
github.com/argoproj/argo-cd/v3 v3.1.8 h1:NkLPiRI5qGkV+q1EN3O7/0Wb9O/MVl62vadKteZqMUw=
37+
github.com/argoproj/argo-cd/v3 v3.1.8/go.mod h1:ZHb/LOz/hr88VWMJiVTd8DGYL7MheHCAT8S6DgYOBFo=
38+
github.com/argoproj/gitops-engine v0.7.1-0.20250905160054-e48120133eec h1:rNAwbRQFvRIuW/e2bU+B10mlzghYXsnwZedYeA7Drz4=
39+
github.com/argoproj/gitops-engine v0.7.1-0.20250905160054-e48120133eec/go.mod h1:aIBEG3ohgaC1gh/sw2On6knkSnXkqRLDoBj234Dqczw=
4040
github.com/argoproj/pkg v0.13.7-0.20250305113207-cbc37dc61de5 h1:YBoLSjpoaJXaXAldVvBRKJuOPvIXz9UOv6S96gMJM/Q=
4141
github.com/argoproj/pkg v0.13.7-0.20250305113207-cbc37dc61de5/go.mod h1:ebVOzFJphdN1p6EG2mIMECv/3Rk/almSaxIYuFAmsSw=
4242
github.com/argoproj/pkg/v2 v2.0.1 h1:O/gCETzB/3+/hyFL/7d/VM/6pSOIRWIiBOTb2xqAHvc=
@@ -124,8 +124,8 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj
124124
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
125125
github.com/go-git/go-git/v5 v5.16.2 h1:fT6ZIOjE5iEnkzKyxTHK1W4HGAsPhqEqiSAssSO77hM=
126126
github.com/go-git/go-git/v5 v5.16.2/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8=
127-
github.com/go-jose/go-jose/v4 v4.1.0 h1:cYSYxd3pw5zd2FSXk2vGdn9igQU2PS8MuxrCOCl0FdY=
128-
github.com/go-jose/go-jose/v4 v4.1.0/go.mod h1:GG/vqmYm3Von2nYiB2vGTXzdoNKE5tix5tuc6iAd+sw=
127+
github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI=
128+
github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo=
129129
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
130130
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
131131
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=

test/openshift/e2e/ginkgo/fixture/deployment/fixture.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ func HaveContainerCommandSubstring(expectedCommandSubstring string, containerInd
319319

320320
GinkgoWriter.Println("HaveContainerCommandSubstring: Have:")
321321
GinkgoWriter.Println(cmdLine)
322-
GinkgoWriter.Println("HaveContainerCommandSubstring: Expect:")
322+
GinkgoWriter.Println("HaveContainerCommandSubstring: Expect substring:")
323323
GinkgoWriter.Println(expectedCommandSubstring)
324324

325325
return strings.Contains(cmdLine, expectedCommandSubstring)

test/openshift/e2e/ginkgo/fixture/fixture.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"k8s.io/apimachinery/pkg/util/uuid"
2020
"k8s.io/apimachinery/pkg/util/wait"
2121
"k8s.io/client-go/util/retry"
22-
"k8s.io/utils/ptr"
2322
"sigs.k8s.io/controller-runtime/pkg/client"
2423

2524
rolloutmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"
@@ -275,7 +274,7 @@ func CreateNamespace(name string) *corev1.Namespace {
275274
// If the Namespace already exists, delete it first
276275
if err := k8sClient.Get(context.Background(), client.ObjectKeyFromObject(ns), ns); err == nil {
277276
// Namespace exists, so delete it first
278-
Expect(deleteNamespace(context.Background(), ns.Name, k8sClient)).To(Succeed())
277+
Expect(deleteNamespaceAndVerify(context.Background(), ns.Name, k8sClient)).To(Succeed())
279278
}
280279

281280
ns = &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{
@@ -304,7 +303,7 @@ func CreateManagedNamespace(name string, managedByNamespace string) *corev1.Name
304303
// If the Namespace already exists, delete it first
305304
if err := k8sClient.Get(context.Background(), client.ObjectKeyFromObject(ns), ns); err == nil {
306305
// Namespace exists, so delete it first
307-
Expect(deleteNamespace(context.Background(), ns.Name, k8sClient)).To(Succeed())
306+
Expect(deleteNamespaceAndVerify(context.Background(), ns.Name, k8sClient)).To(Succeed())
308307
}
309308

310309
ns = &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{
@@ -344,12 +343,10 @@ func DeleteNamespace(ns *corev1.Namespace) {
344343

345344
k8sClient, _, err := utils.GetE2ETestKubeClientWithError()
346345
Expect(err).ToNot(HaveOccurred())
347-
err = k8sClient.Delete(context.Background(), ns, &client.DeleteOptions{PropagationPolicy: ptr.To(metav1.DeletePropagationForeground)})
348346

349-
// Error shouldn't occur, UNLESS it's because the NS no longer exists
350-
if err != nil && !apierr.IsNotFound(err) {
351-
Expect(err).ToNot(HaveOccurred())
352-
}
347+
err = deleteNamespaceAndVerify(context.Background(), ns.Name, k8sClient)
348+
Expect(err).ToNot(HaveOccurred())
349+
353350
}
354351

355352
// EnvNonOLM checks if NON_OLM var is set; this variable is set when testing on GitOps operator that is not installed via OLM
@@ -708,15 +705,15 @@ func ensureTestNamespacesDeleted(ctx context.Context, k8sClient client.Client) e
708705

709706
// delete selected namespaces
710707
for _, namespace := range nsList.Items {
711-
if err := deleteNamespace(ctx, namespace.Name, k8sClient); err != nil {
708+
if err := deleteNamespaceAndVerify(ctx, namespace.Name, k8sClient); err != nil {
712709
return fmt.Errorf("unable to delete namespace '%s': %w", namespace.Name, err)
713710
}
714711
}
715712
return nil
716713
}
717714

718-
// deleteNamespace deletes a namespace, and waits for it to be reported as deleted.
719-
func deleteNamespace(ctx context.Context, namespaceParam string, k8sClient client.Client) error {
715+
// deleteNamespaceAndVerify deletes a namespace, and waits for it to be reported as deleted.
716+
func deleteNamespaceAndVerify(ctx context.Context, namespaceParam string, k8sClient client.Client) error {
720717

721718
GinkgoWriter.Println("Deleting Namespace", namespaceParam)
722719

@@ -980,3 +977,7 @@ func outputPodLog(podSubstring string) {
980977
GinkgoWriter.Println("----------------------------------------------------------------")
981978

982979
}
980+
981+
func IsUpstreamOperatorTests() bool {
982+
return false // This function should return true if running from argocd-operator repo, false if running from gitops-operator repo. This is to distinguish between tests in upstream argocd-operator and downstream gitops-operator repos.
983+
}

test/openshift/e2e/ginkgo/parallel/1-023_validate_repo_server_tls_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
4242
Context("1-023_validate_repo_server_tls", func() {
4343

4444
var (
45-
ctx context.Context
46-
k8sClient client.Client
45+
ctx context.Context
46+
k8sClient client.Client
47+
nsTest_1_23_custom *corev1.Namespace
48+
cleanupFunc func()
4749
)
4850

4951
BeforeEach(func() {
@@ -52,12 +54,16 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
5254
ctx = context.Background()
5355
})
5456

57+
AfterEach(func() {
58+
defer cleanupFunc()
59+
fixture.OutputDebugOnFail(nsTest_1_23_custom)
60+
})
61+
5562
It("verifying ArgoCD .spec.repo AutoTLS and verifyTLS work as expected", func() {
5663

5764
By("creating a namespace scoped Argo instance with AutoTLS set to 'openshift'")
5865

59-
nsTest_1_23_custom, cleanupFn1 := fixture.CreateNamespaceWithCleanupFunc("test-1-23-custom")
60-
defer cleanupFn1()
66+
nsTest_1_23_custom, cleanupFunc = fixture.CreateNamespaceWithCleanupFunc("test-1-23-custom")
6167

6268
argoCDTest_1_23_custom := &argov1beta1api.ArgoCD{
6369
ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: nsTest_1_23_custom.Name},

test/openshift/e2e/ginkgo/parallel/1-042_restricted_pss_compliant_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
5555

5656
AfterEach(func() {
5757
Expect(ns).ToNot(BeNil())
58+
defer fixture.DeleteNamespace(ns)
5859

5960
fixture.OutputDebugOnFail(ns.Name)
60-
fixture.DeleteNamespace(ns)
6161
})
6262

6363
It("verifies that all Argo CD components can run with pod-security enforce, warn, and audit of 'restricted'", func() {

test/openshift/e2e/ginkgo/parallel/1-066_validate_redis_secure_comm_no_autotls_no_ha_test.go

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
statefulsetFixture "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/statefulset"
3333
fixtureUtils "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/utils"
3434
appsv1 "k8s.io/api/apps/v1"
35+
corev1 "k8s.io/api/core/v1"
3536
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3637
"sigs.k8s.io/controller-runtime/pkg/client"
3738
)
@@ -41,8 +42,10 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
4142
Context("1-066_validate_redis_secure_comm_no_autotls_no_ha", func() {
4243

4344
var (
44-
k8sClient client.Client
45-
ctx context.Context
45+
k8sClient client.Client
46+
ctx context.Context
47+
ns *corev1.Namespace
48+
cleanupFunc func()
4649
)
4750

4851
BeforeEach(func() {
@@ -51,11 +54,15 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
5154
ctx = context.Background()
5255
})
5356

57+
AfterEach(func() {
58+
defer cleanupFunc()
59+
fixture.OutputDebugOnFail(ns)
60+
})
61+
5462
It("validates that Argo CD components correctly inherit 'argocd-operator-redis-tls' Secret once it is created", func() {
5563

5664
By("creating simple namespace-scoped Argo CD instance")
57-
ns, cleanupFunc := fixture.CreateRandomE2ETestNamespaceWithCleanupFunc()
58-
defer cleanupFunc()
65+
ns, cleanupFunc = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc()
5966

6067
expectComponentsAreRunning := func() {
6168

@@ -116,12 +123,15 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
116123
)
117124
Expect(err).ToNot(HaveOccurred())
118125

119-
_, err = osFixture.ExecCommand("oc", "create", "secret", "tls", "argocd-operator-redis-tls", "--key="+redis_key_File.Name(), "--cert="+redis_crt_File.Name(), "-n", ns.Name)
126+
By("creating argocd-operator-redis-tls secret from that cert")
127+
128+
_, err = osFixture.ExecCommand("kubectl", "create", "secret", "tls", "argocd-operator-redis-tls", "--key="+redis_key_File.Name(), "--cert="+redis_crt_File.Name(), "-n", ns.Name)
120129
Expect(err).ToNot(HaveOccurred())
121130

122131
expectComponentsAreRunning()
123132

124-
_, err = osFixture.ExecCommand("oc", "annotate", "secret", "argocd-operator-redis-tls", "argocds.argoproj.io/name=argocd", "-n", ns.Name)
133+
By("adding argo cd label to argocd-operator-redis-tls secret")
134+
_, err = osFixture.ExecCommand("kubectl", "annotate", "secret", "argocd-operator-redis-tls", "argocds.argoproj.io/name=argocd", "-n", ns.Name)
125135
Expect(err).ToNot(HaveOccurred())
126136

127137
By("verifying that all the components restart successfully once we define the argocd-operator-redis-tls Secret")
@@ -132,7 +142,14 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
132142

133143
By("expecting redis-server to have desired container process command/arguments")
134144

135-
Expect(redisDepl).To(deplFixture.HaveContainerCommandSubstring("redis-server --protected-mode no --save \"\" --appendonly no --requirepass "+"$(REDIS_PASSWORD)"+" --tls-port 6379 --port 0 --tls-cert-file /app/config/redis/tls/tls.crt --tls-key-file /app/config/redis/tls/tls.key --tls-auth-clients no", 0),
145+
expectedString := "--save \"\" --appendonly no --requirepass " + "$(REDIS_PASSWORD)" + " --tls-port 6379 --port 0 --tls-cert-file /app/config/redis/tls/tls.crt --tls-key-file /app/config/redis/tls/tls.key --tls-auth-clients no"
146+
147+
if !fixture.IsUpstreamOperatorTests() {
148+
// Downstream operator adds these arguments
149+
expectedString = "redis-server --protected-mode no " + expectedString
150+
}
151+
152+
Expect(redisDepl).To(deplFixture.HaveContainerCommandSubstring(expectedString, 0),
136153
"TLS .spec.template.spec.containers.args for argocd-redis deployment are wrong")
137154

138155
repoServerDepl := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: "argocd-repo-server", Namespace: ns.Name}}

0 commit comments

Comments
 (0)