Skip to content

Commit 674f389

Browse files
Add open-cluster-management-policies namespace to the GRC watch namespaces
Ref: https://issues.redhat.com/browse/ACM-13609 Signed-off-by: yiraeChristineKim <[email protected]>
1 parent 6fad01a commit 674f389

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

pkg/addon/policyframework/manifests/managedclusterchart/templates/namespace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ apiVersion: v1
55
kind: Namespace
66
metadata:
77
name: "{{ .Values.clusterName }}"
8-
{{- end }}
8+
{{- end }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright Contributors to the Open Cluster Management project
2+
3+
{{- if ne .Values.installMode "Hosted" }}
4+
apiVersion: v1
5+
kind: Namespace
6+
metadata:
7+
name: open-cluster-management-policies
8+
{{- end }}

test/e2e/case1_framework_deployment_test.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const (
2727
case1PodSelector string = "app=governance-policy-framework"
2828
case1MWName string = "addon-governance-policy-framework-deploy-0"
2929
case1MWPatch string = "../resources/manifestwork_add_patch.json"
30+
ocmPolicyNs string = "open-cluster-management-policies"
3031
)
3132

3233
var _ = Describe("Test framework deployment", Ordered, func() {
@@ -72,7 +73,7 @@ var _ = Describe("Test framework deployment", Ordered, func() {
7273

7374
By(logPrefix +
7475
"removing the framework deployment when the ManagedClusterAddOn CR is removed")
75-
Kubectl("delete", "-n", cluster.clusterName, "-f", case1ManagedClusterAddOnCR, "--timeout=90s")
76+
Kubectl("delete", "-n", cluster.clusterName, "-f", case1ManagedClusterAddOnCR, "--timeout=180s")
7677
deploy = GetWithTimeout(
7778
cluster.clusterClient, gvrDeployment, case1DeploymentName, agentInstallNs, false, 180,
7879
)
@@ -83,6 +84,11 @@ var _ = Describe("Test framework deployment", Ordered, func() {
8384
}
8485
pods := ListWithTimeoutByNamespace(cluster.clusterClient, gvrPod, opts, agentInstallNs, 0, false, 180)
8586
Expect(pods).To(BeNil())
87+
88+
By("Should not have " + ocmPolicyNs + " in hosted mode")
89+
GetWithTimeout(
90+
cluster.clusterClient, gvrNamespace, ocmPolicyNs, "", false, 60,
91+
)
8692
}
8793
})
8894

@@ -316,6 +322,12 @@ var _ = Describe("Test framework deployment", Ordered, func() {
316322
cluster.clusterClient, gvrDeployment, case1DeploymentName, addonNamespace, false, 30,
317323
)
318324
Expect(deploy).To(BeNil())
325+
326+
By("Should have " + ocmPolicyNs + " in normal mode")
327+
ns := GetWithTimeout(
328+
cluster.clusterClient, gvrNamespace, ocmPolicyNs, "", true, 60,
329+
)
330+
Expect(ns).ShouldNot(BeNil())
319331
}
320332
})
321333

0 commit comments

Comments
 (0)