Skip to content

Commit 70e6c21

Browse files
authored
Merge branch 'master' into update-argocd-operator
2 parents 928e186 + 595fd5d commit 70e6c21

File tree

9 files changed

+546
-4
lines changed

9 files changed

+546
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ e2e-tests-ginkgo: e2e-tests-sequential-ginkgo e2e-tests-parallel-ginkgo ## Runs
161161
.PHONY: e2e-tests-sequential-ginkgo
162162
e2e-tests-sequential-ginkgo: ginkgo ## Runs kuttl e2e sequential tests
163163
@echo "Running GitOps Operator sequential Ginkgo E2E tests..."
164-
$(GINKGO_CLI) -v --trace --timeout 90m -r ./test/openshift/e2e/ginkgo/sequential
164+
$(GINKGO_CLI) -v --trace --timeout 120m -r ./test/openshift/e2e/ginkgo/sequential
165165

166166
.PHONY: e2e-tests-parallel-ginkgo ## Runs kuttl e2e parallel tests, (Defaults to 5 runs at a time)
167167
e2e-tests-parallel-ginkgo: ginkgo

bundle/manifests/gitops-operator.clusterserviceversion.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ metadata:
180180
capabilities: Deep Insights
181181
console.openshift.io/plugins: '["gitops-plugin"]'
182182
containerImage: quay.io/redhat-developer/gitops-operator
183-
createdAt: "2025-08-20T01:09:37Z"
183+
createdAt: "2025-08-21T01:20:45Z"
184184
description: Enables teams to adopt GitOps principles for managing cluster configurations
185185
and application delivery across hybrid multi-cluster Kubernetes environments.
186186
features.operators.openshift.io/disconnected: "true"
@@ -494,6 +494,7 @@ spec:
494494
- experiments
495495
- experiments/finalizers
496496
- namespacemanagements
497+
- namespacemanagements/status
497498
- rollouts
498499
- rollouts/finalizers
499500
- rollouts/scale

config/rbac/role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ rules:
143143
- experiments
144144
- experiments/finalizers
145145
- namespacemanagements
146+
- namespacemanagements/status
146147
- rollouts
147148
- rollouts/finalizers
148149
- rollouts/scale

controllers/gitopsservice_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ type ReconcileGitopsService struct {
198198
//+kubebuilder:rbac:groups=argoproj.io,resources=notificationsconfigurations;notificationsconfigurations/finalizers,verbs=*
199199
//+kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch;
200200
//+kubebuilder:rbac:groups="apiregistration.k8s.io",resources="apiservices",verbs=get;list
201-
//+kubebuilder:rbac:groups="argoproj.io",resources=namespacemanagements,verbs=create;get;list;watch;update;patch;delete;deletecollection
201+
//+kubebuilder:rbac:groups="argoproj.io",resources=namespacemanagements;namespacemanagements/status,verbs=create;get;list;watch;update;patch;delete;deletecollection
202202

203203
// Reconcile reads that state of the cluster for a GitopsService object and makes changes based on the state read
204204
// and what is in the GitopsService.Spec

test/e2e/suite_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ var _ = BeforeSuite(func() {
171171
Client: mgr.GetClient(),
172172
Scheme: mgr.GetScheme(),
173173
K8sClient: k8sClient,
174+
LocalUsers: &argocdprovisioner.LocalUsersInfo{
175+
TokenRenewalTimers: map[string]*argocdprovisioner.TokenRenewalTimer{},
176+
},
174177
}).SetupWithManager(mgr)
175178
Expect(err).NotTo(HaveOccurred())
176179

test/nondefaulte2e/suite_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ var _ = BeforeSuite(func() {
158158
Client: mgr.GetClient(),
159159
Scheme: mgr.GetScheme(),
160160
K8sClient: k8sClient,
161+
LocalUsers: &argocdprovisioner.LocalUsersInfo{
162+
TokenRenewalTimers: map[string]*argocdprovisioner.TokenRenewalTimer{},
163+
},
161164
}).SetupWithManager(mgr)
162165
Expect(err).NotTo(HaveOccurred())
163166

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ func RestoreSubcriptionToDefault() {
510510
Expect(err).ToNot(HaveOccurred())
511511

512512
// optionalEnvVarsToRemove is a non-exhaustive list of environment variables that are known to be added to Subscription or operator Deployment by tests
513-
optionalEnvVarsToRemove := []string{"DISABLE_DEFAULT_ARGOCD_CONSOLELINK", "CONTROLLER_CLUSTER_ROLE", "SERVER_CLUSTER_ROLE", "ARGOCD_LABEL_SELECTOR"}
513+
optionalEnvVarsToRemove := []string{"DISABLE_DEFAULT_ARGOCD_CONSOLELINK", "CONTROLLER_CLUSTER_ROLE", "SERVER_CLUSTER_ROLE", "ARGOCD_LABEL_SELECTOR", "ALLOW_NAMESPACE_MANAGEMENT_IN_NAMESPACE_SCOPED_INSTANCES"}
514514

515515
if EnvNonOLM() {
516516

test/openshift/e2e/ginkgo/parallel/1-007_validate_volume_mounts_test.go

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,67 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
143143

144144
})
145145

146+
It("verifies that dex controller has the expected volumes and volumemounts, including custom volumes and volumemounts", func() {
147+
148+
By("creating new namespace-scoped Argo CD instance with dex enabled and custom volumes and volume mounts")
149+
randomNS, cleanupFunc = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc()
150+
151+
argoCDRandomNS := &argov1beta1api.ArgoCD{
152+
ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: randomNS.Name},
153+
Spec: argov1beta1api.ArgoCDSpec{
154+
SSO: &argov1beta1api.ArgoCDSSOSpec{
155+
Provider: argov1beta1api.SSOProviderTypeDex,
156+
Dex: &argov1beta1api.ArgoCDDexSpec{
157+
OpenShiftOAuth: true,
158+
Volumes: []corev1.Volume{
159+
{Name: "custom-dex-volume", VolumeSource: corev1.VolumeSource{EmptyDir: &corev1.EmptyDirVolumeSource{}}},
160+
},
161+
VolumeMounts: []corev1.VolumeMount{
162+
{Name: "custom-dex-volume", MountPath: "/custom/dex"},
163+
},
164+
},
165+
},
166+
},
167+
}
168+
Expect(k8sClient.Create(ctx, argoCDRandomNS)).To(Succeed())
169+
170+
By("verifying Argo CD is available and Dex is running")
171+
Eventually(argoCDRandomNS, "5m", "5s").Should(argocdFixture.BeAvailable())
172+
173+
By("verifying dex server Deployment has the expected volume and volumemount values")
174+
dexServerDepl := appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: "argocd-dex-server", Namespace: randomNS.Name}}
175+
176+
Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(&dexServerDepl), &dexServerDepl)).To(Succeed())
177+
178+
// Check that custom volume mounts are present
179+
Expect(dexServerDepl.Spec.Template.Spec.Containers[0].VolumeMounts).To(Equal([]corev1.VolumeMount{
180+
{Name: "static-files", MountPath: "/shared"},
181+
{Name: "dexconfig", MountPath: "/tmp"},
182+
{Name: "custom-dex-volume", MountPath: "/custom/dex"},
183+
}))
184+
185+
// Verify that the deployment has the expected volumes (including custom ones)
186+
Expect(dexServerDepl.Spec.Template.Spec.Volumes).To(Equal([]corev1.Volume{
187+
{
188+
Name: "static-files",
189+
VolumeSource: corev1.VolumeSource{
190+
EmptyDir: &corev1.EmptyDirVolumeSource{},
191+
},
192+
},
193+
{
194+
Name: "dexconfig",
195+
VolumeSource: corev1.VolumeSource{
196+
EmptyDir: &corev1.EmptyDirVolumeSource{},
197+
},
198+
},
199+
{
200+
Name: "custom-dex-volume",
201+
VolumeSource: corev1.VolumeSource{
202+
EmptyDir: &corev1.EmptyDirVolumeSource{},
203+
},
204+
},
205+
}))
206+
})
207+
146208
})
147209
})

0 commit comments

Comments
 (0)