From f69b82edd4d17fadde2c5f4da3b62fbe01ef7969 Mon Sep 17 00:00:00 2001 From: Rokibul Hasan Date: Fri, 27 Oct 2023 21:39:02 +0600 Subject: [PATCH] Add ocm connections (#379) Signed-off-by: Rokibul Hasan --- .../v1beta2/managedclustersetbindings.yaml | 2 +- .../v1alpha1/manifestworkreplicasets.yaml | 11 +++++++++++ .../v1alpha1/manifestworkreplicasets.yaml | 8 ++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/hub/resourceblockdefinitions/cluster.open-cluster-management.io/v1beta2/managedclustersetbindings.yaml b/hub/resourceblockdefinitions/cluster.open-cluster-management.io/v1beta2/managedclustersetbindings.yaml index eb7ece8e0..70b582ba3 100644 --- a/hub/resourceblockdefinitions/cluster.open-cluster-management.io/v1beta2/managedclustersetbindings.yaml +++ b/hub/resourceblockdefinitions/cluster.open-cluster-management.io/v1beta2/managedclustersetbindings.yaml @@ -16,7 +16,7 @@ spec: kind: Connection name: ManagedClusterSets query: - byLabel: offshoot + byLabel: ocm_bind type: GraphQL ref: group: cluster.open-cluster-management.io diff --git a/hub/resourceblockdefinitions/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml b/hub/resourceblockdefinitions/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml index e5c4899c2..a8c62eedb 100644 --- a/hub/resourceblockdefinitions/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml +++ b/hub/resourceblockdefinitions/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml @@ -21,6 +21,17 @@ spec: ref: group: work.open-cluster-management.io kind: ManifestWork + - actions: + create: Never + displayMode: List + kind: Connection + name: Placements + query: + byLabel: placed_into + type: GraphQL + ref: + group: cluster.open-cluster-management.io + kind: Placement resource: group: work.open-cluster-management.io kind: ManifestWorkReplicaSet diff --git a/hub/resourcedescriptors/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml b/hub/resourcedescriptors/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml index 5085f75ec..5c2d675ce 100644 --- a/hub/resourcedescriptors/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml +++ b/hub/resourcedescriptors/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml @@ -19,6 +19,14 @@ spec: apiVersion: work.open-cluster-management.io/v1 kind: ManifestWork type: MatchSelector + - labels: + - placed_into + references: + - '{range .spec.placementRefs[*]}{.name}{"\n"}{end}' + target: + apiVersion: cluster.open-cluster-management.io/v1beta1 + kind: Placement + type: MatchRef resource: group: work.open-cluster-management.io kind: ManifestWorkReplicaSet