Skip to content

Commit d4aa155

Browse files
committed
Use the global clusterset
This still has some debug lines we can remove later. Signed-off-by: Justin Kulikauskas <[email protected]>
1 parent eb0d17d commit d4aa155

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

test/integration/policy_generator_acm_hardening_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
k8serrors "k8s.io/apimachinery/pkg/api/errors"
1212
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1313
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
14+
"open-cluster-management.io/governance-policy-propagator/test/utils"
1415

1516
"github.com/stolostron/governance-policy-framework/test/common"
1617
)
@@ -107,6 +108,8 @@ var _ = Describe("GRC: [P1][Sev1][policy-grc] Test the ACM Hardening "+
107108
1,
108109
).Should(BeNil())
109110

111+
eCounter := 0
112+
110113
By("Checking that the policy-managedclusteraddon-available policy " +
111114
"was propagated to the local-cluster namespace")
112115
Eventually(
@@ -117,6 +120,24 @@ var _ = Describe("GRC: [P1][Sev1][policy-grc] Test the ACM Hardening "+
117120
metav1.GetOptions{},
118121
)
119122

123+
if eCounter > 9 {
124+
eCounter = 0
125+
126+
GinkgoWriter.Print("placement: ")
127+
_, _ = utils.KubectlWithOutput("get", "placement", "-A", "-ojsonpath={@}",
128+
"--kubeconfig="+kubeconfigHub)
129+
130+
GinkgoWriter.Print("managedclusterset: ")
131+
_, _ = utils.KubectlWithOutput("get", "managedclusterset", "-A", "-ojsonpath={@}",
132+
"--kubeconfig="+kubeconfigHub)
133+
134+
GinkgoWriter.Print("managedclustersetbinding: ")
135+
_, _ = utils.KubectlWithOutput("get", "managedclustersetbinding", "-A", "-ojsonpath={@}",
136+
"--kubeconfig="+kubeconfigHub)
137+
}
138+
139+
eCounter++
140+
120141
return err
121142
},
122143
defaultTimeoutSeconds*2,

test/resources/policy_generator/acm-hardening_subscription.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: cluster.open-cluster-management.io/v1beta2
33
kind: ManagedClusterSetBinding
44
metadata:
5-
name: default
5+
name: global
66
spec:
7-
clusterSet: default
7+
clusterSet: global
88
---
99
apiVersion: app.k8s.io/v1beta1
1010
kind: Application

0 commit comments

Comments
 (0)