Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/hypershift/v1beta1/hosted_controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ type HostedControlPlaneSpec struct {

// capabilities allows for disabling optional components at cluster install time.
// This field is optional and once set cannot be changed.
// +immutable
// +optional
// +openshift:enable:FeatureGate=DisableClusterCapabilities
// +kubebuilder:default={}
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="Capabilities is immutable. Changes might result in unpredictable and disruptive behavior."
Capabilities *Capabilities `json:"capabilities,omitempty"`
}
Expand Down
11 changes: 7 additions & 4 deletions api/hypershift/v1beta1/hostedcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ const ImageRegistryCapability OptionalCapability = OptionalCapability(configv1.C
// capabilities allows disabling optional components at install time.
// Once set, it cannot be changed.
type Capabilities struct {
// disabledCapabilities when specified, sets the cluster version baselineCapabilitySet to None
// and sets all additionalEnabledCapabilities BUT the ones supplied in disabledCapabilities.
// disabled when specified, sets the cluster version baselineCapabilitySet to None
// and sets all additionalEnabledCapabilities BUT the ones supplied in disabled.
// This effectively disables that capability on the hosted cluster.
//
// When this is not supplied, the cluster will use the DefaultCapabilitySet defined for the respective
Expand All @@ -389,8 +389,10 @@ type Capabilities struct {
// Once set, this field cannot be changed.
//
// +listType=atomic
// +immutable
// +optional
DisabledCapabilities []OptionalCapability `json:"disabledCapabilities,omitempty"`
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="Disabled is immutable. Changes might result in unpredictable and disruptive behavior."
Disabled []OptionalCapability `json:"disabled,omitempty"`
}

// HostedClusterSpec is the desired behavior of a HostedCluster.
Expand Down Expand Up @@ -681,8 +683,9 @@ type HostedClusterSpec struct {

// capabilities allows for disabling optional components at cluster install time.
// This field is optional and once set cannot be changed.
// +immutable
// +optional
// +openshift:enable:FeatureGate=DisableClusterCapabilities
// +kubebuilder:default={}
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="Capabilities is immutable. Changes might result in unpredictable and disruptive behavior."
Capabilities *Capabilities `json:"capabilities,omitempty"`
}
Expand Down
4 changes: 2 additions & 2 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.

Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ hostedclusters.hypershift.openshift.io:
FeatureGates:
- AutoNodeKarpenter
- ClusterVersionOperatorConfiguration
- DisableClusterCapabilities
- DynamicResourceAllocation
- ExternalOIDC
- ImageStreamImportMode
Expand Down Expand Up @@ -152,7 +151,6 @@ hostedcontrolplanes.hypershift.openshift.io:
FeatureGates:
- AutoNodeKarpenter
- ClusterVersionOperatorConfiguration
- DisableClusterCapabilities
- DynamicResourceAllocation
- ExternalOIDC
- ImageStreamImportMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,37 @@ spec:
format: int32
type: integer
type: object
capabilities:
default: {}
description: |-
capabilities allows for disabling optional components at cluster install time.
This field is optional and once set cannot be changed.
properties:
disabled:
description: |-
disabled when specified, sets the cluster version baselineCapabilitySet to None
and sets all additionalEnabledCapabilities BUT the ones supplied in disabled.
This effectively disables that capability on the hosted cluster.

When this is not supplied, the cluster will use the DefaultCapabilitySet defined for the respective
OpenShift version.

Once set, this field cannot be changed.
items:
enum:
- ImageRegistry
type: string
type: array
x-kubernetes-list-type: atomic
x-kubernetes-validations:
- message: Disabled is immutable. Changes might result in unpredictable
and disruptive behavior.
rule: self == oldSelf
type: object
x-kubernetes-validations:
- message: Capabilities is immutable. Changes might result in unpredictable
and disruptive behavior.
rule: self == oldSelf
channel:
description: |-
channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,37 @@ spec:
format: int32
type: integer
type: object
capabilities:
default: {}
description: |-
capabilities allows for disabling optional components at cluster install time.
This field is optional and once set cannot be changed.
properties:
disabled:
description: |-
disabled when specified, sets the cluster version baselineCapabilitySet to None
and sets all additionalEnabledCapabilities BUT the ones supplied in disabled.
This effectively disables that capability on the hosted cluster.

When this is not supplied, the cluster will use the DefaultCapabilitySet defined for the respective
OpenShift version.

Once set, this field cannot be changed.
items:
enum:
- ImageRegistry
type: string
type: array
x-kubernetes-list-type: atomic
x-kubernetes-validations:
- message: Disabled is immutable. Changes might result in unpredictable
and disruptive behavior.
rule: self == oldSelf
type: object
x-kubernetes-validations:
- message: Capabilities is immutable. Changes might result in unpredictable
and disruptive behavior.
rule: self == oldSelf
channel:
description: |-
channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,37 @@ spec:
format: int32
type: integer
type: object
capabilities:
default: {}
description: |-
capabilities allows for disabling optional components at cluster install time.
This field is optional and once set cannot be changed.
properties:
disabled:
description: |-
disabled when specified, sets the cluster version baselineCapabilitySet to None
and sets all additionalEnabledCapabilities BUT the ones supplied in disabled.
This effectively disables that capability on the hosted cluster.

When this is not supplied, the cluster will use the DefaultCapabilitySet defined for the respective
OpenShift version.

Once set, this field cannot be changed.
items:
enum:
- ImageRegistry
type: string
type: array
x-kubernetes-list-type: atomic
x-kubernetes-validations:
- message: Disabled is immutable. Changes might result in unpredictable
and disruptive behavior.
rule: self == oldSelf
type: object
x-kubernetes-validations:
- message: Capabilities is immutable. Changes might result in unpredictable
and disruptive behavior.
rule: self == oldSelf
channel:
description: |-
channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster.
Expand Down
Loading