Skip to content

Commit

Permalink
api: add oldestKubeletVersion
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hunt <[email protected]>
  • Loading branch information
haircommander committed Dec 2, 2024
1 parent 3983ff1 commit 9e7cce0
Show file tree
Hide file tree
Showing 14 changed files with 884 additions and 224 deletions.
4 changes: 4 additions & 0 deletions api/hypershift/v1beta1/hosted_controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ type HostedControlPlaneStatus struct {

// NodeCount tracks the number of nodes in the HostedControlPlane.
NodeCount *int `json:"nodeCount,omitempty"`

// OldestKubeletVersion tracks the oldest kubelet version in a hosted cluster
// +openshift:enable:FeatureGate=MinimumKubeletVersion
OldestKubeletVersion *string `json:"oldestKubeletVersion,omitempty"`
}

type APIEndpoint struct {
Expand Down
4 changes: 4 additions & 0 deletions api/hypershift/v1beta1/hostedcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,10 @@ type HostedClusterStatus struct {
// Platform contains platform-specific status of the HostedCluster
// +optional
Platform *PlatformStatus `json:"platform,omitempty"`

// OldestKubeletVersion tracks the oldest kubelet version in a hosted cluster
// +openshift:enable:FeatureGate=MinimumKubeletVersion
OldestKubeletVersion *string `json:"oldestKubeletVersion,omitempty"`
}

// PlatformStatus contains platform-specific status
Expand Down
10 changes: 10 additions & 0 deletions api/hypershift/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,27 @@ spec:
- v2
- ""
type: string
minimumKubeletVersion:
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.
maxLength: 8
type: string
x-kubernetes-validations:
- message: minmumKubeletVersion must be in a semver compatible
format of x.y.z, or empty
rule: self == "" || self.matches('^[0-9]*.[0-9]*.[0-9]*$')
workerLatencyProfile:
description: |-
WorkerLatencyProfile determins the how fast the kubelet is updating
Expand Down Expand Up @@ -5421,6 +5442,10 @@ spec:
with the name of an identity provider defined on the HostedCluster.
This is populated after the infrastructure is ready.
type: string
oldestKubeletVersion:
description: OldestKubeletVersion tracks the oldest kubelet version
in a hosted cluster
type: string
payloadArch:
description: |-
payloadArch represents the CPU architecture type of the HostedCluster.Spec.Release.Image. The valid values are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,27 @@ spec:
- v2
- ""
type: string
minimumKubeletVersion:
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.
maxLength: 8
type: string
x-kubernetes-validations:
- message: minmumKubeletVersion must be in a semver compatible
format of x.y.z, or empty
rule: self == "" || self.matches('^[0-9]*.[0-9]*.[0-9]*$')
workerLatencyProfile:
description: |-
WorkerLatencyProfile determins the how fast the kubelet is updating
Expand Down Expand Up @@ -5265,6 +5286,10 @@ spec:
with the name of an identity provider defined on the HostedCluster.
This is populated after the infrastructure is ready.
type: string
oldestKubeletVersion:
description: OldestKubeletVersion tracks the oldest kubelet version
in a hosted cluster
type: string
platform:
description: Platform contains platform-specific status of the HostedCluster
properties:
Expand Down
22 changes: 22 additions & 0 deletions docs/content/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5479,6 +5479,17 @@ PlatformStatus
<p>Platform contains platform-specific status of the HostedCluster</p>
</td>
</tr>
<tr>
<td>
<code>oldestKubeletVersion</code></br>
<em>
string
</em>
</td>
<td>
<p>OldestKubeletVersion tracks the oldest kubelet version in a hosted cluster</p>
</td>
</tr>
</tbody>
</table>
###HostedControlPlaneSpec { #hypershift.openshift.io/v1beta1.HostedControlPlaneSpec }
Expand Down Expand Up @@ -6126,6 +6137,17 @@ int
<p>NodeCount tracks the number of nodes in the HostedControlPlane.</p>
</td>
</tr>
<tr>
<td>
<code>oldestKubeletVersion</code></br>
<em>
string
</em>
</td>
<td>
<p>OldestKubeletVersion tracks the oldest kubelet version in a hosted cluster</p>
</td>
</tr>
</tbody>
</table>
###IBMCloudKMSAuthSpec { #hypershift.openshift.io/v1beta1.IBMCloudKMSAuthSpec }
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9e7cce0

Please sign in to comment.