Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 0 additions & 47 deletions .prow/provider-equinix-metal.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions docs/cloud-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,26 +322,6 @@ tags:
"kubernetesCluster": "my-cluster"
```

## Equinix Metal

### machine.spec.providerConfig.cloudProviderSpec
```yaml
# If empty, can be set via METAL_AUTH_TOKEN env var
token: "<< METAL_AUTH_TOKEN >>"
# instance type
instanceType: "t1.small.x86"
# Equinix Metal project ID
projectID: "<< PROJECT_ID >>"
# Equinix Metal facilities
facilities:
- "ewr1"
# Equinix Metal billingCycle
billingCycle: ""
# node tags
tags:
"kubernetesCluster": "my-cluster"
```

## KubeVirt

### machine.spec.providerConfig.cloudProviderSpec
Expand Down
1 change: 0 additions & 1 deletion docs/operating-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
| AWS | ✓ | ✓ | ✓ | ✓ | ✓ |
| Azure | ✓ | ✓ | ✓ | x | ✓ |
| Digitalocean | ✓ | x | x | x | ✓ |
| Equinix Metal | ✓ | ✓ | x | x | ✓ |
| Google Cloud Platform | ✓ | ✓ | x | x | x |
| Hetzner | ✓ | x | x | x | ✓ |
| KubeVirt | ✓ | ✓ | ✓ | x | ✓ |
Expand Down
54 changes: 0 additions & 54 deletions examples/equinixmetal-machinedeployment.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions examples/operating-system-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ spec:
- linode
- nutanix
- openstack
- equinixmetal
- vsphere
- fake
- alibaba
Expand Down Expand Up @@ -947,7 +946,6 @@ spec:
- linode
- nutanix
- openstack
- equinixmetal
- vsphere
- fake
- alibaba
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ require (
github.com/aws/smithy-go v1.20.4
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/digitalocean/godo v1.124.0
github.com/equinix/equinix-sdk-go v0.46.0
github.com/go-logr/logr v1.4.3
github.com/go-logr/zapr v1.3.0
github.com/go-test/deep v1.1.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ github.com/envoyproxy/go-control-plane/envoy v1.36.0/go.mod h1:ty89S1YCCVruQAm9O
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v1.3.0 h1:TvGH1wof4H33rezVKWSpqKz5NXWg5VPuZ0uONDT6eb4=
github.com/envoyproxy/protoc-gen-validate v1.3.0/go.mod h1:HvYl7zwPa5mffgyeTUHA9zHIH36nmrm7oCbo4YKoSWA=
github.com/equinix/equinix-sdk-go v0.46.0 h1:ldQo4GtXNr+0XsThQJf/pUdx5wcLFe9QpLFtAwonqH8=
github.com/equinix/equinix-sdk-go v0.46.0/go.mod h1:hEb3XLaedz7xhl/dpPIS6eOIiXNPeqNiVoyDrT6paIg=
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls=
github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
Expand Down
8 changes: 0 additions & 8 deletions pkg/admission/machinedeployments_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,6 @@ func mutationsForMachineDeployment(md *clusterv1alpha1.MachineDeployment) error
return fmt.Errorf("failed to read MachineDeployment.Spec.Template.Spec.ProviderSpec: %w", err)
}

// Packet has been renamed to Equinix Metal
if providerConfig.CloudProvider == cloudProviderPacket {
err = migrateToEquinixMetal(providerConfig)
if err != nil {
return fmt.Errorf("failed to migrate packet to equinix metal: %w", err)
}
}

// Migrate
if providerConfig.CloudProvider == providerconfigtypes.CloudProviderVMwareCloudDirector {
err := migrateVMwareCloudDirector(providerConfig)
Expand Down
8 changes: 0 additions & 8 deletions pkg/admission/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,6 @@ func (ad *admissionData) defaultAndValidateMachineSpec(ctx context.Context, spec
return fmt.Errorf("failed to read machine.spec.providerSpec: %w", err)
}

// Packet has been renamed to Equinix Metal
if providerConfig.CloudProvider == cloudProviderPacket {
err = migrateToEquinixMetal(providerConfig)
if err != nil {
return fmt.Errorf("failed to migrate packet to equinix metal: %w", err)
}
}

// For KubeVirt we need to initialize the annotations for MachineDeployment, to enable setting of the needed annotations.
if providerConfig.CloudProvider == providerconfig.CloudProviderKubeVirt {
if spec.Annotations == nil {
Expand Down
27 changes: 0 additions & 27 deletions pkg/admission/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,6 @@ import (
providerconfigtypes "k8c.io/machine-controller/sdk/providerconfig"
)

const cloudProviderPacket = "packet"

func migrateToEquinixMetal(providerConfig *providerconfigtypes.Config) (err error) {
providerConfig.CloudProvider = providerconfigtypes.CloudProviderEquinixMetal

// Field .spec.providerSpec.cloudProviderSpec.apiKey has been replaced with .spec.providerSpec.cloudProviderSpec.token
// We first need to perform in-place replacement for this field
rawConfig := map[string]interface{}{}
if err := json.Unmarshal(providerConfig.CloudProviderSpec.Raw, &rawConfig); err != nil {
return fmt.Errorf("failed to unmarshal providerConfig.CloudProviderSpec.Raw: %w", err)
}
// NB: We have to set the token only if apiKey existed, otherwise, migrated
// machines will not create at all (authentication errors).
apiKey, ok := rawConfig["apiKey"]
if ok {
rawConfig["token"] = apiKey
delete(rawConfig, "apiKey")
}

// Update original object
providerConfig.CloudProviderSpec.Raw, err = json.Marshal(rawConfig)
if err != nil {
return fmt.Errorf("failed to json marshal providerConfig.CloudProviderSpec.Raw: %w", err)
}
return nil
}

func migrateVMwareCloudDirector(providerConfig *providerconfigtypes.Config) (err error) {
config, err := vcdtypes.GetConfig(*providerConfig)
if err != nil {
Expand Down
11 changes: 0 additions & 11 deletions pkg/cloudprovider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"k8c.io/machine-controller/pkg/cloudprovider/provider/baremetal"
"k8c.io/machine-controller/pkg/cloudprovider/provider/digitalocean"
"k8c.io/machine-controller/pkg/cloudprovider/provider/edge"
"k8c.io/machine-controller/pkg/cloudprovider/provider/equinixmetal"
"k8c.io/machine-controller/pkg/cloudprovider/provider/external"
"k8c.io/machine-controller/pkg/cloudprovider/provider/fake"
"k8c.io/machine-controller/pkg/cloudprovider/provider/gce"
Expand Down Expand Up @@ -73,16 +72,6 @@ var (
providerconfig.CloudProviderAzure: func(cvr providerconfig.ConfigVarResolver) cloudprovidertypes.Provider {
return azure.New(cvr)
},
providerconfig.CloudProviderEquinixMetal: func(cvr providerconfig.ConfigVarResolver) cloudprovidertypes.Provider {
return equinixmetal.New(cvr)
},
// NB: This is explicitly left to allow old Packet machines to be deleted.
// We can handle those machines in the same way as Equinix Metal machines
// because there are no API changes.
// TODO: Remove this after deprecation period.
providerconfig.CloudProviderPacket: func(cvr providerconfig.ConfigVarResolver) cloudprovidertypes.Provider {
return equinixmetal.New(cvr)
},
providerconfig.CloudProviderFake: func(cvr providerconfig.ConfigVarResolver) cloudprovidertypes.Provider {
return fake.New(cvr)
},
Expand Down
Loading