Skip to content

Commit 180583c

Browse files
committed
nodes config: add minimumKubeletVersion to status
Signed-off-by: Peter Hunt <[email protected]>
1 parent b920172 commit 180583c

11 files changed

+203
-1
lines changed

config/v1/types_node.go

+22
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,28 @@ type NodeStatus struct {
7272
// +listMapKey=type
7373
// +optional
7474
Conditions []metav1.Condition `json:"conditions,omitempty"`
75+
76+
// minimumKubeletVersion is the lowest version of a kubelet that can join the cluster.
77+
// Specifically, the apiserver will deny most authorization requests of kubelets that are older
78+
// than the specified version, only allowing the kubelet to get and update its node object, and perform
79+
// subjectaccessreviews.
80+
// This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads,
81+
// and will eventually be marked as not ready.
82+
// Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99".
83+
// Since the kubelet reports the version of the kubernetes release, not Openshift, this field references
84+
// the underlying kubernetes version this version of Openshift is based off of.
85+
// In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then
86+
// they should set the minimumKubeletVersion to 1.30.0.
87+
// When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version.
88+
// Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier.
89+
// This status field is used to reflect the actualized minimum kubelet version, which can be interpreted from the
90+
// FeatureGateStatus.RenderedMinimumComponentVersion when Component == Kubelet, after that FeatureGateStatus finishes rolling out to
91+
// all kubelets.
92+
// +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"
93+
// +kubebuilder:validation:MaxLength:=8
94+
// +openshift:enable:FeatureGate=MinimumKubeletVersion
95+
// +optional
96+
MinimumKubeletVersion string `json:"minimumKubeletVersion,omitempty"`
7597
}
7698

7799
// +kubebuilder:validation:Enum=v1;v2;""

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_nodes-CustomNoUpgrade.crd.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,30 @@ spec:
148148
x-kubernetes-list-map-keys:
149149
- type
150150
x-kubernetes-list-type: map
151+
minimumKubeletVersion:
152+
description: |-
153+
minimumKubeletVersion is the lowest version of a kubelet that can join the cluster.
154+
Specifically, the apiserver will deny most authorization requests of kubelets that are older
155+
than the specified version, only allowing the kubelet to get and update its node object, and perform
156+
subjectaccessreviews.
157+
This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads,
158+
and will eventually be marked as not ready.
159+
Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99".
160+
Since the kubelet reports the version of the kubernetes release, not Openshift, this field references
161+
the underlying kubernetes version this version of Openshift is based off of.
162+
In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then
163+
they should set the minimumKubeletVersion to 1.30.0.
164+
When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version.
165+
Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier.
166+
This status field is used to reflect the actualized minimum kubelet version, which can be interpreted from the
167+
FeatureGateStatus.RenderedMinimumComponentVersion when Component == Kubelet, after that FeatureGateStatus finishes rolling out to
168+
all kubelets.
169+
maxLength: 8
170+
type: string
171+
x-kubernetes-validations:
172+
- message: minmumKubeletVersion must be in a semver compatible format
173+
of x.y.z, or empty
174+
rule: self.matches('^[0-9]*.[0-9]*.[0-9]*$')
151175
type: object
152176
required:
153177
- spec

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_nodes-DevPreviewNoUpgrade.crd.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,30 @@ spec:
148148
x-kubernetes-list-map-keys:
149149
- type
150150
x-kubernetes-list-type: map
151+
minimumKubeletVersion:
152+
description: |-
153+
minimumKubeletVersion is the lowest version of a kubelet that can join the cluster.
154+
Specifically, the apiserver will deny most authorization requests of kubelets that are older
155+
than the specified version, only allowing the kubelet to get and update its node object, and perform
156+
subjectaccessreviews.
157+
This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads,
158+
and will eventually be marked as not ready.
159+
Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99".
160+
Since the kubelet reports the version of the kubernetes release, not Openshift, this field references
161+
the underlying kubernetes version this version of Openshift is based off of.
162+
In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then
163+
they should set the minimumKubeletVersion to 1.30.0.
164+
When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version.
165+
Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier.
166+
This status field is used to reflect the actualized minimum kubelet version, which can be interpreted from the
167+
FeatureGateStatus.RenderedMinimumComponentVersion when Component == Kubelet, after that FeatureGateStatus finishes rolling out to
168+
all kubelets.
169+
maxLength: 8
170+
type: string
171+
x-kubernetes-validations:
172+
- message: minmumKubeletVersion must be in a semver compatible format
173+
of x.y.z, or empty
174+
rule: self.matches('^[0-9]*.[0-9]*.[0-9]*$')
151175
type: object
152176
required:
153177
- spec

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_nodes-TechPreviewNoUpgrade.crd.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,30 @@ spec:
148148
x-kubernetes-list-map-keys:
149149
- type
150150
x-kubernetes-list-type: map
151+
minimumKubeletVersion:
152+
description: |-
153+
minimumKubeletVersion is the lowest version of a kubelet that can join the cluster.
154+
Specifically, the apiserver will deny most authorization requests of kubelets that are older
155+
than the specified version, only allowing the kubelet to get and update its node object, and perform
156+
subjectaccessreviews.
157+
This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads,
158+
and will eventually be marked as not ready.
159+
Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99".
160+
Since the kubelet reports the version of the kubernetes release, not Openshift, this field references
161+
the underlying kubernetes version this version of Openshift is based off of.
162+
In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then
163+
they should set the minimumKubeletVersion to 1.30.0.
164+
When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version.
165+
Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier.
166+
This status field is used to reflect the actualized minimum kubelet version, which can be interpreted from the
167+
FeatureGateStatus.RenderedMinimumComponentVersion when Component == Kubelet, after that FeatureGateStatus finishes rolling out to
168+
all kubelets.
169+
maxLength: 8
170+
type: string
171+
x-kubernetes-validations:
172+
- message: minmumKubeletVersion must be in a semver compatible format
173+
of x.y.z, or empty
174+
rule: self.matches('^[0-9]*.[0-9]*.[0-9]*$')
151175
type: object
152176
required:
153177
- spec

config/v1/zz_generated.featuregated-crd-manifests/nodes.config.openshift.io/MinimumKubeletVersion.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,30 @@ spec:
148148
x-kubernetes-list-map-keys:
149149
- type
150150
x-kubernetes-list-type: map
151+
minimumKubeletVersion:
152+
description: |-
153+
minimumKubeletVersion is the lowest version of a kubelet that can join the cluster.
154+
Specifically, the apiserver will deny most authorization requests of kubelets that are older
155+
than the specified version, only allowing the kubelet to get and update its node object, and perform
156+
subjectaccessreviews.
157+
This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads,
158+
and will eventually be marked as not ready.
159+
Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99".
160+
Since the kubelet reports the version of the kubernetes release, not Openshift, this field references
161+
the underlying kubernetes version this version of Openshift is based off of.
162+
In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then
163+
they should set the minimumKubeletVersion to 1.30.0.
164+
When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version.
165+
Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier.
166+
This status field is used to reflect the actualized minimum kubelet version, which can be interpreted from the
167+
FeatureGateStatus.RenderedMinimumComponentVersion when Component == Kubelet, after that FeatureGateStatus finishes rolling out to
168+
all kubelets.
169+
maxLength: 8
170+
type: string
171+
x-kubernetes-validations:
172+
- message: minmumKubeletVersion must be in a semver compatible format
173+
of x.y.z, or empty
174+
rule: self.matches('^[0-9]*.[0-9]*.[0-9]*$')
151175
type: object
152176
required:
153177
- spec

config/v1/zz_generated.swagger_doc_generated.go

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/generated_openapi/zz_generated.openapi.go

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/openapi.json

+4
Original file line numberDiff line numberDiff line change
@@ -8395,6 +8395,10 @@
83958395
"type"
83968396
],
83978397
"x-kubernetes-list-type": "map"
8398+
},
8399+
"minimumKubeletVersion": {
8400+
"description": "minimumKubeletVersion is the lowest version of a kubelet that can join the cluster. Specifically, the apiserver will deny most authorization requests of kubelets that are older than the specified version, only allowing the kubelet to get and update its node object, and perform subjectaccessreviews. This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads, and will eventually be marked as not ready. Its max length is 8, so maximum version allowed is either \"9.999.99\" or \"99.99.99\". Since the kubelet reports the version of the kubernetes release, not Openshift, this field references the underlying kubernetes version this version of Openshift is based off of. In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then they should set the minimumKubeletVersion to 1.30.0. When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version. Thus, a kubelet with version \"1.0.0-ec.0\" will be compatible with minimumKubeletVersion \"1.0.0\" or earlier. This status field is used to reflect the actualized minimum kubelet version, which can be interpreted from the FeatureGateStatus.RenderedMinimumComponentVersion when Component == Kubelet, after that FeatureGateStatus finishes rolling out to all kubelets.",
8401+
"type": "string"
83988402
}
83998403
}
84008404
},

payload-manifests/crds/0000_10_config-operator_01_nodes-CustomNoUpgrade.crd.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,30 @@ spec:
148148
x-kubernetes-list-map-keys:
149149
- type
150150
x-kubernetes-list-type: map
151+
minimumKubeletVersion:
152+
description: |-
153+
minimumKubeletVersion is the lowest version of a kubelet that can join the cluster.
154+
Specifically, the apiserver will deny most authorization requests of kubelets that are older
155+
than the specified version, only allowing the kubelet to get and update its node object, and perform
156+
subjectaccessreviews.
157+
This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads,
158+
and will eventually be marked as not ready.
159+
Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99".
160+
Since the kubelet reports the version of the kubernetes release, not Openshift, this field references
161+
the underlying kubernetes version this version of Openshift is based off of.
162+
In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then
163+
they should set the minimumKubeletVersion to 1.30.0.
164+
When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version.
165+
Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier.
166+
This status field is used to reflect the actualized minimum kubelet version, which can be interpreted from the
167+
FeatureGateStatus.RenderedMinimumComponentVersion when Component == Kubelet, after that FeatureGateStatus finishes rolling out to
168+
all kubelets.
169+
maxLength: 8
170+
type: string
171+
x-kubernetes-validations:
172+
- message: minmumKubeletVersion must be in a semver compatible format
173+
of x.y.z, or empty
174+
rule: self.matches('^[0-9]*.[0-9]*.[0-9]*$')
151175
type: object
152176
required:
153177
- spec

payload-manifests/crds/0000_10_config-operator_01_nodes-DevPreviewNoUpgrade.crd.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,30 @@ spec:
148148
x-kubernetes-list-map-keys:
149149
- type
150150
x-kubernetes-list-type: map
151+
minimumKubeletVersion:
152+
description: |-
153+
minimumKubeletVersion is the lowest version of a kubelet that can join the cluster.
154+
Specifically, the apiserver will deny most authorization requests of kubelets that are older
155+
than the specified version, only allowing the kubelet to get and update its node object, and perform
156+
subjectaccessreviews.
157+
This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads,
158+
and will eventually be marked as not ready.
159+
Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99".
160+
Since the kubelet reports the version of the kubernetes release, not Openshift, this field references
161+
the underlying kubernetes version this version of Openshift is based off of.
162+
In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then
163+
they should set the minimumKubeletVersion to 1.30.0.
164+
When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version.
165+
Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier.
166+
This status field is used to reflect the actualized minimum kubelet version, which can be interpreted from the
167+
FeatureGateStatus.RenderedMinimumComponentVersion when Component == Kubelet, after that FeatureGateStatus finishes rolling out to
168+
all kubelets.
169+
maxLength: 8
170+
type: string
171+
x-kubernetes-validations:
172+
- message: minmumKubeletVersion must be in a semver compatible format
173+
of x.y.z, or empty
174+
rule: self.matches('^[0-9]*.[0-9]*.[0-9]*$')
151175
type: object
152176
required:
153177
- spec

0 commit comments

Comments
 (0)