From 5b5511d4826c0ed4c1bc51bdd5262d3f806dd56f Mon Sep 17 00:00:00 2001 From: bcm820 Date: Wed, 21 Feb 2024 09:57:36 -0500 Subject: [PATCH] e2e: Use full infrastructureRef to delegate owner assignment to CAPI controller (#102) --- .../minimal/01-create-cluster.yaml | 2 ++ .../minimal/02-create-linodecluster.tpl.yml | 11 ----------- .../minimal/02-create-linodecluster.yaml | 12 ++++++------ 3 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 e2e/linodecluster-controller/minimal/02-create-linodecluster.tpl.yml diff --git a/e2e/linodecluster-controller/minimal/01-create-cluster.yaml b/e2e/linodecluster-controller/minimal/01-create-cluster.yaml index 300c2cae0..6040cd133 100644 --- a/e2e/linodecluster-controller/minimal/01-create-cluster.yaml +++ b/e2e/linodecluster-controller/minimal/01-create-cluster.yaml @@ -4,4 +4,6 @@ metadata: name: cluster-sample spec: infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 + kind: LinodeCluster name: linodecluster-sample diff --git a/e2e/linodecluster-controller/minimal/02-create-linodecluster.tpl.yml b/e2e/linodecluster-controller/minimal/02-create-linodecluster.tpl.yml deleted file mode 100644 index 81aa7c0ba..000000000 --- a/e2e/linodecluster-controller/minimal/02-create-linodecluster.tpl.yml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 -kind: LinodeCluster -metadata: - name: linodecluster-sample - ownerReferences: - - apiVersion: cluster.x-k8s.io/v1beta1 - kind: Cluster - name: cluster-sample - uid: ${CLUSTER_UID} -spec: - region: us-sea diff --git a/e2e/linodecluster-controller/minimal/02-create-linodecluster.yaml b/e2e/linodecluster-controller/minimal/02-create-linodecluster.yaml index 231b7ef0a..ac8eb7220 100644 --- a/e2e/linodecluster-controller/minimal/02-create-linodecluster.yaml +++ b/e2e/linodecluster-controller/minimal/02-create-linodecluster.yaml @@ -1,6 +1,6 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: |- - CLUSTER_UID="$(OBJ=clusters/cluster-sample make getKubeUid)" \ - TS="$(TPL="$PWD/02-create-linodecluster.tpl.yml" make renderTestCase)" make runTestSuit +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 +kind: LinodeCluster +metadata: + name: linodecluster-sample +spec: + region: us-sea