Skip to content

Commit 23e3de4

Browse files
Merge pull request #2190 from RomanBednar/STOR-2141
STOR-2141: add MaxAllowedBlockVolumesPerNode field to VSphereCSIDriverConfigSpec
2 parents 8a7efbf + c86f460 commit 23e3de4

23 files changed

+3619
-0
lines changed

features.md

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
| 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> |
6161
| 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> |
6262
| 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> |
63+
| 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> |
6364
| 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> |
6465
| 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> |
6566
| 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> |

features/features.go

+8
Original file line numberDiff line numberDiff line change
@@ -817,4 +817,12 @@ var (
817817
enableIn(configv1.DevPreviewNoUpgrade).
818818
enhancementPR("https://github.com/openshift/enhancements/pull/1670").
819819
mustRegister()
820+
821+
FeatureGateVSphereConfigurableMaxAllowedBlockVolumesPerNode = newFeatureGate("VSphereConfigurableMaxAllowedBlockVolumesPerNode").
822+
reportProblemsToJiraComponent("Storage / Kubernetes External Components").
823+
contactPerson("rbednar").
824+
productScope(ocpSpecific).
825+
enhancementPR("https://github.com/openshift/enhancements/pull/1748").
826+
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
827+
mustRegister()
820828
)

openapi/generated_openapi/zz_generated.openapi.go

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/openapi.json

+5
Original file line numberDiff line numberDiff line change
@@ -32973,6 +32973,11 @@
3297332973
"type": "integer",
3297432974
"format": "int64"
3297532975
},
32976+
"maxAllowedBlockVolumesPerNode": {
32977+
"description": "maxAllowedBlockVolumesPerNode is an optional configuration parameter that allows setting a custom value for the limit of the number 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. 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.",
32978+
"type": "integer",
32979+
"format": "int32"
32980+
},
3297632981
"topologyCategories": {
3297732982
"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.",
3297832983
"type": "array",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
2+
name: "ClusterCSIDriver"
3+
crdName: clustercsidrivers.operator.openshift.io
4+
featureGates:
5+
- VSphereConfigurableMaxAllowedBlockVolumesPerNode
6+
tests:
7+
onCreate:
8+
- name: Should be able to create ClusterCSIDriver with volume limit option
9+
initial: |
10+
apiVersion: operator.openshift.io/v1
11+
kind: ClusterCSIDriver
12+
metadata:
13+
name: csi.sharedresource.openshift.io
14+
spec:
15+
driverConfig:
16+
driverType: vSphere
17+
vSphere:
18+
maxAllowedBlockVolumesPerNode: 59
19+
logLevel: Normal
20+
operatorLogLevel: Normal
21+
expected: |
22+
apiVersion: operator.openshift.io/v1
23+
kind: ClusterCSIDriver
24+
metadata:
25+
name: csi.sharedresource.openshift.io
26+
spec:
27+
driverConfig:
28+
driverType: vSphere
29+
vSphere:
30+
maxAllowedBlockVolumesPerNode: 59
31+
logLevel: Normal
32+
operatorLogLevel: Normal
33+
- name: Should be able to create a minimal ClusterCSIDriver
34+
initial: |
35+
apiVersion: operator.openshift.io/v1
36+
kind: ClusterCSIDriver
37+
metadata:
38+
name: csi.sharedresource.openshift.io
39+
spec: {} # No spec is required for a ClusterCSIDriver
40+
expected: |
41+
apiVersion: operator.openshift.io/v1
42+
kind: ClusterCSIDriver
43+
metadata:
44+
name: csi.sharedresource.openshift.io
45+
spec:
46+
logLevel: Normal
47+
operatorLogLevel: Normal
48+
- name: Should not be able to set limit above allowed range
49+
initial: |
50+
apiVersion: operator.openshift.io/v1
51+
kind: ClusterCSIDriver
52+
metadata:
53+
name: csi.sharedresource.openshift.io
54+
spec:
55+
driverConfig:
56+
driverType: vSphere
57+
vSphere:
58+
maxAllowedBlockVolumesPerNode: 256
59+
logLevel: Normal
60+
operatorLogLevel: Normal
61+
expectedError: "Invalid value: 256: spec.driverConfig.vSphere.maxAllowedBlockVolumesPerNode in body should be less than or equal to 255"
62+
- name: Should not be able to set zero limit
63+
initial: |
64+
apiVersion: operator.openshift.io/v1
65+
kind: ClusterCSIDriver
66+
metadata:
67+
name: csi.sharedresource.openshift.io
68+
spec:
69+
driverConfig:
70+
driverType: vSphere
71+
vSphere:
72+
maxAllowedBlockVolumesPerNode: 0
73+
logLevel: Normal
74+
operatorLogLevel: Normal
75+
expectedError: "Invalid value: 0: spec.driverConfig.vSphere.maxAllowedBlockVolumesPerNode in body should be greater than or equal to 1"
76+
- name: Should not be able to set negative limit
77+
initial: |
78+
apiVersion: operator.openshift.io/v1
79+
kind: ClusterCSIDriver
80+
metadata:
81+
name: csi.sharedresource.openshift.io
82+
spec:
83+
driverConfig:
84+
driverType: vSphere
85+
vSphere:
86+
maxAllowedBlockVolumesPerNode: -1
87+
logLevel: Normal
88+
operatorLogLevel: Normal
89+
expectedError: "Invalid value: -1: spec.driverConfig.vSphere.maxAllowedBlockVolumesPerNode in body should be greater than or equal to 1"
90+
onUpdate:
91+
- name: Should be able to update the limit field
92+
initial: |
93+
apiVersion: operator.openshift.io/v1
94+
kind: ClusterCSIDriver
95+
metadata:
96+
name: csi.sharedresource.openshift.io
97+
spec:
98+
driverConfig:
99+
driverType: vSphere
100+
vSphere:
101+
maxAllowedBlockVolumesPerNode: 59
102+
logLevel: Normal
103+
operatorLogLevel: Normal
104+
updated: |
105+
apiVersion: operator.openshift.io/v1
106+
kind: ClusterCSIDriver
107+
metadata:
108+
name: csi.sharedresource.openshift.io
109+
spec:
110+
driverConfig:
111+
driverType: vSphere
112+
vSphere:
113+
maxAllowedBlockVolumesPerNode: 255
114+
logLevel: Normal
115+
operatorLogLevel: Normal
116+
expected: |
117+
apiVersion: operator.openshift.io/v1
118+
kind: ClusterCSIDriver
119+
metadata:
120+
name: csi.sharedresource.openshift.io
121+
spec:
122+
driverConfig:
123+
driverType: vSphere
124+
vSphere:
125+
maxAllowedBlockVolumesPerNode: 255
126+
logLevel: Normal
127+
operatorLogLevel: Normal

operator/v1/types_csi_cluster_driver.go

+15
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,21 @@ type VSphereCSIDriverConfigSpec struct {
369369
// +openshift:enable:FeatureGate=VSphereDriverConfiguration
370370
// +optional
371371
GranularMaxSnapshotsPerBlockVolumeInVVOL *uint32 `json:"granularMaxSnapshotsPerBlockVolumeInVVOL,omitempty"`
372+
373+
// maxAllowedBlockVolumesPerNode is an optional configuration parameter that allows setting a custom value for the
374+
// limit of the number of PersistentVolumes attached to a node. In vSphere version 7 this limit was set to 59 by
375+
// default, however in vSphere version 8 this limit was increased to 255.
376+
// Before increasing this value above 59 the cluster administrator needs to ensure that every node forming the
377+
// cluster is updated to ESXi version 8 or higher and that all nodes are running the same version.
378+
// The limit must be between 1 and 255, which matches the vSphere version 8 maximum.
379+
// When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to
380+
// change over time.
381+
// The current default is 59, which matches the limit for vSphere version 7.
382+
// +kubebuilder:validation:Minimum=1
383+
// +kubebuilder:validation:Maximum=255
384+
// +openshift:enable:FeatureGate=VSphereConfigurableMaxAllowedBlockVolumesPerNode
385+
// +optional
386+
MaxAllowedBlockVolumesPerNode int32 `json:"maxAllowedBlockVolumesPerNode,omitempty"`
372387
}
373388

374389
// ClusterCSIDriverStatus is the observed status of CSI driver operator

0 commit comments

Comments
 (0)