Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.26.5
require (
github.com/argoproj-labs/argo-rollouts-manager v0.0.10-0.20260826124203-67002e569d7f
github.com/argoproj-labs/argocd-image-updater v1.3.2
github.com/argoproj-labs/argocd-operator v0.20.0-rc1.0.20261011153353-a213c171036a
github.com/argoproj-labs/gitops-promoter v0.35.0
github.com/argoproj-labs/argocd-operator v0.20.0-rc1.0.20261028070022-fbe713f7edcd
github.com/argoproj-labs/gitops-promoter v0.35.1
github.com/argoproj/argo-cd/gitops-engine v0.7.1-0.20250908182407-97ad5b59a627
github.com/argoproj/argo-cd/v3 v3.5.6
github.com/cert-manager/cert-manager v1.21.2
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ github.com/argoproj-labs/argo-rollouts-manager v0.0.10-0.20260826124203-67002e56
github.com/argoproj-labs/argo-rollouts-manager v0.0.10-0.20260826124203-67002e569d7f/go.mod h1:P51MRErJxlueBd9YD/5yOxf2ygwCtMcKku7mPJfFagY=
github.com/argoproj-labs/argocd-image-updater v1.3.2 h1:eVTz1miyQAr3poRWgtvdrcFYXZnkuIesmfLmM6XWD+I=
github.com/argoproj-labs/argocd-image-updater v1.3.2/go.mod h1:gOhc+D61dl12CJbqIaOmRlV7S65kmHOJ+/TDyQEEjdA=
github.com/argoproj-labs/argocd-operator v0.20.0-rc1.0.20261011153353-a213c171036a h1:Pawq+aq2DD4FxYIBaO5tE5sCnyQi3ZsG0GKMle3/hkI=
github.com/argoproj-labs/argocd-operator v0.20.0-rc1.0.20261011153353-a213c171036a/go.mod h1:VbBtHhLKgJ9FqUk/T/WZW3M+TIraUD4VyonfKlQ1xNA=
github.com/argoproj-labs/gitops-promoter v0.35.0 h1:uma781gA0XW9Or0RuMnQFwe6ikZUAz/tmStRDSR44r4=
github.com/argoproj-labs/gitops-promoter v0.35.0/go.mod h1:t6ndi4HS6lixaYyFpNALRQd8R34jbCXsZMxWvOT4dzk=
github.com/argoproj-labs/argocd-operator v0.20.0-rc1.0.20261028070022-fbe713f7edcd h1:uWalpzN+9IuoSu2fpLHfbX7inEcQU3XhtBm4u/PdbGA=
github.com/argoproj-labs/argocd-operator v0.20.0-rc1.0.20261028070022-fbe713f7edcd/go.mod h1:eJox4SKqrUB2W5TDxxn3aplvyBgENC6OkDEvRIjo0+c=
github.com/argoproj-labs/gitops-promoter v0.35.1 h1:00XmvFJ73uZM/M3NWiFd/vWUTwz6BeB7Em0rOFjmAiA=
github.com/argoproj-labs/gitops-promoter v0.35.1/go.mod h1:huDfG3PS96RrsTjXSveCSrIMB8jOcmYgPv8QKcoNcpU=
github.com/argoproj/argo-cd/gitops-engine v0.0.0-20261020182657-c2b1e3017e2c h1:7sM2hqwIetM70/Xvv4ms7zk00LA7Pe9KCtPAql0zEZE=
github.com/argoproj/argo-cd/gitops-engine v0.0.0-20261020182657-c2b1e3017e2c/go.mod h1:RsOM4gdM/lsvAfIuzAhYrnHDTLA1AGooZRzVyxbVT3A=
github.com/argoproj/argo-cd/v3 v3.5.6 h1:twzdsPiPufKLRtEqD1Jg3FqtuZmSHLTIxs7t6fSkjlk=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,15 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
SSO: &argov1beta1api.ArgoCDSSOSpec{
Provider: argov1beta1api.SSOProviderTypeDex,
Dex: &argov1beta1api.ArgoCDDexSpec{
OpenShiftOAuth: true,
Config: `connectors:
- type: github
id: github
name: github-using-first-class
config:
clientID: first-class
clientSecret: $dex.github.clientSecret
orgs:
- name: first-class`,
Volumes: []corev1.Volume{
{Name: "custom-dex-volume", VolumeSource: corev1.VolumeSource{EmptyDir: &corev1.EmptyDirVolumeSource{}}},
},
Expand Down
12 changes: 10 additions & 2 deletions test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {

ns, cleanupFunc = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc()

By("creating a new Argo CD instance with dex and openshift oauth enabled")
By("creating a new Argo CD instance with dex")

newArgoCD := &argov1beta1api.ArgoCD{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -137,7 +137,15 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
SSO: &argov1beta1api.ArgoCDSSOSpec{
Provider: "dex",
Dex: &argov1beta1api.ArgoCDDexSpec{
OpenShiftOAuth: true,
Config: `connectors:
- type: github
id: github
name: github-using-first-class
config:
clientID: first-class
clientSecret: $dex.github.clientSecret
orgs:
- name: first-class`,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {

})

It("verifies the operator deletes legacy non-expiring Dex kubernetes.io/service-account-token Secrets and drops them from the Dex SA", func() {
It("verifies the operator deletes legacy non-expiring Dex kubernetes.io/service-account-token Secrets and drops them from the Dex SA", Label("openshift"), func() {

By("creating simple Argo CD instance with Dex and Openshift OAuth enabled")
ns, cleanupFunc := fixture.CreateRandomE2ETestNamespaceWithCleanupFunc()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
SSO: &argov1beta1api.ArgoCDSSOSpec{
Provider: argov1beta1api.SSOProviderTypeDex,
Dex: &argov1beta1api.ArgoCDDexSpec{
OpenShiftOAuth: true,
Config: `connectors:
- type: github
id: github
name: github-using-first-class
config:
clientID: first-class
clientSecret: $dex.github.clientSecret
orgs:
- name: first-class`,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
Copyright 2025.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package parallel

import (
"context"

argov1beta1api "github.com/argoproj-labs/argocd-operator/api/v1beta1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture"
argocdFixture "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/argocd"
fixtureUtils "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/utils"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

var _ = Describe("GitOps Operator Parallel E2E Tests", func() {

Context("1-143_dex_OpenshiftOAuth_on_xKS_OpenShift", func() {

var (
k8sClient client.Client
ctx context.Context
)

BeforeEach(func() {
fixture.EnsureParallelCleanSlate()
k8sClient, _ = fixtureUtils.GetE2ETestKubeClient()
ctx = context.Background()
})

It("should fail reconciliation when OpenShiftOAuth is enabled on a non-OpenShift cluster", Label("xks"), func() {

By("creating namespace for test")
ns, cleanupFunc := fixture.CreateRandomE2ETestNamespaceWithCleanupFunc()
defer cleanupFunc()

By("creating an ArgoCD instance with OpenShiftOAuth enabled")
argoCD := &argov1beta1api.ArgoCD{
ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: ns.Name},
Spec: argov1beta1api.ArgoCDSpec{
SSO: &argov1beta1api.ArgoCDSSOSpec{
Provider: argov1beta1api.SSOProviderTypeDex,
Dex: &argov1beta1api.ArgoCDDexSpec{
OpenShiftOAuth: true,
},
},
},
}
Expect(k8sClient.Create(ctx, argoCD)).To(Succeed())

By("verifying the ArgoCD instance fails due to illegal SSO configuration for OpenShiftOAuth")
Eventually(argoCD, "2m", "5s").Should(
And(argocdFixture.HavePhase("Failed"),
argocdFixture.HaveSSOStatus("Failed"),
))

Eventually(argoCD, "2m", "5s").Should(argocdFixture.HaveCondition(metav1.Condition{
Message: "illegal SSO configuration: openShiftOAuth is only supported on OpenShift clusters. Please disable the openShiftOAuth configuration.",
Reason: "ErrorOccurred",
Status: "False",
Type: "Reconciled",
}))
})
})
})
Loading