You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/bootstrap-methods.md
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,78 @@ spec:
121
121
122
122
### Customization Options
123
123
124
+
### Kubelet Configuration Overrides
125
+
126
+
For VPC bootstrap, you can override a subset of kubelet configuration directly from the `IBMNodeClass`. These settings are rendered into the kubelet `config.yaml` on the node and validated by the CRD.
127
+
128
+
```yaml
129
+
apiVersion: karpenter-ibm.sh/v1alpha1
130
+
kind: IBMNodeClass
131
+
metadata:
132
+
name: vpc-bootstrap-kubelet
133
+
spec:
134
+
region: us-south
135
+
zone: us-south-1
136
+
vpc: "r006-a8efb117-fd5e-4f63-ae16-4fb9faafa4ff"
137
+
image: ubuntu-24-04-amd64
138
+
apiServerEndpoint: "https://10.240.0.1:6443"
139
+
bootstrapMode: cloud-init
140
+
securityGroups:
141
+
- "r006-12345678-1234-1234-1234-123456789012"
142
+
143
+
kubelet:
144
+
clusterDNS:
145
+
- 10.96.0.10
146
+
- 10.96.0.11
147
+
148
+
maxPods: 150
149
+
podsPerCore: 10
150
+
151
+
kubeReserved:
152
+
cpu: "200m"
153
+
memory: "512Mi"
154
+
155
+
systemReserved:
156
+
cpu: "100m"
157
+
memory: "256Mi"
158
+
159
+
evictionHard:
160
+
memory.available: "500Mi"
161
+
162
+
evictionSoft:
163
+
memory.available: "1Gi"
164
+
165
+
evictionSoftGracePeriod:
166
+
memory.available: "1m0s"
167
+
168
+
evictionMaxPodGracePeriod: 120
169
+
170
+
imageGCHighThresholdPercent: 85
171
+
imageGCLowThresholdPercent: 70
172
+
173
+
cpuCFSQuota: true
174
+
175
+
```
176
+
* **Reserved resources**
177
+
* `systemReserved` and `kubeReserved` keys must be one of:
178
+
`cpu`, `memory`, `ephemeral-storage`, `pid`.
179
+
* Values must not be negative (strings starting with `-` are rejected).
180
+
181
+
* **Eviction settings**
182
+
* `evictionHard`, `evictionSoft`, and `evictionSoftGracePeriod` may only use:
Copy file name to clipboardExpand all lines: pkg/apis/v1alpha1/ibmnodeclass_types.go
+80Lines changed: 80 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -253,6 +253,77 @@ type BlockDeviceMapping struct {
253
253
RootVolumebool`json:"rootVolume,omitempty"`
254
254
}
255
255
256
+
// KubeletConfiguration defines args to be used when configuring kubelet on provisioned nodes.
257
+
typeKubeletConfigurationstruct {
258
+
// ClusterDNS is a list of IP addresses for the cluster DNS server.
259
+
// +optional
260
+
ClusterDNS []string`json:"clusterDNS,omitempty"`
261
+
262
+
// MaxPods is an override for the maximum number of pods that can run on a worker node instance.
263
+
// +kubebuilder:validation:Minimum:=0
264
+
// +optional
265
+
MaxPods*int32`json:"maxPods,omitempty"`
266
+
267
+
// PodsPerCore is an override for the number of pods that can run on a worker node
268
+
// instance based on the number of cpu cores.
269
+
// +kubebuilder:validation:Minimum:=0
270
+
// +optional
271
+
PodsPerCore*int32`json:"podsPerCore,omitempty"`
272
+
273
+
// SystemReserved contains resources reserved for OS system daemons and kernel memory.
274
+
// +kubebuilder:validation:XValidation:message="valid keys for systemReserved are ['cpu','memory','ephemeral-storage','pid']",rule="self.all(x, x=='cpu' || x=='memory' || x=='ephemeral-storage' || x=='pid')"
275
+
// +kubebuilder:validation:XValidation:message="systemReserved value cannot be a negative resource quantity",rule="self.all(x, !self[x].startsWith('-'))"
// KubeReserved contains resources reserved for Kubernetes system components.
280
+
// +kubebuilder:validation:XValidation:message="valid keys for kubeReserved are ['cpu','memory','ephemeral-storage','pid']",rule="self.all(x, x=='cpu' || x=='memory' || x=='ephemeral-storage' || x=='pid')"
281
+
// +kubebuilder:validation:XValidation:message="kubeReserved value cannot be a negative resource quantity",rule="self.all(x, !self[x].startsWith('-'))"
// EvictionHard is the map of signal names to quantities that define hard eviction thresholds
286
+
// +kubebuilder:validation:XValidation:message="valid keys for evictionHard are ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available']",rule="self.all(x, x in ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available'])"
287
+
// +kubebuilder:validation:XValidation:message="evictionHard value cannot be a negative resource quantity",rule="self.all(x, !self[x].startsWith('-'))"
// EvictionSoft is the map of signal names to quantities that define soft eviction thresholds
292
+
// +kubebuilder:validation:XValidation:message="valid keys for evictionSoft are ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available']",rule="self.all(x, x in ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available'])"
293
+
// +kubebuilder:validation:XValidation:message="evictionSoft value cannot be a negative resource quantity",rule="self.all(x, !self[x].startsWith('-'))"
// EvictionSoftGracePeriod is the map of signal names to quantities that define grace periods for each eviction signal
298
+
// +kubebuilder:validation:XValidation:message="valid keys for evictionSoftGracePeriod are ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available']",rule="self.all(x, x in ['memory.available','nodefs.available','nodefs.inodesFree','imagefs.available','imagefs.inodesFree','pid.available'])"
// Kubelet defines args to be used when configuring kubelet on provisioned nodes.
583
+
// They are a subset of the upstream types, recognizing not all options may be supported.
584
+
// Wherever possible, the types and names should reflect the upstream kubelet types.
585
+
// +optional
586
+
// +kubebuilder:validation:XValidation:message="imageGCHighThresholdPercent must be greater than imageGCLowThresholdPercent",rule="has(self.imageGCHighThresholdPercent) && has(self.imageGCLowThresholdPercent) ? self.imageGCHighThresholdPercent > self.imageGCLowThresholdPercent : true"
587
+
// +kubebuilder:validation:XValidation:message="evictionSoft key does not have a matching evictionSoftGracePeriod",rule="has(self.evictionSoft) ? self.evictionSoft.all(e, e in self.evictionSoftGracePeriod) : true"
588
+
// +kubebuilder:validation:XValidation:message="evictionSoftGracePeriod key does not have a matching evictionSoft",rule="has(self.evictionSoftGracePeriod) ? self.evictionSoftGracePeriod.all(e, e in self.evictionSoft) : true"
0 commit comments