Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 68 additions & 2 deletions config/v1/types_cluster_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ const (
)

// ClusterVersionCapability enumerates optional, core cluster components.
// +kubebuilder:validation:Enum=openshift-samples;baremetal;marketplace;Console;Insights;Storage;CSISnapshot;NodeTuning;MachineAPI;Build;DeploymentConfig;ImageRegistry;OperatorLifecycleManager;CloudCredential;Ingress;CloudControllerManager;OperatorLifecycleManagerV1
// +kubebuilder:validation:Enum=openshift-samples;baremetal;marketplace;Console;Insights;Storage;CSISnapshot;NodeTuning;MachineAPI;Build;DeploymentConfig;ImageRegistry;OperatorLifecycleManager;CloudCredential;Ingress;CloudControllerManager;OperatorLifecycleManagerV1;OptionalMonitoring
type ClusterVersionCapability string

const (
Expand Down Expand Up @@ -399,6 +399,20 @@ const (
// Managers deployed on top of OpenShift. They help you to work with cloud
// provider API and embeds cloud-specific control logic.
ClusterVersionCapabilityCloudControllerManager ClusterVersionCapability = "CloudControllerManager"

// ClusterVersionCapabilityOptionalMonitoring manages the enablement of the optional components of the in-cluster monitoring stack.
// The optional components are:
// * Alertmanager
// * Alermanager User Workload Monitoring

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we say "All user-defined monitoring components"?

// * Prometheus User Workload Monitoring
// * PrometheusOperator User Workload Monitoring
// * ThanosRuler User Workload Monitoring
//
// NOTE: The only supported use-case for this capability is to reduce the monitoring stack's resource usage by only
// supporting telemetry (see https://rhobs-handbook.netlify.app/products/openshiftmonitoring/telemetry.md). Turning

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// this capability off will trigger CMO to not deploy the optional components, as well as any related manifests.
// However, all CRDs will persist as these are needed by the operator regardless of this capability's state.
ClusterVersionCapabilityOptionalMonitoring ClusterVersionCapability = "OptionalMonitoring"
)

// KnownClusterVersionCapabilities includes all known optional, core cluster components.
Expand All @@ -420,10 +434,11 @@ var KnownClusterVersionCapabilities = []ClusterVersionCapability{
ClusterVersionCapabilityCloudCredential,
ClusterVersionCapabilityIngress,
ClusterVersionCapabilityCloudControllerManager,
ClusterVersionCapabilityOptionalMonitoring,
}

// ClusterVersionCapabilitySet defines sets of cluster version capabilities.
// +kubebuilder:validation:Enum=None;v4.11;v4.12;v4.13;v4.14;v4.15;v4.16;v4.17;v4.18;vCurrent
// +kubebuilder:validation:Enum=None;v4.11;v4.12;v4.13;v4.14;v4.15;v4.16;v4.17;v4.18;v4.19;v4.20;vCurrent
type ClusterVersionCapabilitySet string

const (
Expand Down Expand Up @@ -479,6 +494,18 @@ const (
// version of OpenShift is installed.
ClusterVersionCapabilitySet4_18 ClusterVersionCapabilitySet = "v4.18"

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

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

// ClusterVersionCapabilitySetCurrent is the recommended set
// of optional capabilities to enable for the cluster's
// current version of OpenShift.
Expand Down Expand Up @@ -600,6 +627,44 @@ var ClusterVersionCapabilitySets = map[ClusterVersionCapabilitySet][]ClusterVers
ClusterVersionCapabilityIngress,
ClusterVersionCapabilityCloudControllerManager,
},
ClusterVersionCapabilitySet4_19: {
ClusterVersionCapabilityBaremetal,
ClusterVersionCapabilityConsole,
ClusterVersionCapabilityInsights,
ClusterVersionCapabilityMarketplace,
ClusterVersionCapabilityStorage,
ClusterVersionCapabilityOpenShiftSamples,
ClusterVersionCapabilityCSISnapshot,
ClusterVersionCapabilityNodeTuning,
ClusterVersionCapabilityMachineAPI,
ClusterVersionCapabilityBuild,
ClusterVersionCapabilityDeploymentConfig,
ClusterVersionCapabilityImageRegistry,
ClusterVersionCapabilityOperatorLifecycleManager,
ClusterVersionCapabilityOperatorLifecycleManagerV1,
ClusterVersionCapabilityCloudCredential,
ClusterVersionCapabilityIngress,
ClusterVersionCapabilityCloudControllerManager,
},
ClusterVersionCapabilitySet4_20: {
ClusterVersionCapabilityBaremetal,
ClusterVersionCapabilityConsole,
ClusterVersionCapabilityInsights,
ClusterVersionCapabilityMarketplace,
ClusterVersionCapabilityStorage,
ClusterVersionCapabilityOpenShiftSamples,
ClusterVersionCapabilityCSISnapshot,
ClusterVersionCapabilityNodeTuning,
ClusterVersionCapabilityMachineAPI,
ClusterVersionCapabilityBuild,
ClusterVersionCapabilityDeploymentConfig,
ClusterVersionCapabilityImageRegistry,
ClusterVersionCapabilityOperatorLifecycleManager,
ClusterVersionCapabilityOperatorLifecycleManagerV1,
ClusterVersionCapabilityCloudCredential,
ClusterVersionCapabilityIngress,
ClusterVersionCapabilityCloudControllerManager,
},
ClusterVersionCapabilitySetCurrent: {
ClusterVersionCapabilityBaremetal,
ClusterVersionCapabilityConsole,
Expand All @@ -618,6 +683,7 @@ var ClusterVersionCapabilitySets = map[ClusterVersionCapabilitySet][]ClusterVers
ClusterVersionCapabilityCloudCredential,
ClusterVersionCapabilityIngress,
ClusterVersionCapabilityCloudControllerManager,
ClusterVersionCapabilityOptionalMonitoring,
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand All @@ -115,6 +116,8 @@ spec:
- v4.16
- v4.17
- v4.18
- v4.19
- v4.20
- vCurrent
type: string
type: object
Expand Down Expand Up @@ -391,6 +394,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down Expand Up @@ -418,6 +422,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand All @@ -115,6 +116,8 @@ spec:
- v4.16
- v4.17
- v4.18
- v4.19
- v4.20
- vCurrent
type: string
type: object
Expand Down Expand Up @@ -329,6 +332,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down Expand Up @@ -356,6 +360,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand All @@ -115,6 +116,8 @@ spec:
- v4.16
- v4.17
- v4.18
- v4.19
- v4.20
- vCurrent
type: string
type: object
Expand Down Expand Up @@ -391,6 +394,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down Expand Up @@ -418,6 +422,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand All @@ -115,6 +116,8 @@ spec:
- v4.16
- v4.17
- v4.18
- v4.19
- v4.20
- vCurrent
type: string
type: object
Expand Down Expand Up @@ -391,6 +394,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down Expand Up @@ -418,6 +422,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand All @@ -117,6 +118,8 @@ spec:
- v4.16
- v4.17
- v4.18
- v4.19
- v4.20
- vCurrent
type: string
type: object
Expand Down Expand Up @@ -331,6 +334,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down Expand Up @@ -358,6 +362,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand All @@ -117,6 +118,8 @@ spec:
- v4.16
- v4.17
- v4.18
- v4.19
- v4.20
- vCurrent
type: string
type: object
Expand Down Expand Up @@ -342,6 +345,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down Expand Up @@ -369,6 +373,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand All @@ -117,6 +118,8 @@ spec:
- v4.16
- v4.17
- v4.18
- v4.19
- v4.20
- vCurrent
type: string
type: object
Expand Down Expand Up @@ -382,6 +385,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down Expand Up @@ -409,6 +413,7 @@ spec:
- Ingress
- CloudControllerManager
- OperatorLifecycleManagerV1
- OptionalMonitoring
type: string
type: array
x-kubernetes-list-type: atomic
Expand Down