Skip to content

Commit 128914b

Browse files
authored
Set MachinePool feature flag to true + Beta (#10141)
1 parent 284a92f commit 128914b

File tree

17 files changed

+16
-48
lines changed

17 files changed

+16
-48
lines changed

bootstrap/kubeadm/config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
- "--leader-elect"
2323
- "--diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443}"
2424
- "--insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false}"
25-
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=false},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false}"
25+
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false}"
2626
- "--bootstrap-token-ttl=${KUBEADM_BOOTSTRAP_TOKEN_TTL:=15m}"
2727
image: controller:latest
2828
name: manager

config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
- "--leader-elect"
2424
- "--diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443}"
2525
- "--insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false}"
26-
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=false},ClusterResourceSet=${EXP_CLUSTER_RESOURCE_SET:=false},ClusterTopology=${CLUSTER_TOPOLOGY:=false},RuntimeSDK=${EXP_RUNTIME_SDK:=false},MachineSetPreflightChecks=${EXP_MACHINE_SET_PREFLIGHT_CHECKS:=false}"
26+
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},ClusterResourceSet=${EXP_CLUSTER_RESOURCE_SET:=false},ClusterTopology=${CLUSTER_TOPOLOGY:=false},RuntimeSDK=${EXP_RUNTIME_SDK:=false},MachineSetPreflightChecks=${EXP_MACHINE_SET_PREFLIGHT_CHECKS:=false}"
2727
image: controller:latest
2828
name: manager
2929
env:

controlplane/kubeadm/config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
- "--leader-elect"
2323
- "--diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443}"
2424
- "--insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false}"
25-
- "--feature-gates=ClusterTopology=${CLUSTER_TOPOLOGY:=false},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false}"
25+
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=true},ClusterTopology=${CLUSTER_TOPOLOGY:=false},KubeadmBootstrapFormatIgnition=${EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION:=false}"
2626
image: controller:latest
2727
name: manager
2828
env:

controlplane/kubeadm/config/rbac/role.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ rules:
4747
- get
4848
- list
4949
- watch
50+
- apiGroups:
51+
- cluster.x-k8s.io
52+
resources:
53+
- machinepools
54+
verbs:
55+
- list
5056
- apiGroups:
5157
- cluster.x-k8s.io
5258
resources:

controlplane/kubeadm/internal/controllers/controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ const (
6767
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io;bootstrap.cluster.x-k8s.io;controlplane.cluster.x-k8s.io,resources=*,verbs=get;list;watch;create;update;patch;delete
6868
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/status,verbs=get;list;watch
6969
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines;machines/status,verbs=get;list;watch;create;update;patch;delete
70+
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machinepools,verbs=list
7071
// +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch
7172

7273
// KubeadmControlPlaneReconciler reconciles a KubeadmControlPlane object.

controlplane/kubeadm/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import (
5252
kubeadmcontrolplanecontrollers "sigs.k8s.io/cluster-api/controlplane/kubeadm/controllers"
5353
"sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/etcd"
5454
kcpwebhooks "sigs.k8s.io/cluster-api/controlplane/kubeadm/webhooks"
55+
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
5556
"sigs.k8s.io/cluster-api/feature"
5657
controlplanev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/controlplane/kubeadm/v1alpha3"
5758
controlplanev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/controlplane/kubeadm/v1alpha4"
@@ -92,6 +93,7 @@ var (
9293
func init() {
9394
_ = clientgoscheme.AddToScheme(scheme)
9495
_ = clusterv1.AddToScheme(scheme)
96+
_ = expv1.AddToScheme(scheme)
9597
_ = controlplanev1alpha3.AddToScheme(scheme)
9698
_ = controlplanev1alpha4.AddToScheme(scheme)
9799
_ = controlplanev1.AddToScheme(scheme)

docs/book/src/developer/testing.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ via [Create the local repository](http://localhost:3000/clusterctl/developers.ht
263263
```yaml
264264
kustomize_substitutions:
265265
CLUSTER_TOPOLOGY: "true"
266-
EXP_MACHINE_POOL: "true"
267266
EXP_CLUSTER_RESOURCE_SET: "true"
268267
EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION: "true"
269268
EXP_RUNTIME_SDK: "true"

docs/book/src/developer/tilt.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ provider's yaml. These substitutions are also used when deploying cluster templa
108108
```yaml
109109
kustomize_substitutions:
110110
CLUSTER_TOPOLOGY: "true"
111-
EXP_MACHINE_POOL: "true"
112111
EXP_CLUSTER_RESOURCE_SET: "true"
113112
EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION: "true"
114113
EXP_RUNTIME_SDK: "true"

docs/book/src/tasks/experimental-features/experimental-features.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ One way is to set experimental variables on the clusterctl config file. For CAPI
3131
```yaml
3232
variables:
3333
EXP_CLUSTER_RESOURCE_SET: "true"
34-
EXP_MACHINE_POOL: "true"
3534
CLUSTER_TOPOLOGY: "true"
3635
EXP_RUNTIME_SDK: "true"
3736
EXP_MACHINE_SET_PREFLIGHT_CHECKS: "true"
@@ -46,7 +45,6 @@ On development environments started with `Tilt`, features can be enabled by sett
4645
```yaml
4746
kustomize_substitutions:
4847
EXP_CLUSTER_RESOURCE_SET: 'true'
49-
EXP_MACHINE_POOL: 'true'
5048
CLUSTER_TOPOLOGY: 'true'
5149
EXP_RUNTIME_SDK: 'true'
5250
EXP_MACHINE_SET_PREFLIGHT_CHECKS: 'true'

docs/book/src/tasks/experimental-features/machine-pools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Experimental Feature: MachinePool (alpha)
1+
# Experimental Feature: MachinePool (beta)
22

33
The `MachinePool` feature provides a way to manage a set of machines by defining a common configuration, number of desired machine replicas etc. similar to `MachineDeployment`,
44
except `MachineSet` controllers are responsible for the lifecycle management of the machines for `MachineDeployment`, whereas in `MachinePools`,

0 commit comments

Comments
 (0)