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

STOR-2141: add MaxAllowedBlockVolumesPerNode field to VSphereCSIDriverConfigSpec #2190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions features.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
| UpgradeStatus| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| UserNamespacesPodSecurityStandards| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| UserNamespacesSupport| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| VSphereConfigurableMaxAllowedBlockVolumesPerNode| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| VSphereHostVMGroupZonal| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| VSphereMultiDisk| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| VSphereMultiNetworks| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
Expand Down
8 changes: 8 additions & 0 deletions features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,4 +734,12 @@ var (
enhancementPR("https://github.com/openshift/enhancements/pull/1492").
enableIn(configv1.DevPreviewNoUpgrade).
mustRegister()

FeatureGateVSphereConfigurableMaxAllowedBlockVolumesPerNode = newFeatureGate("VSphereConfigurableMaxAllowedBlockVolumesPerNode").
reportProblemsToJiraComponent("Storage / Kubernetes External Components").
contactPerson("rbednar").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1748").
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()
)
7 changes: 7 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

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

5 changes: 5 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -32740,6 +32740,11 @@
"type": "integer",
"format": "int64"
},
"maxAllowedBlockVolumesPerNode": {
"description": "maxAllowedBlockVolumesPerNode is an optional configuration parameter that allows setting custom value for limit of PersistentVolumes attached to a node. In vSphere version 7 this limit was set to 59 by default, however in vSphere version 8 this limit was increased to 255. For more details see: https://configmax.broadcom.com/guest?vmwareproduct=vSphere&release=vSphere%208.0&categories=3-0 Before increasing this value above 59 the cluster administrator needs to ensure that every node forming the cluster is updated to ESXi version 8 or higher and that all nodes are running the same version. The limit must be between 1 and 255, which matches the vSphere version 8 maximum. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is 59, which matches the limit for vSphere version 7.",
"type": "integer",
"format": "int32"
},
"topologyCategories": {
"description": "topologyCategories indicates tag categories with which vcenter resources such as hostcluster or datacenter were tagged with. If cluster Infrastructure object has a topology, values specified in Infrastructure object will be used and modifications to topologyCategories will be rejected.",
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "ClusterCSIDriver"
crdName: clustercsidrivers.operator.openshift.io
featureGates:
- VSphereConfigurableMaxAllowedBlockVolumesPerNode
tests:
onCreate:
- name: Should be able to create ClusterCSIDriver with volume limit option
initial: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec:
driverConfig:
driverType: vSphere
vSphere:
maxAllowedBlockVolumesPerNode: 59
logLevel: Normal
operatorLogLevel: Normal
expected: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec:
driverConfig:
driverType: vSphere
vSphere:
maxAllowedBlockVolumesPerNode: 59
logLevel: Normal
operatorLogLevel: Normal
- name: Should be able to create a minimal ClusterCSIDriver
initial: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec: {} # No spec is required for a ClusterCSIDriver
expected: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec:
logLevel: Normal
operatorLogLevel: Normal
- name: Should not be able to set limit above allowed range
initial: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec:
driverConfig:
driverType: vSphere
vSphere:
maxAllowedBlockVolumesPerNode: 256
logLevel: Normal
operatorLogLevel: Normal
expectedError: "Invalid value: 256: spec.driverConfig.vSphere.maxAllowedBlockVolumesPerNode in body should be less than or equal to 255"
onUpdate:
- name: Should be able to update the limit field
initial: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec:
driverConfig:
driverType: vSphere
vSphere:
maxAllowedBlockVolumesPerNode: 59
logLevel: Normal
operatorLogLevel: Normal
updated: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec:
driverConfig:
driverType: vSphere
vSphere:
maxAllowedBlockVolumesPerNode: 255
logLevel: Normal
operatorLogLevel: Normal
expected: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec:
driverConfig:
driverType: vSphere
vSphere:
maxAllowedBlockVolumesPerNode: 255
logLevel: Normal
operatorLogLevel: Normal
16 changes: 16 additions & 0 deletions operator/v1/types_csi_cluster_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,22 @@ type VSphereCSIDriverConfigSpec struct {
// +openshift:enable:FeatureGate=VSphereDriverConfiguration
// +optional
GranularMaxSnapshotsPerBlockVolumeInVVOL *uint32 `json:"granularMaxSnapshotsPerBlockVolumeInVVOL,omitempty"`

// maxAllowedBlockVolumesPerNode is an optional configuration parameter that allows setting custom value for limit of
// PersistentVolumes attached to a node. In vSphere version 7 this limit was set to 59 by default, however in
// vSphere version 8 this limit was increased to 255. For more details see:
// https://configmax.broadcom.com/guest?vmwareproduct=vSphere&release=vSphere%208.0&categories=3-0
// Before increasing this value above 59 the cluster administrator needs to ensure that every node forming the
// cluster is updated to ESXi version 8 or higher and that all nodes are running the same version.
// The limit must be between 1 and 255, which matches the vSphere version 8 maximum.
// When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to
// change over time.
// The current default is 59, which matches the limit for vSphere version 7.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=255
RomanBednar marked this conversation as resolved.
Show resolved Hide resolved
// +openshift:enable:FeatureGate=VSphereConfigurableMaxAllowedBlockVolumesPerNode
// +optional
MaxAllowedBlockVolumesPerNode *int32 `json:"maxAllowedBlockVolumesPerNode,omitempty"`
}

// ClusterCSIDriverStatus is the observed status of CSI driver operator
Expand Down
Loading