diff --git a/examples/ansible-post/appsub/01-clustersetbinding.yaml b/examples/ansible-post/appsub/01-clustersetbinding.yaml new file mode 100644 index 00000000..10367a26 --- /dev/null +++ b/examples/ansible-post/appsub/01-clustersetbinding.yaml @@ -0,0 +1,7 @@ +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default diff --git a/examples/ansible-post/appsub/01-placement-rule.yaml b/examples/ansible-post/appsub/01-placement-rule.yaml deleted file mode 100644 index 0a14f118..00000000 --- a/examples/ansible-post/appsub/01-placement-rule.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule -metadata: - name: non-local-cluster - namespace: default -spec: - # apply to 1 cluster whoevers name not local-cluster - clusterReplicas: 1 - clusterSelector: - matchExpressions: - - key: name - operator: NotIn - values: - - local-cluster diff --git a/examples/ansible-post/appsub/02-placement.yaml b/examples/ansible-post/appsub/02-placement.yaml new file mode 100644 index 00000000..5b20483e --- /dev/null +++ b/examples/ansible-post/appsub/02-placement.yaml @@ -0,0 +1,18 @@ +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement +metadata: + name: non-local-cluster + namespace: default +spec: + # apply to 1 cluster whoevers name not local-cluster + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: name + operator: "NotIn" + values: + - local-cluster \ No newline at end of file diff --git a/examples/ansible-post/appsub/03-subscription.yaml b/examples/ansible-post/appsub/03-subscription.yaml index 2ee7da23..ce0d3720 100644 --- a/examples/ansible-post/appsub/03-subscription.yaml +++ b/examples/ansible-post/appsub/03-subscription.yaml @@ -13,5 +13,6 @@ spec: channel: default/git placement: placementRef: - kind: PlacementRule + kind: Placement name: non-local-cluster + namespace: default diff --git a/examples/ansible-pre-workflow/appsub/01-clustersetbinding.yaml b/examples/ansible-pre-workflow/appsub/01-clustersetbinding.yaml new file mode 100644 index 00000000..10367a26 --- /dev/null +++ b/examples/ansible-pre-workflow/appsub/01-clustersetbinding.yaml @@ -0,0 +1,7 @@ +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default diff --git a/examples/ansible-pre-workflow/appsub/01-placement-rule.yaml b/examples/ansible-pre-workflow/appsub/01-placement-rule.yaml deleted file mode 100644 index 0a14f118..00000000 --- a/examples/ansible-pre-workflow/appsub/01-placement-rule.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule -metadata: - name: non-local-cluster - namespace: default -spec: - # apply to 1 cluster whoevers name not local-cluster - clusterReplicas: 1 - clusterSelector: - matchExpressions: - - key: name - operator: NotIn - values: - - local-cluster diff --git a/examples/ansible-pre-workflow/appsub/02-placement.yaml b/examples/ansible-pre-workflow/appsub/02-placement.yaml new file mode 100644 index 00000000..5b20483e --- /dev/null +++ b/examples/ansible-pre-workflow/appsub/02-placement.yaml @@ -0,0 +1,18 @@ +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement +metadata: + name: non-local-cluster + namespace: default +spec: + # apply to 1 cluster whoevers name not local-cluster + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: name + operator: "NotIn" + values: + - local-cluster \ No newline at end of file diff --git a/examples/ansible-pre-workflow/appsub/03-subscription.yaml b/examples/ansible-pre-workflow/appsub/03-subscription.yaml index 43320c67..926baa49 100644 --- a/examples/ansible-pre-workflow/appsub/03-subscription.yaml +++ b/examples/ansible-pre-workflow/appsub/03-subscription.yaml @@ -13,5 +13,6 @@ spec: channel: default/git placement: placementRef: - kind: PlacementRule + kind: Placement name: non-local-cluster + namespace: default diff --git a/examples/ansible-tags/appsub/01-clustersetbinding.yaml b/examples/ansible-tags/appsub/01-clustersetbinding.yaml new file mode 100644 index 00000000..10367a26 --- /dev/null +++ b/examples/ansible-tags/appsub/01-clustersetbinding.yaml @@ -0,0 +1,7 @@ +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default diff --git a/examples/ansible-tags/appsub/01-placement-rule.yaml b/examples/ansible-tags/appsub/01-placement-rule.yaml deleted file mode 100644 index 0a14f118..00000000 --- a/examples/ansible-tags/appsub/01-placement-rule.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule -metadata: - name: non-local-cluster - namespace: default -spec: - # apply to 1 cluster whoevers name not local-cluster - clusterReplicas: 1 - clusterSelector: - matchExpressions: - - key: name - operator: NotIn - values: - - local-cluster diff --git a/examples/ansible-tags/appsub/02-placement.yaml b/examples/ansible-tags/appsub/02-placement.yaml new file mode 100644 index 00000000..5b20483e --- /dev/null +++ b/examples/ansible-tags/appsub/02-placement.yaml @@ -0,0 +1,18 @@ +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement +metadata: + name: non-local-cluster + namespace: default +spec: + # apply to 1 cluster whoevers name not local-cluster + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: name + operator: "NotIn" + values: + - local-cluster \ No newline at end of file diff --git a/examples/ansible-tags/appsub/03-subscription.yaml b/examples/ansible-tags/appsub/03-subscription.yaml index a396ab6b..756d1bc0 100644 --- a/examples/ansible-tags/appsub/03-subscription.yaml +++ b/examples/ansible-tags/appsub/03-subscription.yaml @@ -13,5 +13,6 @@ spec: channel: default/git placement: placementRef: - kind: PlacementRule + kind: Placement name: non-local-cluster + namespace: default \ No newline at end of file diff --git a/examples/ansible/appsub/01-clustersetbinding.yaml b/examples/ansible/appsub/01-clustersetbinding.yaml new file mode 100644 index 00000000..10367a26 --- /dev/null +++ b/examples/ansible/appsub/01-clustersetbinding.yaml @@ -0,0 +1,7 @@ +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default diff --git a/examples/ansible/appsub/01-placement-rule.yaml b/examples/ansible/appsub/01-placement-rule.yaml deleted file mode 100644 index 0a14f118..00000000 --- a/examples/ansible/appsub/01-placement-rule.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule -metadata: - name: non-local-cluster - namespace: default -spec: - # apply to 1 cluster whoevers name not local-cluster - clusterReplicas: 1 - clusterSelector: - matchExpressions: - - key: name - operator: NotIn - values: - - local-cluster diff --git a/examples/ansible/appsub/02-placement.yaml b/examples/ansible/appsub/02-placement.yaml new file mode 100644 index 00000000..5b20483e --- /dev/null +++ b/examples/ansible/appsub/02-placement.yaml @@ -0,0 +1,18 @@ +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement +metadata: + name: non-local-cluster + namespace: default +spec: + # apply to 1 cluster whoevers name not local-cluster + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: name + operator: "NotIn" + values: + - local-cluster \ No newline at end of file diff --git a/examples/ansible/appsub/03-subscription.yaml b/examples/ansible/appsub/03-subscription.yaml index ad6183ec..dfad741f 100644 --- a/examples/ansible/appsub/03-subscription.yaml +++ b/examples/ansible/appsub/03-subscription.yaml @@ -13,5 +13,6 @@ spec: channel: default/git placement: placementRef: - kind: PlacementRule + kind: Placement name: non-local-cluster + namespace: default diff --git a/examples/e2e_example/github_channel_e2e.yaml b/examples/e2e_example/github_channel_e2e.yaml index 49648adb..8f1abde9 100644 --- a/examples/e2e_example/github_channel_e2e.yaml +++ b/examples/e2e_example/github_channel_e2e.yaml @@ -34,24 +34,38 @@ spec: type: Git pathname: https://github.com/ianzhang366/acm-applifecycle-samples.git --- -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default +--- +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement metadata: name: towhichcluster - namespace: git-sub-ns + namespace: default labels: name: git-sub spec: - clusterReplicas: 1 - clusterLabels: - matchLabels: - environment: Dev + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: environment + operator: "In" + values: + - Dev --- apiVersion: apps.open-cluster-management.io/v1 kind: Subscription metadata: name: git-sub - namespace: git-sub-ns labels: name: git-sub annotations: @@ -61,4 +75,5 @@ spec: placement: placementRef: name: towhichcluster - kind: PlacementRule + namespace: default + kind: Placement diff --git a/examples/e2e_example/github_helm_channel_e2e.yaml b/examples/e2e_example/github_helm_channel_e2e.yaml index 12cd27a1..f358503e 100644 --- a/examples/e2e_example/github_helm_channel_e2e.yaml +++ b/examples/e2e_example/github_helm_channel_e2e.yaml @@ -34,24 +34,38 @@ spec: type: Git pathname: https://github.com/open-cluster-management/multicloud-operators-subscription --- -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default +--- +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement metadata: name: towhichcluster - namespace: git-sub-ns-helm + namespace: default labels: name: git-sub spec: - clusterReplicas: 1 - clusterLabels: - matchLabels: - environment: Dev + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: environment + operator: "In" + values: + - Dev --- apiVersion: apps.open-cluster-management.io/v1 kind: Subscription metadata: name: git-helm-sub - namespace: git-sub-ns-helm annotations: apps.open-cluster-management.io/github-path: test/github/helmcharts/chart1 labels: @@ -61,4 +75,5 @@ spec: placement: placementRef: name: towhichcluster - kind: PlacementRule + namespace: default + kind: Placement diff --git a/examples/e2e_example/helm_channel_e2e.yaml b/examples/e2e_example/helm_channel_e2e.yaml index d93cc19a..f4474c27 100644 --- a/examples/e2e_example/helm_channel_e2e.yaml +++ b/examples/e2e_example/helm_channel_e2e.yaml @@ -35,24 +35,38 @@ spec: pathname: https://ianzhang366.github.io/guestbook-chart/ insecureSkipVerify: true --- -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default +--- +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement metadata: name: towhichcluster - namespace: helm-sub-ns + namespace: default labels: name: helm-sub spec: - clusterReplicas: 1 - clusterLabels: - matchLabels: - environment: Dev + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: environment + operator: "In" + values: + - Dev --- apiVersion: apps.open-cluster-management.io/v1 kind: Subscription metadata: name: helm-sub - namespace: helm-sub-ns labels: name: helm-sub spec: @@ -63,4 +77,5 @@ spec: placement: placementRef: name: towhichcluster - kind: PlacementRule + namespace: default + kind: Placement diff --git a/examples/e2e_example/namespace_channel_e2e.yaml b/examples/e2e_example/namespace_channel_e2e.yaml index 0146fa3e..5b70c7f2 100644 --- a/examples/e2e_example/namespace_channel_e2e.yaml +++ b/examples/e2e_example/namespace_channel_e2e.yaml @@ -47,24 +47,38 @@ spec: sourceNamespaces: - default --- -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default +--- +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement metadata: name: towhichcluster - namespace: ns-sub-ns + namespace: default labels: name: ns-sub spec: - clusterReplicas: 1 - clusterLabels: - matchLabels: - environment: Dev + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: environment + operator: "In" + values: + - Dev --- apiVersion: apps.open-cluster-management.io/v1 kind: Subscription metadata: name: ns-sub - namespace: ns-sub-ns labels: name: ns-sub spec: @@ -72,7 +86,8 @@ spec: placement: placementRef: name: towhichcluster - kind: PlacementRule + namespace: default + kind: Placement timewindow: windowtype: "active" location: "America/Toronto" diff --git a/examples/e2e_example/object_bucket_e2e.yaml b/examples/e2e_example/object_bucket_e2e.yaml index 00426a77..271c3701 100644 --- a/examples/e2e_example/object_bucket_e2e.yaml +++ b/examples/e2e_example/object_bucket_e2e.yaml @@ -49,24 +49,38 @@ data: AccessKeyID: YWRtaW4= SecretAccessKey: cGFzc3dvcmRhZG1pbg== --- -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default +--- +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement metadata: name: towhichcluster - namespace: obj-sub-ns + namespace: default labels: - name: obj-sub + name: obj-sub-ns spec: - clusterReplicas: 1 - clusterLabels: - matchLabels: - environment: Dev + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: environment + operator: "In" + values: + - Dev --- apiVersion: apps.open-cluster-management.io/v1 kind: Subscription metadata: name: obj-sub - namespace: obj-sub-ns labels: name: obj-sub spec: @@ -74,4 +88,5 @@ spec: placement: placementRef: name: towhichcluster - kind: PlacementRule + namespace: default + kind: Placement diff --git a/examples/e2e_example/self-host-git.yaml b/examples/e2e_example/self-host-git.yaml index 14265165..71bb8a4f 100644 --- a/examples/e2e_example/self-host-git.yaml +++ b/examples/e2e_example/self-host-git.yaml @@ -45,24 +45,38 @@ data: user: accessToken: --- -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule +apiVersion: cluster.open-cluster-management.io/v1beta2 +kind: ManagedClusterSetBinding +metadata: + name: default + namespace: default +spec: + clusterSet: default +--- +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement metadata: name: towhichcluster - namespace: git-sub-ns + namespace: default labels: name: git-sub spec: - clusterReplicas: 1 - clusterLabels: - matchLabels: - name: spoke + numberOfClusters: 1 + clusterSets: + - default + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: name + operator: "In" + values: + - spoke --- apiVersion: apps.open-cluster-management.io/v1 kind: Subscription metadata: name: git-sub - namespace: git-sub-ns labels: name: git-sub annotations: @@ -72,4 +86,6 @@ spec: placement: placementRef: name: towhichcluster + namespace: default + kind: Placement