Skip to content

Commit 45a9cc2

Browse files
committed
fixup! feat: support setting kubeadm ignorePreflightErrors
Set default ignorePreflightErrors: ["SystemVerification"]
1 parent 542f995 commit 45a9cc2

13 files changed

+57
-0
lines changed

api/v1alpha1/crds/caren.nutanix.com_awsclusterconfigs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,12 @@ spec:
378378
type: string
379379
type: object
380380
nodeRegistration:
381+
default: {}
381382
description: NodeRegistration holds fields that relate to registering the new control-plane node to the cluster.
382383
properties:
383384
ignorePreflightErrors:
385+
default:
386+
- SystemVerification
384387
description: |-
385388
IgnorePreflightErrors specifies a slice of pre-flight errors to be ignored by kubeadm
386389
when the current node is registered.

api/v1alpha1/crds/caren.nutanix.com_awsworkernodeconfigs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,13 @@ spec:
9191
type: string
9292
type: object
9393
nodeRegistration:
94+
default: {}
9495
description: NodeRegistration holds fields that relate to registering
9596
the new control-plane node to the cluster.
9697
properties:
9798
ignorePreflightErrors:
99+
default:
100+
- SystemVerification
98101
description: |-
99102
IgnorePreflightErrors specifies a slice of pre-flight errors to be ignored by kubeadm
100103
when the current node is registered.

api/v1alpha1/crds/caren.nutanix.com_dockerclusterconfigs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,12 @@ spec:
307307
type: string
308308
type: object
309309
nodeRegistration:
310+
default: {}
310311
description: NodeRegistration holds fields that relate to registering the new control-plane node to the cluster.
311312
properties:
312313
ignorePreflightErrors:
314+
default:
315+
- SystemVerification
313316
description: |-
314317
IgnorePreflightErrors specifies a slice of pre-flight errors to be ignored by kubeadm
315318
when the current node is registered.

api/v1alpha1/crds/caren.nutanix.com_dockerworkernodeconfigs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ spec:
6666
type: string
6767
type: object
6868
nodeRegistration:
69+
default: {}
6970
description: NodeRegistration holds fields that relate to registering
7071
the new control-plane node to the cluster.
7172
properties:
7273
ignorePreflightErrors:
74+
default:
75+
- SystemVerification
7376
description: |-
7477
IgnorePreflightErrors specifies a slice of pre-flight errors to be ignored by kubeadm
7578
when the current node is registered.

api/v1alpha1/crds/caren.nutanix.com_nutanixclusterconfigs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,12 @@ spec:
300300
- daysBeforeExpiry
301301
type: object
302302
nodeRegistration:
303+
default: {}
303304
description: NodeRegistration holds fields that relate to registering the new control-plane node to the cluster.
304305
properties:
305306
ignorePreflightErrors:
307+
default:
308+
- SystemVerification
306309
description: |-
307310
IgnorePreflightErrors specifies a slice of pre-flight errors to be ignored by kubeadm
308311
when the current node is registered.

api/v1alpha1/crds/caren.nutanix.com_nutanixworkernodeconfigs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ spec:
4242
description: NutanixWorkerNodeConfigSpec defines the desired state of NutanixNodeSpec.
4343
properties:
4444
nodeRegistration:
45+
default: {}
4546
description: NodeRegistration holds fields that relate to registering the new control-plane node to the cluster.
4647
properties:
4748
ignorePreflightErrors:
49+
default:
50+
- SystemVerification
4851
description: |-
4952
IgnorePreflightErrors specifies a slice of pre-flight errors to be ignored by kubeadm
5053
when the current node is registered.

api/v1alpha1/nodeconfig_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ type GenericNodeSpec struct {
109109

110110
// NodeRegistration holds fields that relate to registering the new control-plane node to the cluster.
111111
// +kubebuilder:validation:Optional
112+
// +kubebuilder:default={}
112113
NodeRegistration *NodeRegistrationOptions `json:"nodeRegistration,omitempty"`
113114
}
114115

@@ -156,6 +157,7 @@ type NodeRegistrationOptions struct {
156157
// IgnorePreflightErrors specifies a slice of pre-flight errors to be ignored by kubeadm
157158
// when the current node is registered.
158159
// +kubebuilder:validation:Optional
160+
// +kubebuilder:default={"SystemVerification"}
159161
// +kubebuilder:validation:MaxItems=50
160162
// +kubebuilder:validation:items:MinLength=1
161163
// +kubebuilder:validation:items:MaxLength=512

docs/content/customization/generic/node-registration.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,35 @@ Applying this configuration will result in the following value being set:
8484
ignorePreflightErrors:
8585
- SystemVerification
8686
```
87+
88+
By default, the following value will be set for both control plane and worker nodes:
89+
90+
```yaml
91+
variables:
92+
- name: clusterConfig
93+
value:
94+
controlPlane:
95+
nodeRegistration:
96+
ignorePreflightErrors:
97+
- SystemVerification
98+
- name: workerConfig
99+
value:
100+
nodeRegistration:
101+
ignorePreflightErrors:
102+
- SystemVerification
103+
```
104+
105+
This can be enabled by setting `ignorePreflightErrors` to an empty list:
106+
107+
```yaml
108+
variables:
109+
- name: clusterConfig
110+
value:
111+
controlPlane:
112+
nodeRegistration:
113+
ignorePreflightErrors: []
114+
- name: workerConfig
115+
value:
116+
nodeRegistration:
117+
ignorePreflightErrors: []
118+
```

examples/capi-quick-start/docker-cluster-calico-crs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ spec:
4949
- end: 198.18.1.30
5050
start: 198.18.1.21
5151
provider: MetalLB
52+
controlPlane: {}
5253
dns:
5354
coreDNS: {}
5455
encryptionAtRest:

examples/capi-quick-start/docker-cluster-calico-helm-addon.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ spec:
4444
- end: 198.18.1.30
4545
start: 198.18.1.21
4646
provider: MetalLB
47+
controlPlane: {}
4748
dns:
4849
coreDNS: {}
4950
encryptionAtRest:

examples/capi-quick-start/docker-cluster-cilium-crs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ spec:
4949
- end: 198.18.1.30
5050
start: 198.18.1.21
5151
provider: MetalLB
52+
controlPlane: {}
5253
dns:
5354
coreDNS: {}
5455
encryptionAtRest:

examples/capi-quick-start/docker-cluster-cilium-helm-addon.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ spec:
4444
- end: 198.18.1.30
4545
start: 198.18.1.21
4646
provider: MetalLB
47+
controlPlane: {}
4748
dns:
4849
coreDNS: {}
4950
encryptionAtRest:

hack/examples/patches/initialize-variables.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
value:
77
- name: "clusterConfig"
88
value:
9+
controlPlane: {}
910
addons:
1011
clusterAutoscaler: {}
1112
nfd: {}

0 commit comments

Comments
 (0)