Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] [improvement] move apiserver loadbalancing logic from linodemachine controller to linodecluster controller #457

Merged
merged 41 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3421652
move loadbalancing logic from linodemachine to linodecluster
amold1 Aug 15, 2024
db6088f
update cluster_test
amold1 Aug 15, 2024
830fab3
update machine_test
amold1 Aug 15, 2024
ad1c49a
update domains_test
amold1 Aug 15, 2024
2db6032
update cluster_test and machine_test
amold1 Aug 15, 2024
3a97498
update loadbalancers_test
amold1 Aug 15, 2024
a55a5a2
update linodemachine_controller_test
amold1 Aug 15, 2024
e8ba740
fix linting issues and all tests except linodecluster_controller ones
amold1 Aug 15, 2024
1031ec7
fix nilcheck failure
amold1 Aug 15, 2024
cc0d43b
Merge branch 'main' into dns.cleanup
amold1 Aug 15, 2024
bb66598
add filtering for only controlplane nodes to trigger reconciliation
amold1 Aug 16, 2024
0ceb101
fix lint errors
amold1 Aug 16, 2024
8aceb74
Merge branch 'main' into dns.cleanup
amold1 Aug 16, 2024
ccbc4e2
add support for rke2 and kthrees
amold1 Aug 16, 2024
6bde061
fix ip parsing and deletion failures
amold1 Aug 17, 2024
96963a8
Merge branch 'main' into dns.cleanup
amold1 Aug 17, 2024
bfdda7e
remove controlplane logic
amold1 Aug 17, 2024
8aceba5
remove cp rbac roles
amold1 Aug 17, 2024
4d6636d
fix mock tests
amold1 Aug 20, 2024
7ab659c
Merge branch 'main' into dns.cleanup
amold1 Aug 20, 2024
879c933
address comments from ashley
amold1 Aug 20, 2024
07b5612
fix linter issues
amold1 Aug 20, 2024
e0c929d
directly return err/nil instead of if/else
amold1 Aug 20, 2024
2c5c4e4
check for 429 errors
amold1 Aug 20, 2024
b087a64
fix linodemachine e2e tests
amold1 Aug 20, 2024
694df28
update returned errors and update tests
amold1 Aug 20, 2024
f577ec0
remove commented out code
amold1 Aug 20, 2024
fa40846
remove instanceid from spec in tests
amold1 Aug 20, 2024
64cb394
fix import order for lint
amold1 Aug 20, 2024
9616754
fix minimal-linodecluster e2e test
amold1 Aug 20, 2024
94ecb1f
add debug for minimal-linodecluster e2e test
amold1 Aug 20, 2024
d345348
debugging
amold1 Aug 20, 2024
361c11f
remove debugging
amold1 Aug 20, 2024
59f9edc
debugging
amold1 Aug 21, 2024
c9a154a
add NB backend nodes only if it doesn't already exist
amold1 Aug 21, 2024
edcb049
update NB delete if condition
amold1 Aug 21, 2024
f3aba03
use machine object to determine if linodemachine is a controlplane node
amold1 Aug 21, 2024
f5bcc03
keep the function scope limited to the package and dont export
amold1 Aug 21, 2024
feae180
remove dbug logging
amold1 Aug 21, 2024
ed75083
do not return if ips havent been set yet
amold1 Aug 21, 2024
2dda21f
Merge branch 'main' into dns.cleanup
amold1 Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cloud/services/domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import (
"context"
"encoding/json"
"errors"
"fmt"
"net"
"net/netip"
Expand Down Expand Up @@ -42,7 +41,7 @@
}

if len(dnsEntries) == 0 {
return errors.New("dnsEntries are empty")
return nil
}

if cscope.LinodeCluster.Spec.Network.DNSProvider == "akamai" {
Expand Down Expand Up @@ -93,13 +92,13 @@
}
// Record was not found - if operation is not "create", nothing to do
if operation != "create" {
return nil

Check warning on line 95 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L95

Added line #L95 was not covered by tests
}
// Create record
return createAkamaiEntry(ctx, akaDNSClient, dnsEntry, fqdn, rootDomain)
}
if recordBody == nil {
return fmt.Errorf("akamai dns returned empty dns record")

Check warning on line 101 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L101

Added line #L101 was not covered by tests
}

// if operation is delete and we got the record, delete it
Expand All @@ -108,20 +107,20 @@
}
// if operation is create and we got the record, update it
// Check if the target already exists in the target list
for _, target := range recordBody.Target {
if recordBody.RecordType == "TXT" {
if strings.Contains(target, dnsEntry.Target) {
return nil

Check warning on line 113 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L110-L113

Added lines #L110 - L113 were not covered by tests
}
} else {
if slices.Equal(net.ParseIP(target), net.ParseIP(dnsEntry.Target)) {
return nil

Check warning on line 117 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L116-L117

Added lines #L116 - L117 were not covered by tests
}
}
}
// Target doesn't exist so lets append it to the existing list and update it
recordBody.Target = append(recordBody.Target, dnsEntry.Target)
return akaDNSClient.UpdateRecord(ctx, recordBody, rootDomain)

Check warning on line 123 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L122-L123

Added lines #L122 - L123 were not covered by tests
}

func createAkamaiEntry(ctx context.Context, client clients.AkamClient, dnsEntry DNSOptions, fqdn, rootDomain string) error {
Expand All @@ -139,14 +138,14 @@

func deleteAkamaiEntry(ctx context.Context, client clients.AkamClient, recordBody *dns.RecordBody, dnsEntry DNSOptions, rootDomain string) error {
switch {
case len(recordBody.Target) > 1:
recordBody.Target = removeElement(
recordBody.Target,

Check warning on line 143 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L141-L143

Added lines #L141 - L143 were not covered by tests
// Linode DNS API formats the IPv6 IPs using :: for :0:0: while the address from the LinodeMachine status keeps it as is
// So we need to match that
strings.Replace(dnsEntry.Target, "::", ":0:0:", 8), //nolint:mnd // 8 for 8 octest
)
return client.UpdateRecord(ctx, recordBody, rootDomain)

Check warning on line 148 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L146-L148

Added lines #L146 - L148 were not covered by tests
default:
return client.DeleteRecord(ctx, recordBody, rootDomain)
}
Expand Down Expand Up @@ -177,11 +176,11 @@
for _, IPs := range eachMachine.Status.Addresses {
recordType := linodego.RecordTypeA
if IPs.Type != v1beta1.MachineExternalIP {
continue

Check warning on line 179 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L179

Added line #L179 was not covered by tests
}
addr, err := netip.ParseAddr(IPs.Address)
if err != nil {
return nil, fmt.Errorf("not a valid IP %w", err)

Check warning on line 183 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L183

Added line #L183 was not covered by tests
}
if !addr.Is4() {
recordType = linodego.RecordTypeAAAA
Expand Down Expand Up @@ -291,7 +290,7 @@

// If record exists, update it
if len(domainRecords) == 0 {
return false, fmt.Errorf("no txt record %s found with value %s for machine %s", hostname, cscope.LinodeCluster.Name, cscope.LinodeCluster.Name)

Check warning on line 293 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L293

Added line #L293 was not covered by tests
}

return true, nil
Expand All @@ -299,7 +298,7 @@

func getSubDomain(cscope *scope.ClusterScope) (subDomain string) {
if cscope.LinodeCluster.Spec.Network.DNSSubDomainOverride != "" {
subDomain = cscope.LinodeCluster.Spec.Network.DNSSubDomainOverride

Check warning on line 301 in cloud/services/domains.go

View check run for this annotation

Codecov / codecov/patch

cloud/services/domains.go#L301

Added line #L301 was not covered by tests
} else {
uniqueID := ""
if cscope.LinodeCluster.Spec.Network.DNSUniqueIdentifier != "" {
Expand Down
20 changes: 3 additions & 17 deletions cloud/services/domains_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ func TestAddIPToDNS(t *testing.T) {
},
}, nil).AnyTimes()
},
expectedError: fmt.Errorf("dnsEntries are empty"),
expectedError: nil,
expectK8sClient: func(mockK8sClient *mock.MockK8sClient) {
mockK8sClient.EXPECT().Scheme().Return(nil).AnyTimes()
},
Expand Down Expand Up @@ -981,7 +981,7 @@ func TestDeleteIPFromDNS(t *testing.T) {
},
},
{
name: "Error - failed to get machine ip",
name: "Error - failed to get machine",
clusterScope: &scope.ClusterScope{
Cluster: &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -1002,23 +1002,9 @@ func TestDeleteIPFromDNS(t *testing.T) {
},
},
},
LinodeMachines: infrav1alpha2.LinodeMachineList{
Items: []infrav1alpha2.LinodeMachine{
{
ObjectMeta: metav1.ObjectMeta{
Name: "test-machine",
UID: "test-uid",
},
Spec: infrav1alpha2.LinodeMachineSpec{
ProviderID: ptr.To("linode://123"),
InstanceID: ptr.To(123),
},
},
},
},
},
expects: func(mockClient *mock.MockLinodeClient) {},
expectedError: fmt.Errorf("dnsEntries are empty"),
expectedError: nil,
expectK8sClient: func(mockK8sClient *mock.MockK8sClient) {
mockK8sClient.EXPECT().Scheme().Return(nil).AnyTimes()
},
Expand Down
2 changes: 1 addition & 1 deletion controller/linodecluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@
clusterScope, err := scope.NewClusterScope(
ctx,
r.LinodeClientConfig,
r.DnsClientConfig,

Check warning on line 102 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L102

Added line #L102 was not covered by tests
scope.ClusterScopeParams{
Client: r.TracedClient(),
Cluster: cluster,
LinodeCluster: linodeCluster,
LinodeMachineList: infrav1alpha2.LinodeMachineList{},

Check warning on line 107 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L104-L107

Added lines #L104 - L107 were not covered by tests
},
)

Expand Down Expand Up @@ -141,7 +141,7 @@
clusterv1.MachineControlPlaneLabel: "",
}
if err := r.TracedClient().List(ctx, &clusterScope.LinodeMachines, client.InNamespace(clusterScope.LinodeCluster.Namespace), client.MatchingLabels(labels)); err != nil {
return res, err

Check warning on line 144 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L144

Added line #L144 was not covered by tests
}

// Handle deleted clusters
Expand Down Expand Up @@ -177,15 +177,15 @@
conditions.MarkTrue(clusterScope.LinodeCluster, clusterv1.ReadyCondition)

for _, eachMachine := range clusterScope.LinodeMachines.Items {
if len(eachMachine.Status.Addresses) == 0 {
return res, nil
return res, fmt.Errorf("no public ips set for the linodemachine %s", eachMachine.Name)

Check warning on line 181 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L180-L181

Added lines #L180 - L181 were not covered by tests
}
}

err := r.addMachineToLB(ctx, clusterScope)
if err != nil {
logger.Error(err, "Failed to add Linode machine to loadbalancer option")
return retryIfTransient(err)

Check warning on line 188 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L187-L188

Added lines #L187 - L188 were not covered by tests
}
conditions.MarkTrue(clusterScope.LinodeCluster, ConditionLoadBalancing)

Expand Down Expand Up @@ -301,7 +301,7 @@
}

if err := r.removeMachineFromLB(ctx, logger, clusterScope); err != nil {
return fmt.Errorf("remove machine from loadbalancer: %w", err)

Check warning on line 304 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L304

Added line #L304 was not covered by tests
}
conditions.MarkFalse(clusterScope.LinodeCluster, ConditionLoadBalancing, "cleared loadbalancer", clusterv1.ConditionSeverityInfo, "")

Expand Down Expand Up @@ -351,10 +351,10 @@
kutil.ClusterToInfrastructureMapFunc(context.TODO(), infrav1alpha2.GroupVersion.WithKind("LinodeCluster"), mgr.GetClient(), &infrav1alpha2.LinodeCluster{}),
),
builder.WithPredicates(predicates.ClusterUnpausedAndInfrastructureReady(mgr.GetLogger())),
).
Watches(
&infrav1alpha2.LinodeMachine{},
handler.EnqueueRequestsFromMapFunc(r.linodeMachineToLinodeCluster(mgr.GetLogger())),

Check warning on line 357 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L354-L357

Added lines #L354 - L357 were not covered by tests
).Complete(wrappedruntimereconciler.NewRuntimeReconcilerWithTracing(r, wrappedruntimereconciler.DefaultDecorator()))
if err != nil {
return fmt.Errorf("failed to build controller: %w", err)
Expand All @@ -367,44 +367,44 @@
return wrappedruntimeclient.NewRuntimeClientWithTracing(r.Client, wrappedruntimereconciler.DefaultDecorator())
}

func (r *LinodeClusterReconciler) linodeMachineToLinodeCluster(logger logr.Logger) handler.MapFunc {
logger = logger.WithName("LinodeClusterReconciler").WithName("linodeMachineToLinodeCluster")

Check warning on line 371 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L370-L371

Added lines #L370 - L371 were not covered by tests

return func(ctx context.Context, o client.Object) []ctrl.Request {
ctx, cancel := context.WithTimeout(ctx, reconciler.DefaultMappingTimeout)
defer cancel()

Check warning on line 375 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L373-L375

Added lines #L373 - L375 were not covered by tests

linodeMachine, ok := o.(*infrav1alpha2.LinodeMachine)
if !ok {
logger.Info("Failed to cast object to LinodeMachine")
return nil

Check warning on line 380 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L377-L380

Added lines #L377 - L380 were not covered by tests
}

// We only need control plane machines to trigger reconciliation
if !strings.Contains(linodeMachine.Name, "control-plane") {
AshleyDumaine marked this conversation as resolved.
Show resolved Hide resolved
return nil

Check warning on line 385 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L384-L385

Added lines #L384 - L385 were not covered by tests
}

linodeCluster := infrav1alpha2.LinodeCluster{}
if err := r.TracedClient().Get(
ctx,
types.NamespacedName{
Name: linodeMachine.ObjectMeta.Labels[clusterv1.ClusterNameLabel],
Namespace: linodeMachine.Namespace,
},
&linodeCluster); err != nil {
logger.Info("Failed to get LinodeCluster")
return nil

Check warning on line 397 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L388-L397

Added lines #L388 - L397 were not covered by tests
}

result := make([]ctrl.Request, 0, 1)
result = append(result, ctrl.Request{
NamespacedName: client.ObjectKey{
Namespace: linodeCluster.Namespace,
Name: linodeCluster.Name,
},
})

Check warning on line 406 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L400-L406

Added lines #L400 - L406 were not covered by tests

return result

Check warning on line 408 in controller/linodecluster_controller.go

View check run for this annotation

Codecov / codecov/patch

controller/linodecluster_controller.go#L408

Added line #L408 was not covered by tests
}
}
59 changes: 52 additions & 7 deletions controller/linodecluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ var _ = Describe("cluster-lifecycle-dns", Ordered, Label("cluster", "cluster-lif
clusterKey := client.ObjectKeyFromObject(&linodeCluster)
Expect(k8sClient.Get(ctx, clusterKey, &linodeCluster)).To(Succeed())
Expect(linodeCluster.Status.Ready).To(BeTrue())
Expect(linodeCluster.Status.Conditions).To(HaveLen(1))
Expect(linodeCluster.Status.Conditions).To(HaveLen(2))
Expect(linodeCluster.Status.Conditions[0].Type).To(Equal(clusterv1.ReadyCondition))

By("checking controlPlaneEndpoint/NB host and port")
Expand Down Expand Up @@ -479,7 +479,7 @@ var _ = Describe("dns-override-endpoint", Ordered, Label("cluster", "dns-overrid
},
},
}
linodeMachine := infrav1alpha2.LinodeMachine{
linodeMachineWithAddress := infrav1alpha2.LinodeMachine{
ObjectMeta: metav1.ObjectMeta{
Name: "test-machine",
Namespace: defaultNamespace,
Expand All @@ -501,8 +501,18 @@ var _ = Describe("dns-override-endpoint", Ordered, Label("cluster", "dns-overrid
},
},
}
linodeMachines := infrav1alpha2.LinodeMachineList{
Items: []infrav1alpha2.LinodeMachine{linodeMachine},
linodeMachineWithNoAddress := infrav1alpha2.LinodeMachine{
ObjectMeta: metav1.ObjectMeta{
Name: "test-machine",
Namespace: defaultNamespace,
},
Spec: infrav1alpha2.LinodeMachineSpec{
ProviderID: ptr.To("linode://123"),
InstanceID: ptr.To(123),
AshleyDumaine marked this conversation as resolved.
Show resolved Hide resolved
},
Status: infrav1alpha2.LinodeMachineStatus{
Addresses: []clusterv1.MachineAddress{},
},
}

ctlrSuite := NewControllerSuite(GinkgoT(), mock.MockLinodeClient{})
Expand All @@ -514,7 +524,6 @@ var _ = Describe("dns-override-endpoint", Ordered, Label("cluster", "dns-overrid
cScope.Client = k8sClient
Expect(k8sClient.Create(ctx, &cluster)).To(Succeed())
Expect(k8sClient.Create(ctx, &linodeCluster)).To(Succeed())
Expect(k8sClient.Create(ctx, &linodeMachine)).To(Succeed())
})

ctlrSuite.BeforeEach(func(ctx context.Context, mck Mock) {
Expand All @@ -523,7 +532,6 @@ var _ = Describe("dns-override-endpoint", Ordered, Label("cluster", "dns-overrid
Expect(k8sClient.Get(ctx, clusterKey, &linodeCluster)).To(Succeed())
cScope.Cluster = &cluster
cScope.LinodeCluster = &linodeCluster
cScope.LinodeMachines = linodeMachines

// Create patch helper with latest state of resource.
// This is only needed when relying on envtest's k8sClient.
Expand All @@ -539,6 +547,11 @@ var _ = Describe("dns-override-endpoint", Ordered, Label("cluster", "dns-overrid
cScope.LinodeClient = mck.LinodeClient
cScope.LinodeDomainsClient = mck.LinodeClient
cScope.AkamaiDomainsClient = mck.AkamEdgeDNSClient
linodeMachines := infrav1alpha2.LinodeMachineList{
Items: []infrav1alpha2.LinodeMachine{linodeMachineWithAddress},
}
Expect(k8sClient.Create(ctx, &linodeMachineWithAddress)).To(Succeed())
cScope.LinodeMachines = linodeMachines
}),
Result("cluster created", func(ctx context.Context, mck Mock) {
reconciler.Client = k8sClient
Expand All @@ -549,12 +562,44 @@ var _ = Describe("dns-override-endpoint", Ordered, Label("cluster", "dns-overrid
clusterKey := client.ObjectKeyFromObject(&linodeCluster)
Expect(k8sClient.Get(ctx, clusterKey, &linodeCluster)).To(Succeed())
Expect(linodeCluster.Status.Ready).To(BeTrue())
Expect(linodeCluster.Status.Conditions).To(HaveLen(1))
Expect(linodeCluster.Status.Conditions).To(HaveLen(2))
Expect(linodeCluster.Status.Conditions[0].Type).To(Equal(clusterv1.ReadyCondition))

By("checking controlPlaneEndpoint/NB host and port")
Expect(linodeCluster.Spec.ControlPlaneEndpoint.Host).To(Equal(controlPlaneEndpointHost))
Expect(linodeCluster.Spec.ControlPlaneEndpoint.Port).To(Equal(int32(controlPlaneEndpointPort)))
Expect(k8sClient.Delete(ctx, &linodeMachineWithAddress)).To(Succeed())
cScope.LinodeMachines = infrav1alpha2.LinodeMachineList{}
}),
),
Path(
Call("no linodemachines available", func(ctx context.Context, mck Mock) {
cScope.LinodeClient = mck.LinodeClient
cScope.LinodeDomainsClient = mck.LinodeClient
cScope.AkamaiDomainsClient = mck.AkamEdgeDNSClient
linodeMachines := infrav1alpha2.LinodeMachineList{
Items: []infrav1alpha2.LinodeMachine{linodeMachineWithNoAddress},
}
Expect(k8sClient.Create(ctx, &linodeMachineWithNoAddress)).To(Succeed())
cScope.LinodeMachines = linodeMachines
}),
Result("cluster not created", func(ctx context.Context, mck Mock) {
reconciler.Client = k8sClient
_, err := reconciler.reconcile(ctx, cScope, logr.Logger{})
Expect(err).NotTo(HaveOccurred())

By("checking ready conditions")
clusterKey := client.ObjectKeyFromObject(&linodeCluster)
Expect(k8sClient.Get(ctx, clusterKey, &linodeCluster)).To(Succeed())
Expect(linodeCluster.Status.Ready).To(BeTrue())
Expect(linodeCluster.Status.Conditions).To(HaveLen(2))
Expect(linodeCluster.Status.Conditions[0].Type).To(Equal(clusterv1.ReadyCondition))

By("checking controlPlaneEndpoint/NB host and port")
Expect(linodeCluster.Spec.ControlPlaneEndpoint.Host).To(Equal(controlPlaneEndpointHost))
Expect(linodeCluster.Spec.ControlPlaneEndpoint.Port).To(Equal(int32(controlPlaneEndpointPort)))
Expect(k8sClient.Delete(ctx, &linodeMachineWithNoAddress)).To(Succeed())
cScope.LinodeMachines = infrav1alpha2.LinodeMachineList{}
}),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ spec:
results: 1
- name: Delete Cluster resource
try:
- delete:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodeCluster
name: ($cluster)
- delete:
ref:
apiVersion: cluster.x-k8s.io/v1beta1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ spec:
- active: true
- name: Delete the Cluster & LinodeVPC resource
try:
- delete:
ref:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: LinodeCluster
name: ($cluster)
- delete:
ref:
apiVersion: cluster.x-k8s.io/v1beta1
Expand Down
Loading