diff --git a/api/v1alpha2/linodemachine_types.go b/api/v1alpha2/linodemachine_types.go
index cca6667d2..947aa2d12 100644
--- a/api/v1alpha2/linodemachine_types.go
+++ b/api/v1alpha2/linodemachine_types.go
@@ -172,6 +172,8 @@ type LinodeMachineStatus struct {
Addresses []clusterv1.MachineAddress `json:"addresses,omitempty"`
// CloudinitMetadataSupport determines whether to use cloud-init or not.
+ // Deprecated: Stackscript no longer in use, so this field is not used.
+ // +kubebuilder:deprecatedversion:warning="CloudinitMetadataSupport is deprecated"
// +optional
// +kubebuilder:default=true
CloudinitMetadataSupport bool `json:"cloudinitMetadataSupport,omitempty"`
diff --git a/clients/clients.go b/clients/clients.go
index dfd8201f6..e41a8df90 100644
--- a/clients/clients.go
+++ b/clients/clients.go
@@ -53,8 +53,6 @@ type LinodeInstanceClient interface {
DeleteInstance(ctx context.Context, linodeID int) error
GetRegion(ctx context.Context, regionID string) (*linodego.Region, error)
GetImage(ctx context.Context, imageID string) (*linodego.Image, error)
- CreateStackscript(ctx context.Context, opts linodego.StackscriptCreateOptions) (*linodego.Stackscript, error)
- ListStackscripts(ctx context.Context, opts *linodego.ListOptions) ([]linodego.Stackscript, error)
GetType(ctx context.Context, typeID string) (*linodego.LinodeType, error)
}
diff --git a/cloud/services/stackscript.sh b/cloud/services/stackscript.sh
deleted file mode 100644
index 9d0ab9cd3..000000000
--- a/cloud/services/stackscript.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-#
-
-cat > /etc/cloud/cloud.cfg.d/100_none.cfg <
-#
-
-cat > /etc/cloud/cloud.cfg.d/100_none.cfg <Deprecated: Stackscript no longer in use, so this field is not used. | true | |
| `instanceState` _[InstanceStatus](#instancestatus)_ | InstanceState is the state of the Linode instance for this machine. | | |
| `failureReason` _string_ | FailureReason will be set in the event that there is a terminal problem
reconciling the Machine and will contain a succinct value suitable
for machine interpretation.
This field should not be set for transitive errors that a controller
faces that are expected to be fixed automatically over
time (like service outages), but instead indicate that something is
fundamentally wrong with the Machine's spec or the configuration of
the controller, and that manual intervention is required. Examples
of terminal errors would be invalid combinations of settings in the
spec, values that are unsupported by the controller, or the
responsible controller itself being critically misconfigured.
Any transient errors that occur during the reconciliation of Machines
can be added as events to the Machine object and/or logged in the
controller's output. | | |
| `failureMessage` _string_ | FailureMessage will be set in the event that there is a terminal problem
reconciling the Machine and will contain a more verbose string suitable
for logging and human consumption.
This field should not be set for transitive errors that a controller
faces that are expected to be fixed automatically over
time (like service outages), but instead indicate that something is
fundamentally wrong with the Machine's spec or the configuration of
the controller, and that manual intervention is required. Examples
of terminal errors would be invalid combinations of settings in the
spec, values that are unsupported by the controller, or the
responsible controller itself being critically misconfigured.
Any transient errors that occur during the reconciliation of Machines
can be added as events to the Machine object and/or logged in the
controller's output. | | |
diff --git a/docs/src/topics/cluster-object-store.md b/docs/src/topics/cluster-object-store.md
index 91ad96f3b..99e9edd72 100644
--- a/docs/src/topics/cluster-object-store.md
+++ b/docs/src/topics/cluster-object-store.md
@@ -103,6 +103,5 @@ infrastructure Linode via one of the following services:
| Service | Bootstrap Data Limit |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [Metadata](https://techdocs.akamai.com/cloud-computing/docs/overview-of-the-metadata-service) | [65535 bytes](https://techdocs.akamai.com/linode-api/reference/post-linode-instance) |
-| [Stackscripts](https://www.linode.com/products/stackscripts/) | [65,535 characters](https://techdocs.akamai.com/linode-api/reference/post-linode-instance) |
These data limits are bypassed when the Cluster Object Store feature is enabled.
diff --git a/docs/src/topics/getting-started.md b/docs/src/topics/getting-started.md
index 92d42471a..47f1ff2e2 100644
--- a/docs/src/topics/getting-started.md
+++ b/docs/src/topics/getting-started.md
@@ -12,7 +12,6 @@ Make sure to create the token with at least the following read/write permissions
- VPCs
- IPs
- Object Storage
- - Stackscripts
- Firewalls
- clusterctl is [installed](https://cluster-api.sigs.k8s.io/user/quick-start#installation)
- Cluster API [management cluster](https://cluster-api.sigs.k8s.io/user/quick-start#install-andor-configure-a-kubernetes-cluster) is created
@@ -40,11 +39,6 @@ This project uses [linodego](https://github.com/linode/linodego) for Linode API
Please refer to it for more details on environment variables used for client configuration.
```
-```admonish warning
-For Regions and Images that do not yet support Akamai's cloud-init datasource CAPL will automatically use a stackscript shim
-to provision the node. If you are using a custom image ensure the [cloud_init](https://www.linode.com/docs/api/images/#image-create) flag is set correctly on it
-```
-
## Setup management cluster
A clusterAPI management cluster is a kubernetes cluster that is responsible for managing the lifecycle of other child k8s clusters provisioned using Cluster API (CAPI). It serves as a control plane for provisioning, scaling, upgrading and deleting child kubernetes clusters.
diff --git a/internal/controller/linodemachine_controller.go b/internal/controller/linodemachine_controller.go
index 00906ad2b..76f87bf0a 100644
--- a/internal/controller/linodemachine_controller.go
+++ b/internal/controller/linodemachine_controller.go
@@ -21,7 +21,6 @@ import (
"errors"
"fmt"
"net/http"
- "slices"
"strings"
"time"
@@ -530,27 +529,20 @@ func (r *LinodeMachineReconciler) reconcilePreflightLinodeFirewallCheck(ctx cont
}
func (r *LinodeMachineReconciler) reconcilePreflightMetadataSupportConfigure(ctx context.Context, logger logr.Logger, machineScope *scope.MachineScope) (ctrl.Result, error) {
- region, err := machineScope.LinodeClient.GetRegion(ctx, machineScope.LinodeMachine.Spec.Region)
+ _, err := machineScope.LinodeClient.GetRegion(ctx, machineScope.LinodeMachine.Spec.Region)
if err != nil {
logger.Error(err, fmt.Sprintf("Failed to fetch region %s", machineScope.LinodeMachine.Spec.Region))
return retryIfTransient(err, logger)
}
- regionMetadataSupport := slices.Contains(region.Capabilities, linodego.CapabilityMetadata)
imageName := reconciler.DefaultMachineControllerLinodeImage
if machineScope.LinodeMachine.Spec.Image != "" {
imageName = machineScope.LinodeMachine.Spec.Image
}
- image, err := machineScope.LinodeClient.GetImage(ctx, imageName)
+ _, err = machineScope.LinodeClient.GetImage(ctx, imageName)
if err != nil {
logger.Error(err, fmt.Sprintf("Failed to fetch image %s", imageName))
return retryIfTransient(err, logger)
}
- imageMetadataSupport := slices.Contains(image.Capabilities, "cloud-init")
- machineScope.LinodeMachine.Status.CloudinitMetadataSupport = true
- if !imageMetadataSupport || !regionMetadataSupport {
- logger.Info("cloud-init metadata support not available", "imageMetadataSupport", imageMetadataSupport, "regionMetadataSupport", regionMetadataSupport)
- machineScope.LinodeMachine.Status.CloudinitMetadataSupport = false
- }
conditions.Set(machineScope.LinodeMachine, metav1.Condition{
Type: ConditionPreflightMetadataSupportConfigured,
Status: metav1.ConditionTrue,
diff --git a/internal/controller/linodemachine_controller_helpers.go b/internal/controller/linodemachine_controller_helpers.go
index a159a82ab..be678a938 100644
--- a/internal/controller/linodemachine_controller_helpers.go
+++ b/internal/controller/linodemachine_controller_helpers.go
@@ -55,9 +55,8 @@ import (
)
const (
- maxBootstrapDataBytesCloudInit = 16384
- maxBootstrapDataBytesStackscript = 65535
- vlanIPFormat = "%s/11"
+ maxBootstrapDataBytesCloudInit = 16384
+ vlanIPFormat = "%s/11"
)
var (
@@ -606,24 +605,10 @@ func setUserData(ctx context.Context, machineScope *scope.MachineScope, createCo
return err
}
- if machineScope.LinodeMachine.Status.CloudinitMetadataSupport {
- createConfig.Metadata = &linodego.InstanceMetadataOptions{
- UserData: b64.StdEncoding.EncodeToString(bootstrapData),
- }
- } else {
- logger.Info("using StackScripts for bootstrapping")
- // WARNING: label, region and type are currently supported as cloud-init variables,
- // any changes to this could be potentially backwards incompatible and should be noted through a backwards incompatible version update
- instanceData := fmt.Sprintf("label: %s\nregion: %s\ntype: %s", machineScope.LinodeMachine.Name, machineScope.LinodeMachine.Spec.Region, machineScope.LinodeMachine.Spec.Type)
- createConfig.StackScriptData = map[string]string{
- "instancedata": b64.StdEncoding.EncodeToString([]byte(instanceData)),
- "userdata": b64.StdEncoding.EncodeToString(bootstrapData),
- }
- createConfig.StackScriptID, err = services.EnsureStackscript(ctx, machineScope)
- if err != nil {
- return fmt.Errorf("ensure stackscript: %w", err)
- }
+ createConfig.Metadata = &linodego.InstanceMetadataOptions{
+ UserData: b64.StdEncoding.EncodeToString(bootstrapData),
}
+
return nil
}
@@ -639,12 +624,8 @@ func resolveBootstrapData(ctx context.Context, machineScope *scope.MachineScope,
limit int
)
- // Determine limits for delivery service, e.g. Metadata vs. Stackscript.
- if machineScope.LinodeMachine.Status.CloudinitMetadataSupport {
- limit = maxBootstrapDataBytesCloudInit
- } else {
- limit = maxBootstrapDataBytesStackscript
- }
+ // Determine limits for delivery service
+ limit = maxBootstrapDataBytesCloudInit
// Determine the delivery mechanism for the bootstrap data based on limits. This informs the formatting of the
// bootstrap data.
@@ -653,7 +634,7 @@ func resolveBootstrapData(ctx context.Context, machineScope *scope.MachineScope,
case size < limit:
return bootstrapdata, nil
// Compromise case (Metadata): Use compression.
- case machineScope.LinodeMachine.Status.CloudinitMetadataSupport && gzipCompressionEnabled:
+ case gzipCompressionEnabled:
if compressed, err = compressUserData(bootstrapdata); err != nil {
// Break and use the Cluster Object Store workaround on compression failure.
logger.Info(fmt.Sprintf("Failed to compress bootstrap data: %v. Using Cluster Object Store instead.", err))
diff --git a/internal/controller/linodemachine_controller_helpers_test.go b/internal/controller/linodemachine_controller_helpers_test.go
index ab090d705..b73df4e9e 100644
--- a/internal/controller/linodemachine_controller_helpers_test.go
+++ b/internal/controller/linodemachine_controller_helpers_test.go
@@ -104,8 +104,7 @@ func TestSetUserData(t *testing.T) {
Name: "test-cluster",
Namespace: "default",
},
- Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-ord", Image: "linode/ubuntu22.04"},
- Status: infrav1alpha2.LinodeMachineStatus{CloudinitMetadataSupport: true},
+ Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-ord", Image: "linode/ubuntu22.04"},
}},
createConfig: &linodego.InstanceCreateOptions{},
wantConfig: &linodego.InstanceCreateOptions{Metadata: &linodego.InstanceMetadataOptions{
@@ -123,45 +122,6 @@ func TestSetUserData(t *testing.T) {
})
},
},
- {
- name: "Success - SetUserData StackScript",
- machineScope: &scope.MachineScope{Machine: &v1beta1.Machine{
- Spec: v1beta1.MachineSpec{
- ClusterName: "",
- Bootstrap: v1beta1.Bootstrap{
- DataSecretName: ptr.To("test-data"),
- },
- InfrastructureRef: corev1.ObjectReference{},
- },
- }, LinodeMachine: &infrav1alpha2.LinodeMachine{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "default",
- },
- Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-east", Image: "linode/ubuntu22.04", Type: "g6-standard-1"},
- Status: infrav1alpha2.LinodeMachineStatus{CloudinitMetadataSupport: false},
- }},
- createConfig: &linodego.InstanceCreateOptions{},
- wantConfig: &linodego.InstanceCreateOptions{StackScriptID: 1234, StackScriptData: map[string]string{
- "instancedata": b64.StdEncoding.EncodeToString([]byte("label: test-cluster\nregion: us-east\ntype: g6-standard-1")),
- "userdata": b64.StdEncoding.EncodeToString([]byte("test-data")),
- }},
- expects: func(mockClient *mock.MockLinodeClient, kMock *mock.MockK8sClient, s3Client *mock.MockS3Client, s3PresignedClient *mock.MockS3PresignClient) {
- kMock.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, key types.NamespacedName, obj *corev1.Secret, opts ...client.GetOption) error {
- cred := corev1.Secret{
- Data: map[string][]byte{
- "value": []byte("test-data"),
- },
- }
- *obj = cred
- return nil
- })
- mockClient.EXPECT().ListStackscripts(gomock.Any(), &linodego.ListOptions{Filter: "{\"label\":\"CAPL-dev\"}"}).Return([]linodego.Stackscript{{
- Label: "CAPI Test 1",
- ID: 1234,
- }}, nil)
- },
- },
{
name: "Success - SetUserData metadata and cluster object store (large bootstrap data)",
machineScope: &scope.MachineScope{Machine: &v1beta1.Machine{
@@ -177,8 +137,7 @@ func TestSetUserData(t *testing.T) {
Name: "test-cluster",
Namespace: "default",
},
- Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-ord", Image: "linode/ubuntu22.04"},
- Status: infrav1alpha2.LinodeMachineStatus{CloudinitMetadataSupport: true},
+ Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-ord", Image: "linode/ubuntu22.04"},
}, LinodeCluster: &infrav1alpha2.LinodeCluster{
Spec: infrav1alpha2.LinodeClusterSpec{
ObjectStore: &infrav1alpha2.ObjectStore{CredentialsRef: corev1.SecretReference{Name: "fake"}},
@@ -220,68 +179,6 @@ https://object.bucket.example.com
s3PresignedMock.EXPECT().PresignGetObject(gomock.Any(), gomock.Any()).Return(&awssigner.PresignedHTTPRequest{URL: "https://object.bucket.example.com"}, nil)
},
},
- {
- name: "Success - SetUserData StackScript and Cluster Object Store (large bootstrap data)",
- machineScope: &scope.MachineScope{Machine: &v1beta1.Machine{
- Spec: v1beta1.MachineSpec{
- ClusterName: "",
- Bootstrap: v1beta1.Bootstrap{
- DataSecretName: ptr.To("test-data"),
- },
- InfrastructureRef: corev1.ObjectReference{},
- },
- }, LinodeMachine: &infrav1alpha2.LinodeMachine{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "default",
- },
- Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-ord", Image: "linode/ubuntu22.04", Type: "g6-standard-2"},
- Status: infrav1alpha2.LinodeMachineStatus{CloudinitMetadataSupport: false},
- }, LinodeCluster: &infrav1alpha2.LinodeCluster{
- Spec: infrav1alpha2.LinodeClusterSpec{
- ObjectStore: &infrav1alpha2.ObjectStore{CredentialsRef: corev1.SecretReference{Name: "fake"}},
- },
- }},
- createConfig: &linodego.InstanceCreateOptions{},
- wantConfig: &linodego.InstanceCreateOptions{
- StackScriptData: map[string]string{
- "instancedata": b64.StdEncoding.EncodeToString([]byte("label: test-cluster\nregion: us-ord\ntype: g6-standard-2")),
- "userdata": b64.StdEncoding.EncodeToString([]byte(`#include
-https://object.bucket.example.com
-`)),
- },
- },
- expects: func(mockClient *mock.MockLinodeClient, kMock *mock.MockK8sClient, s3Mock *mock.MockS3Client, s3PresignedMock *mock.MockS3PresignClient) {
- kMock.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, key types.NamespacedName, obj *corev1.Secret, opts ...client.GetOption) error {
- largeData := make([]byte, maxBootstrapDataBytesStackscript*10)
- _, rerr := rand.Read(largeData)
- require.NoError(t, rerr, "Failed to create bootstrap data")
- cred := corev1.Secret{
- Data: map[string][]byte{
- "value": largeData,
- },
- }
- *obj = cred
- return nil
- })
- kMock.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, key types.NamespacedName, obj *corev1.Secret, opts ...client.GetOption) error {
- cred := corev1.Secret{
- Data: map[string][]byte{
- "bucket_name": []byte("fake"),
- "bucket_endpoint": []byte("fake.example.com"),
- "s3_endpoint": []byte("example.com"),
- "access_key": []byte("fake"),
- "secret_key": []byte("fake"),
- },
- }
- *obj = cred
- return nil
- })
- s3Mock.EXPECT().PutObject(gomock.Any(), gomock.Any(), gomock.Any()).Return(&s3.PutObjectOutput{}, nil)
- s3PresignedMock.EXPECT().PresignGetObject(gomock.Any(), gomock.Any()).Return(&awssigner.PresignedHTTPRequest{URL: "https://object.bucket.example.com"}, nil)
- mockClient.EXPECT().ListStackscripts(gomock.Any(), gomock.Any()).Return([]linodego.Stackscript{{}}, nil)
- },
- },
{
name: "Error - SetUserData get bootstrap data",
machineScope: &scope.MachineScope{Machine: &v1beta1.Machine{
@@ -307,43 +204,6 @@ https://object.bucket.example.com
},
expectedError: fmt.Errorf("bootstrap data secret is nil for LinodeMachine default/test-cluster"),
},
- {
- name: "Error - SetUserData failed to get stackscripts",
- machineScope: &scope.MachineScope{Machine: &v1beta1.Machine{
- Spec: v1beta1.MachineSpec{
- ClusterName: "",
- Bootstrap: v1beta1.Bootstrap{
- DataSecretName: ptr.To("test-data"),
- },
- InfrastructureRef: corev1.ObjectReference{},
- },
- }, LinodeMachine: &infrav1alpha2.LinodeMachine{
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-cluster",
- Namespace: "default",
- },
- Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-east", Image: "linode/ubuntu22.04", Type: "g6-standard-1"},
- Status: infrav1alpha2.LinodeMachineStatus{CloudinitMetadataSupport: false},
- }},
- createConfig: &linodego.InstanceCreateOptions{},
- wantConfig: &linodego.InstanceCreateOptions{StackScriptID: 1234, StackScriptData: map[string]string{
- "instancedata": b64.StdEncoding.EncodeToString([]byte("label: test-cluster\nregion: us-east\ntype: g6-standard-1")),
- "userdata": b64.StdEncoding.EncodeToString([]byte("test-data")),
- }},
- expects: func(mockClient *mock.MockLinodeClient, kMock *mock.MockK8sClient, s3Client *mock.MockS3Client, s3PresignedClient *mock.MockS3PresignClient) {
- kMock.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, key types.NamespacedName, obj *corev1.Secret, opts ...client.GetOption) error {
- cred := corev1.Secret{
- Data: map[string][]byte{
- "value": []byte("test-data"),
- },
- }
- *obj = cred
- return nil
- })
- mockClient.EXPECT().ListStackscripts(gomock.Any(), &linodego.ListOptions{Filter: "{\"label\":\"CAPL-dev\"}"}).Return(nil, fmt.Errorf("failed to get stackscripts"))
- },
- expectedError: fmt.Errorf("ensure stackscript: failed to get stackscript with label CAPL-dev: failed to get stackscripts"),
- },
{
name: "Error - SetUserData failed to upload to Cluster Object Store",
machineScope: &scope.MachineScope{Machine: &v1beta1.Machine{
@@ -359,8 +219,7 @@ https://object.bucket.example.com
Name: "test-cluster",
Namespace: "default",
},
- Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-ord", Image: "linode/ubuntu22.04"},
- Status: infrav1alpha2.LinodeMachineStatus{CloudinitMetadataSupport: true},
+ Spec: infrav1alpha2.LinodeMachineSpec{Region: "us-ord", Image: "linode/ubuntu22.04"},
}, LinodeCluster: &infrav1alpha2.LinodeCluster{
Spec: infrav1alpha2.LinodeClusterSpec{
ObjectStore: &infrav1alpha2.ObjectStore{CredentialsRef: corev1.SecretReference{Name: "fake"}},
@@ -370,7 +229,7 @@ https://object.bucket.example.com
wantConfig: &linodego.InstanceCreateOptions{},
expects: func(mockClient *mock.MockLinodeClient, kMock *mock.MockK8sClient, s3Mock *mock.MockS3Client, s3PresignedMock *mock.MockS3PresignClient) {
kMock.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(ctx context.Context, key types.NamespacedName, obj *corev1.Secret, opts ...client.GetOption) error {
- largeData := make([]byte, max(maxBootstrapDataBytesCloudInit, maxBootstrapDataBytesStackscript)*10)
+ largeData := make([]byte, maxBootstrapDataBytesCloudInit*10)
_, rerr := rand.Read(largeData)
require.NoError(t, rerr, "Failed to create bootstrap data")
cred := corev1.Secret{
@@ -423,8 +282,6 @@ https://object.bucket.example.com
assert.ErrorContains(t, err, testcase.expectedError.Error())
} else {
assert.Equal(t, testcase.wantConfig.Metadata, testcase.createConfig.Metadata)
- assert.Equal(t, testcase.wantConfig.StackScriptID, testcase.createConfig.StackScriptID)
- assert.Equal(t, testcase.wantConfig.StackScriptData, testcase.createConfig.StackScriptData)
}
})
}
diff --git a/internal/controller/linodemachine_controller_test.go b/internal/controller/linodemachine_controller_test.go
index 2de94d20d..510dd8266 100644
--- a/internal/controller/linodemachine_controller_test.go
+++ b/internal/controller/linodemachine_controller_test.go
@@ -1353,7 +1353,6 @@ var _ = Describe("machine-lifecycle", Ordered, Label("machine", "machine-lifecyc
Name: "test-missing-fw",
Namespace: namespace,
}
- linodeMachine.Status.CloudinitMetadataSupport = true
conditions.Set(mScope.LinodeMachine, metav1.Condition{
Type: ConditionPreflightMetadataSupportConfigured,
Status: metav1.ConditionTrue,
@@ -1371,7 +1370,6 @@ var _ = Describe("machine-lifecycle", Ordered, Label("machine", "machine-lifecyc
Path(
Call("machine is not created because there were too many requests", func(ctx context.Context, mck Mock) {
linodeMachine.Spec.FirewallRef = nil
- linodeMachine.Status.CloudinitMetadataSupport = true
}),
OneOf(
Path(Result("create requeues when failing to create instance", func(ctx context.Context, mck Mock) {
@@ -1899,9 +1897,6 @@ var _ = Describe("machine in PlacementGroup", Label("machine", "placementGroup")
Name: "test-fw",
},
},
- Status: infrav1alpha2.LinodeMachineStatus{
- CloudinitMetadataSupport: true,
- },
}
lpgReconciler = &LinodePlacementGroupReconciler{
@@ -2091,9 +2086,6 @@ var _ = Describe("machine in VPC", Label("machine", "VPC"), Ordered, func() {
},
},
},
- Status: infrav1alpha2.LinodeMachineStatus{
- CloudinitMetadataSupport: true,
- },
}
mockLinodeClient := mock.NewMockLinodeClient(mockCtrl)
mockLinodeClient.EXPECT().
@@ -2167,9 +2159,6 @@ var _ = Describe("machine in VPC", Label("machine", "VPC"), Ordered, func() {
},
},
},
- Status: infrav1alpha2.LinodeMachineStatus{
- CloudinitMetadataSupport: true,
- },
}
mockLinodeClient := mock.NewMockLinodeClient(mockCtrl)
mockLinodeClient.EXPECT().
@@ -2237,9 +2226,6 @@ var _ = Describe("machine in VPC", Label("machine", "VPC"), Ordered, func() {
},
},
},
- Status: infrav1alpha2.LinodeMachineStatus{
- CloudinitMetadataSupport: true,
- },
}
mockLinodeClient := mock.NewMockLinodeClient(mockCtrl)
mockLinodeClient.EXPECT().
diff --git a/mock/client.go b/mock/client.go
index 9af6e58fa..83b1df27a 100644
--- a/mock/client.go
+++ b/mock/client.go
@@ -227,21 +227,6 @@ func (mr *MockLinodeClientMockRecorder) CreatePlacementGroup(ctx, opts any) *gom
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePlacementGroup", reflect.TypeOf((*MockLinodeClient)(nil).CreatePlacementGroup), ctx, opts)
}
-// CreateStackscript mocks base method.
-func (m *MockLinodeClient) CreateStackscript(ctx context.Context, opts linodego.StackscriptCreateOptions) (*linodego.Stackscript, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateStackscript", ctx, opts)
- ret0, _ := ret[0].(*linodego.Stackscript)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// CreateStackscript indicates an expected call of CreateStackscript.
-func (mr *MockLinodeClientMockRecorder) CreateStackscript(ctx, opts any) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStackscript", reflect.TypeOf((*MockLinodeClient)(nil).CreateStackscript), ctx, opts)
-}
-
// CreateVPC mocks base method.
func (m *MockLinodeClient) CreateVPC(ctx context.Context, opts linodego.VPCCreateOptions) (*linodego.VPC, error) {
m.ctrl.T.Helper()
@@ -713,21 +698,6 @@ func (mr *MockLinodeClientMockRecorder) ListPlacementGroups(ctx, options any) *g
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPlacementGroups", reflect.TypeOf((*MockLinodeClient)(nil).ListPlacementGroups), ctx, options)
}
-// ListStackscripts mocks base method.
-func (m *MockLinodeClient) ListStackscripts(ctx context.Context, opts *linodego.ListOptions) ([]linodego.Stackscript, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "ListStackscripts", ctx, opts)
- ret0, _ := ret[0].([]linodego.Stackscript)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// ListStackscripts indicates an expected call of ListStackscripts.
-func (mr *MockLinodeClientMockRecorder) ListStackscripts(ctx, opts any) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStackscripts", reflect.TypeOf((*MockLinodeClient)(nil).ListStackscripts), ctx, opts)
-}
-
// ListVPCs mocks base method.
func (m *MockLinodeClient) ListVPCs(ctx context.Context, opts *linodego.ListOptions) ([]linodego.VPC, error) {
m.ctrl.T.Helper()
@@ -1144,21 +1114,6 @@ func (mr *MockLinodeInstanceClientMockRecorder) CreateInstanceDisk(ctx, linodeID
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInstanceDisk", reflect.TypeOf((*MockLinodeInstanceClient)(nil).CreateInstanceDisk), ctx, linodeID, opts)
}
-// CreateStackscript mocks base method.
-func (m *MockLinodeInstanceClient) CreateStackscript(ctx context.Context, opts linodego.StackscriptCreateOptions) (*linodego.Stackscript, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateStackscript", ctx, opts)
- ret0, _ := ret[0].(*linodego.Stackscript)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// CreateStackscript indicates an expected call of CreateStackscript.
-func (mr *MockLinodeInstanceClientMockRecorder) CreateStackscript(ctx, opts any) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStackscript", reflect.TypeOf((*MockLinodeInstanceClient)(nil).CreateStackscript), ctx, opts)
-}
-
// DeleteInstance mocks base method.
func (m *MockLinodeInstanceClient) DeleteInstance(ctx context.Context, linodeID int) error {
m.ctrl.T.Helper()
@@ -1293,21 +1248,6 @@ func (mr *MockLinodeInstanceClientMockRecorder) ListInstances(ctx, opts any) *go
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListInstances", reflect.TypeOf((*MockLinodeInstanceClient)(nil).ListInstances), ctx, opts)
}
-// ListStackscripts mocks base method.
-func (m *MockLinodeInstanceClient) ListStackscripts(ctx context.Context, opts *linodego.ListOptions) ([]linodego.Stackscript, error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "ListStackscripts", ctx, opts)
- ret0, _ := ret[0].([]linodego.Stackscript)
- ret1, _ := ret[1].(error)
- return ret0, ret1
-}
-
-// ListStackscripts indicates an expected call of ListStackscripts.
-func (mr *MockLinodeInstanceClientMockRecorder) ListStackscripts(ctx, opts any) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStackscripts", reflect.TypeOf((*MockLinodeInstanceClient)(nil).ListStackscripts), ctx, opts)
-}
-
// ResizeInstanceDisk mocks base method.
func (m *MockLinodeInstanceClient) ResizeInstanceDisk(ctx context.Context, linodeID, diskID, size int) error {
m.ctrl.T.Helper()
diff --git a/observability/wrappers/linodeclient/linodeclient.gen.go b/observability/wrappers/linodeclient/linodeclient.gen.go
index 8116e99c5..14e49bf56 100644
--- a/observability/wrappers/linodeclient/linodeclient.gen.go
+++ b/observability/wrappers/linodeclient/linodeclient.gen.go
@@ -341,31 +341,6 @@ func (_d LinodeClientWithTracing) CreatePlacementGroup(ctx context.Context, opts
return _d.LinodeClient.CreatePlacementGroup(ctx, opts)
}
-// CreateStackscript implements _sourceClients.LinodeClient
-func (_d LinodeClientWithTracing) CreateStackscript(ctx context.Context, opts linodego.StackscriptCreateOptions) (sp1 *linodego.Stackscript, err error) {
- ctx, _span := tracing.Start(ctx, "_sourceClients.LinodeClient.CreateStackscript")
- defer func() {
- if _d._spanDecorator != nil {
- _d._spanDecorator(_span, map[string]interface{}{
- "ctx": ctx,
- "opts": opts}, map[string]interface{}{
- "sp1": sp1,
- "err": err})
- }
-
- if err != nil {
- _span.RecordError(err)
- _span.SetAttributes(
- attribute.String("event", "error"),
- attribute.String("message", err.Error()),
- )
- }
-
- _span.End()
- }()
- return _d.LinodeClient.CreateStackscript(ctx, opts)
-}
-
// CreateVPC implements _sourceClients.LinodeClient
func (_d LinodeClientWithTracing) CreateVPC(ctx context.Context, opts linodego.VPCCreateOptions) (vp1 *linodego.VPC, err error) {
ctx, _span := tracing.Start(ctx, "_sourceClients.LinodeClient.CreateVPC")
@@ -1170,31 +1145,6 @@ func (_d LinodeClientWithTracing) ListPlacementGroups(ctx context.Context, optio
return _d.LinodeClient.ListPlacementGroups(ctx, options)
}
-// ListStackscripts implements _sourceClients.LinodeClient
-func (_d LinodeClientWithTracing) ListStackscripts(ctx context.Context, opts *linodego.ListOptions) (sa1 []linodego.Stackscript, err error) {
- ctx, _span := tracing.Start(ctx, "_sourceClients.LinodeClient.ListStackscripts")
- defer func() {
- if _d._spanDecorator != nil {
- _d._spanDecorator(_span, map[string]interface{}{
- "ctx": ctx,
- "opts": opts}, map[string]interface{}{
- "sa1": sa1,
- "err": err})
- }
-
- if err != nil {
- _span.RecordError(err)
- _span.SetAttributes(
- attribute.String("event", "error"),
- attribute.String("message", err.Error()),
- )
- }
-
- _span.End()
- }()
- return _d.LinodeClient.ListStackscripts(ctx, opts)
-}
-
// ListVPCs implements _sourceClients.LinodeClient
func (_d LinodeClientWithTracing) ListVPCs(ctx context.Context, opts *linodego.ListOptions) (va1 []linodego.VPC, err error) {
ctx, _span := tracing.Start(ctx, "_sourceClients.LinodeClient.ListVPCs")