Skip to content

Commit

Permalink
Use v1beta2 ManagedClusterSet API since v1beta1 is deprecated
Browse files Browse the repository at this point in the history
Need to switch to the new ManagedClusterSet and ManagedClusterSetBinding
APIs since v1beta1 is deprecated.  Moving to v1beta2

Signed-off-by: Gus Parvin <[email protected]>
(cherry picked from commit 79df77a)
  • Loading branch information
gparvin authored and magic-mirror-bot[bot] committed Sep 1, 2023
1 parent f35aea3 commit f0b03a3
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
name: authrealm-sample-github-ns
- complianceType: musthave
objectDefinition:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSet
metadata:
name: authrealm-sample-github-clusterset
Expand All @@ -53,7 +53,7 @@ spec:
authdeployment: sample-github
- complianceType: musthave
objectDefinition:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
metadata:
name: authrealm-sample-github-clusterset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
name: policies
- complianceType: musthave
objectDefinition:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
metadata:
namespace: policies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
- CREATE
- UPDATE
generate:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
name: blueteam
namespace: "{{request.object.metadata.name}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
value:
- CREATE
generate:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
name: redteam
namespace: "{{request.object.metadata.name}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
- CREATE
- UPDATE
generate:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
name: blueteam
namespace: "{{request.object.metadata.name}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
- CREATE
- UPDATE
generate:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
name: redteam
namespace: "{{request.object.metadata.name}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
operator: AnyNotIn
value: shared*
generate:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
name: blueteam
namespace: "{{request.object.metadata.name}}"
Expand Down Expand Up @@ -65,7 +65,7 @@ spec:
operator: AnyNotIn
value: shared*
generate:
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
name: redteam
namespace: "{{request.object.metadata.name}}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: cluster.open-cluster-management.io/v1beta1
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
metadata:
namespace: policies
Expand Down
4 changes: 2 additions & 2 deletions policygenerator/policy-sets/stable/acm-hardening/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This `PolicySet` needs to be deployed only to the Advanced Cluster Management hu

**Note**: The `PolicySet` uses cluster `Placement` and not the `PlacementRule` placement mechanism, so the namespace of
the `Placement` must also be bound to a `ManagedClusterSet` using a `ManagedClusterSetBinding`. See the
[Placement](https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.6/html-single/multicluster_engine/index#placement-overview)
[Placement](https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.8/html/clusters/cluster_mce_overview#placement-overview)
and
[ManagedClusterSetBinding](https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.6/html-single/multicluster_engine/index#creating-a-managedclustersetbinding)
[ManagedClusterSetBinding](https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.8/html/clusters/cluster_mce_overview#creating-managedclustersetbinding)
documentation.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Prior to applying the `PolicySet`, perform these steps:
2. Install the Policy generator Kustomize plugin by following the [installation instructions](https://github.com/stolostron/policy-generator-plugin#installation). It is recommended to use Kustomize v4.5+.
3. Policies are installed to the `policies` namespace. Make sure the placement bindings match this namespace for the hub and other managed clusters.
Example yaml to apply a ManagedClusterSetBinding for the policies namespace.
```apiVersion: cluster.open-cluster-management.io/v1beta1
```apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
metadata:
name: default
Expand Down

0 comments on commit f0b03a3

Please sign in to comment.