Skip to content

Commit

Permalink
add MaxAllowedBlockVolumesPerNode field to VSphereCSIDriverConfigSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBednar committed Feb 7, 2025
1 parent 9e59a77 commit 78a4793
Show file tree
Hide file tree
Showing 24 changed files with 3,616 additions and 0 deletions.
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. Minimum allowed value: 1 Maximum allowed value: 255 (matches the vSphere version 8 limit) Default: 59 (matches the vSphere version 7 limit)",
"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,123 @@
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"
- name: Should apply default value when limit is unset
initial: |
apiVersion: operator.openshift.io/v1
kind: ClusterCSIDriver
metadata:
name: csi.sharedresource.openshift.io
spec:
driverConfig:
driverType: vSphere
vSphere: {}
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: "ClusterCSIDriver"
crdName: clustercsidrivers.operator.openshift.io
featureGates:
- VSphereDriverConfiguration
- VSphereConfigurableMaxAllowedBlockVolumesPerNode
tests:
onCreate:
- name: Should be able to create ClusterCSIDriver with snapshot options
Expand Down Expand Up @@ -32,6 +33,7 @@ tests:
globalMaxSnapshotsPerBlockVolume: 1
granularMaxSnapshotsPerBlockVolumeInVSAN: 2
granularMaxSnapshotsPerBlockVolumeInVVOL: 3
maxAllowedBlockVolumesPerNode: 59
logLevel: Normal
operatorLogLevel: Normal
- name: Should be able to create a minimal ClusterCSIDriver
Expand Down
14 changes: 14 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,20 @@ 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.
// Default: 59 (matches the vSphere version 7 limit)
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=255
// +kubebuilder:default=59
// +openshift:enable:FeatureGate=VSphereConfigurableMaxAllowedBlockVolumesPerNode
// +optional
MaxAllowedBlockVolumesPerNode int32 `json:"maxAllowedBlockVolumesPerNode,omitempty"`
}

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

0 comments on commit 78a4793

Please sign in to comment.