Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PSAP-741) config/v1/types_cluster_version: add node-tuning capability #1373

Merged
merged 2 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ spec:
- Insights
- Storage
- CSISnapshot
- NodeTuning
x-kubernetes-list-type: atomic
baselineCapabilitySet:
description: baselineCapabilitySet selects an initial set of optional capabilities to enable, which can be extended via additionalEnabledCapabilities. If unset, the cluster will choose a default, and the default may change over time. The current default is vCurrent.
Expand All @@ -78,6 +79,7 @@ spec:
- None
- v4.11
- v4.12
- v4.13
- vCurrent
channel:
description: channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters.
Expand Down Expand Up @@ -189,6 +191,7 @@ spec:
- Insights
- Storage
- CSISnapshot
- NodeTuning
x-kubernetes-list-type: atomic
knownCapabilities:
description: knownCapabilities lists all the capabilities known to the current cluster.
Expand All @@ -204,6 +207,7 @@ spec:
- Insights
- Storage
- CSISnapshot
- NodeTuning
x-kubernetes-list-type: atomic
conditionalUpdates:
description: conditionalUpdates contains the list of updates that may be recommended for this cluster if it meets specific required conditions. Consumers interested in the set of updates that are actually recommended for this cluster should use availableUpdates. This list may be empty if no updates are recommended, if the update service is unavailable, or if an empty or invalid channel has been specified.
Expand Down
28 changes: 26 additions & 2 deletions config/v1/types_cluster_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const (
)

// ClusterVersionCapability enumerates optional, core cluster components.
// +kubebuilder:validation:Enum=openshift-samples;baremetal;marketplace;Console;Insights;Storage;CSISnapshot
// +kubebuilder:validation:Enum=openshift-samples;baremetal;marketplace;Console;Insights;Storage;CSISnapshot;NodeTuning
type ClusterVersionCapability string

const (
Expand Down Expand Up @@ -287,6 +287,12 @@ const (
// VolumeSnapshot CRD objects and manages the creation and deletion
// lifecycle of volume snapshots
ClusterVersionCapabilityCSISnapshot ClusterVersionCapability = "CSISnapshot"

// ClusterVersionCapabilityNodeTuning manages the Node Tuning Operator
// which is responsible for watching the Tuned and Profile CRD
// objects and manages the containerized TuneD daemon which controls
// system level tuning of Nodes
ClusterVersionCapabilityNodeTuning ClusterVersionCapability = "NodeTuning"
)

// KnownClusterVersionCapabilities includes all known optional, core cluster components.
Expand All @@ -298,10 +304,11 @@ var KnownClusterVersionCapabilities = []ClusterVersionCapability{
ClusterVersionCapabilityStorage,
ClusterVersionCapabilityOpenShiftSamples,
ClusterVersionCapabilityCSISnapshot,
ClusterVersionCapabilityNodeTuning,
}

// ClusterVersionCapabilitySet defines sets of cluster version capabilities.
// +kubebuilder:validation:Enum=None;v4.11;v4.12;vCurrent
// +kubebuilder:validation:Enum=None;v4.11;v4.12;v4.13;vCurrent
type ClusterVersionCapabilitySet string

const (
Expand All @@ -321,6 +328,12 @@ const (
// version of OpenShift is installed.
ClusterVersionCapabilitySet4_12 ClusterVersionCapabilitySet = "v4.12"

// ClusterVersionCapabilitySet4_13 is the recommended set of
// optional capabilities to enable for the 4.13 version of
// OpenShift. This list will remain the same no matter which
// version of OpenShift is installed.
ClusterVersionCapabilitySet4_13 ClusterVersionCapabilitySet = "v4.13"

// ClusterVersionCapabilitySetCurrent is the recommended set
// of optional capabilities to enable for the cluster's
// current version of OpenShift.
Expand All @@ -344,6 +357,16 @@ var ClusterVersionCapabilitySets = map[ClusterVersionCapabilitySet][]ClusterVers
ClusterVersionCapabilityOpenShiftSamples,
ClusterVersionCapabilityCSISnapshot,
},
ClusterVersionCapabilitySet4_13: {
ClusterVersionCapabilityBaremetal,
ClusterVersionCapabilityConsole,
ClusterVersionCapabilityInsights,
ClusterVersionCapabilityMarketplace,
ClusterVersionCapabilityStorage,
ClusterVersionCapabilityOpenShiftSamples,
ClusterVersionCapabilityCSISnapshot,
ClusterVersionCapabilityNodeTuning,
},
ClusterVersionCapabilitySetCurrent: {
ClusterVersionCapabilityBaremetal,
ClusterVersionCapabilityConsole,
Expand All @@ -352,6 +375,7 @@ var ClusterVersionCapabilitySets = map[ClusterVersionCapabilitySet][]ClusterVers
ClusterVersionCapabilityStorage,
ClusterVersionCapabilityOpenShiftSamples,
ClusterVersionCapabilityCSISnapshot,
ClusterVersionCapabilityNodeTuning,
},
}

Expand Down