Skip to content

Commit

Permalink
feat: add EKS controlplane provider
Browse files Browse the repository at this point in the history
Add the EKS control plane provider to `clusterctl` which will be
available in the **0.6.1** release of CAPA.
  • Loading branch information
richardcase committed Sep 23, 2020
1 parent 3158562 commit 8c75e4a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/clusterctl/client/config/providers_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const (
// ControlPlane providers
KubeadmControlPlaneProviderName = "kubeadm"
TalosControlPlaneProviderName = "talos"
EKSControlPlaneProviderName = "eks"

// Other
ProvidersConfigKey = "providers"
Expand Down Expand Up @@ -169,6 +170,11 @@ func (p *providersClient) defaults() []Provider {
url: "https://github.com/talos-systems/cluster-api-control-plane-provider-talos/releases/latest/control-plane-components.yaml",
providerType: clusterctlv1.ControlPlaneProviderType,
},
&provider{
name: EKSControlPlaneProviderName,
url: "https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/latest/eks-controlplane-components.yaml",
providerType: clusterctlv1.ControlPlaneProviderType,
},
}

return defaults
Expand Down
2 changes: 2 additions & 0 deletions cmd/clusterctl/client/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.TalosBootstrapProviderName,
config.KubeadmControlPlaneProviderName,
config.TalosControlPlaneProviderName,
config.EKSControlPlaneProviderName,
config.AWSProviderName,
config.AzureProviderName,
config.DOProviderName,
Expand All @@ -86,6 +87,7 @@ func Test_clusterctlClient_GetProvidersConfig(t *testing.T) {
config.TalosBootstrapProviderName,
config.KubeadmControlPlaneProviderName,
config.TalosControlPlaneProviderName,
config.EKSControlPlaneProviderName,
config.AWSProviderName,
config.AzureProviderName,
config.DOProviderName,
Expand Down
10 changes: 10 additions & 0 deletions cmd/clusterctl/client/repository/metadata_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,16 @@ func (f *metadataClient) getEmbeddedMetadata() *clusterctlv1.Metadata {
// there are no older version for Talos controlplane
},
}
case config.EKSControlPlaneProviderName:
return &clusterctlv1.Metadata{
TypeMeta: metav1.TypeMeta{
APIVersion: clusterctlv1.GroupVersion.String(),
Kind: "Metadata",
},
ReleaseSeries: []clusterctlv1.ReleaseSeries{
{Major: 0, Minor: 6, Contract: "v1alpha3"},
},
}
default:
return nil
}
Expand Down

0 comments on commit 8c75e4a

Please sign in to comment.