Skip to content

Commit 827964e

Browse files
committed
user namespaces: add required minimum kubelet version
Signed-off-by: Peter Hunt <[email protected]>
1 parent 303d29a commit 827964e

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

Diff for: enhancements/kubelet/user-namespaces-support.md

+50
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,56 @@ that are running with a version lower than the configured version. If so, the cr
373373

374374
MCO will read the MinimumKubeletVersion and mark machines as degraded if the node is not at least MinimumKubeletVersion.
375375

376+
##### RequiredMinimumComponentVersion
377+
378+
The openshift featuregate API is the way to configure featuregates in a cluster. We will plumb awareness of the minimum kubelet version to the featuregate API by adding
379+
a RequiredMinimumComponentVersion to the FeatureGateAttributes structure:
380+
381+
```
382+
type FeatureGateAttributes struct {
383+
// name is the name of the FeatureGate.
384+
// +required
385+
Name FeatureGateName `json:"name"`
386+
387+
// requiredMinimumComponentVersion is a list of component/version pairs that declares the is the lowest version the given
388+
// component may be in this cluster.
389+
// Currently, the only supported component is Kubelet, and setting a required minimum kubelet component will set the
390+
// minimumKubeletVersion field in the nodes.config.openshift.io CRD.
391+
// +kubebuilder:validation:MaxItems:=1
392+
// +listType=map
393+
// +listMapKey=component
394+
// +openshift:enable:FeatureGate=MinimumKubeletVersion
395+
// +optional
396+
RequiredMinimumComponentVersions []RequiredMinimumComponentVersion `json:"requiredMinimumComponentVersions,omitempty"`
397+
398+
// possible (probable?) future additions include
399+
// 1. support level (Stable, ServiceDeliveryOnly, TechPreview, DevPreview)
400+
// 2. description
401+
}
402+
403+
// RequiredMinimumComponentVersion is a pair of Component and Version that specifies the required minimum Version of the given Component
404+
// to enable this feature.
405+
type RequiredMinimumComponentVersion struct {
406+
// component is the entity whose version must be above a certain version.
407+
// +required
408+
Component RequiredMinimumComponent `json:"component"`
409+
// version is the minimum version the given component may be in this cluster.
410+
// +kubebuilder:validation:XValidation:rule="self.matches('^[0-9]*.[0-9]*.[0-9]*$')",message="minmumKubeletVersion must be in a semver compatible format of x.y.z, or empty"
411+
// +kubebuilder:validation:MaxLength:=8
412+
// +required
413+
Version string `json:"version"`
414+
}
415+
416+
// +kubebuilder:validation:Enum:=Kubelet
417+
type RequiredMinimumComponent string
418+
419+
var RequiredMinimumComponentKubelet RequiredMinimumComponent = "Kubelet"
420+
```
421+
422+
Then, the featuregate controller in the cluster-config-operator will be extended to filter features from the Enabled set if the minimum kubelet version isn't set old enough.
423+
This will give openshift feature developers a mechansim to programatically declare a feature requires a certain version of the kubelet. This will be used for user namespaces,
424+
and the corresponding version for user namespaces and related feature gates will be "1.30.0"
425+
376426
##### Alternatives to MinimumKubeletVersion
377427

378428
It is also possible this feature should be paired with a corresponding kubelet field `minimumKubeletVersion`, where it exits if it is too old. This will prevent the kubelet from

0 commit comments

Comments
 (0)