-
Notifications
You must be signed in to change notification settings - Fork 529
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
@@ -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 |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -369,6 +369,21 @@ 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 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
// PersistentVolumes attached to a node. In vSphere version 7 this limit was set to 59 by default, however in | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
// 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. | ||||||||
// +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"` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have omitempty on this optional integer, and |
||||||||
} | ||||||||
|
||||||||
// ClusterCSIDriverStatus is the observed status of CSI driver operator | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a test for a negative value? Or
0
?