Skip to content

Commit

Permalink
clusterctl: add in-cluster ipam provider
Browse files Browse the repository at this point in the history
  • Loading branch information
schrej committed Feb 15, 2024
1 parent 08fb445 commit 01a9ede
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions cmd/clusterctl/client/config/providers_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ const (
K0smotronControlPlaneProviderName = "k0sproject-k0smotron"
)

// IPAM providers.
const (
InClusterIPAMProviderName = "in-cluster"
)

// Add-on providers.
const (
HelmAddonProviderName = "helm"
Expand Down Expand Up @@ -369,6 +374,13 @@ func (p *providersClient) defaults() []Provider {
providerType: clusterctlv1.ControlPlaneProviderType,
},

// IPAM providers
&provider{
name: InClusterIPAMProviderName,
url: "https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/latest/ipam-components.yaml",
providerType: clusterctlv1.IPAMProviderType,
},

// Add-on providers
&provider{
name: HelmAddonProviderName,
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func init() {
initCmd.PersistentFlags().StringSliceVarP(&initOpts.controlPlaneProviders, "control-plane", "c", nil,
"Control plane providers and versions (e.g. kubeadm:v1.1.5) to add to the management cluster. If unspecified, the Kubeadm control plane provider's latest release is used.")
initCmd.PersistentFlags().StringSliceVar(&initOpts.ipamProviders, "ipam", nil,
"IPAM providers and versions (e.g. infoblox:v0.0.1) to add to the management cluster.")
"IPAM providers and versions (e.g. in-cluster:v0.1.0) to add to the management cluster.")
initCmd.PersistentFlags().StringSliceVar(&initOpts.runtimeExtensionProviders, "runtime-extension", nil,
"Runtime extension providers and versions to add to the management cluster; please note that clusterctl doesn't include any default runtime extensions and thus it is required to use custom configuration files to register runtime extensions.")
initCmd.PersistentFlags().StringSliceVar(&initOpts.addonProviders, "addon", nil,
Expand Down

0 comments on commit 01a9ede

Please sign in to comment.