Skip to content

STOR-1759: add enhancement for vSphere driver configuration#1563

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
RomanBednar:vsphere-config
Mar 7, 2024
Merged

STOR-1759: add enhancement for vSphere driver configuration#1563
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
RomanBednar:vsphere-config

Conversation

@RomanBednar
Copy link
Contributor

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 9, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 9, 2024

@RomanBednar: This pull request references STOR-1759 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

Details

In response to this:

Initial design discussion: https://docs.google.com/document/d/1U1032SG_pTK5FyF8vOB-vGtZGCZ0Mq9FnQdRkd2k998/edit#heading=h.9rnb7c5q1zhy

cc @openshift/storage

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Comment on lines 118 to 143
For this solution we would have a new field in the ClusterCSIDriver CRD where each field would represent a single
configuration option. This would be similar to Option 1 but would allow us to add more configuration options at once.
We would basically mirror the configuration options from the driver into the CRD.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clearly state that this is option 1, but with all options configurable in CSI drivers proactively exposed into ClusterCSIDriver.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a highlighted note.

- Testing would get too complex


### Workflow Description
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these options are the same, except for the first 2-3 steps. IMO it does not add anything new to what was already written above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I'll remove this section since we'll have the examples above in Proposal.

For this solution we would have a new field in the ClusterCSIDriver CRD where each field would represent a single
configuration option. This would be similar to Option 1 but would allow us to add more configuration options at once.
We would basically mirror the configuration options from the driver into the CRD.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be useful to add an example with snapshot count.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

configured in 3 different ways: `GlobalMaxSnapshotsPerBlockVolume`, `GranularMaxSnapshotsPerBlockVolumeInVSAN`,
`GranularMaxSnapshotsPerBlockVolumeInVVOL`. In this case we would pick only the first one which is a global setting and
overrides the other two.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be useful to add an example with snapshot count.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

as a map (`map[string]string`), something like clustercsidriver.spec.vSphere.configuration. Then we would merge it into
any other valid destination for the driver - command line arguments, environment variables, ini file, driver
feature gate ConfigMap, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be useful to add an example with snapshot count.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Comment on lines 185 to 187
On the other hand if we take the safe route and implement each option separately as new fields in the CRD, we're risking
a scenario where an option or feature could be suddenly dropped upstream, and we can not simply remove fields from release
to release.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have this problem in each of the options described above, as it is somewhat orthogonal to how we expose configuration options. Any CSI driver could remove any feature / config option at any time

It would be nice to also mention that CSI drivers have much less rigorous feature development and removal process than k/k.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I rewrote this section to emphasize this.

Example:

1. Cluster administrator creates a ClusterCSIDriver object with the configuration map set to `{"maxSnapshots": "10"}`
under a generic `map[string]string` field (`clustercsidriver.spec.vSphere.configuration`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is what I am thinking:

We break down the singular configuration field into two:

clusterCSIDriver.Spec.vSphere.configParameters and clusterCSIDriver.Spec.vSphere.featureFlags . These are still a map[string]string - but internally in vSphere operator we keep track of configParameters/featureFlags we support (like a whitelist) and only whitelisted fields can be applied and have an effect. We can ignore unknown config/featureFlags and log a message or something.

This is still very similar to option#1 but only benefit it provides is, say after a rebase we want to support a new config option, then we don't necessarily have to bump openshift/api. We just update the whitelist inside vmware-vsphere-csi-driver.

We are not in a position to support any random config parameter, because we don't even know how that will be applied, so we can only support a sanctioned list of configs and that is where whitelist might be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a separate field for featureFlags sounds good, I'm adding it.

Whitelist is a type of validation, at first I was not too specific about this - adding it.

The benefit of this approach (not having to bump openshift/api) is already mentioned under Pros:.

@dhellmann
Copy link
Contributor

#1555 is changing the enhancement template in a way that will cause the header check in the linter job to fail for existing PRs. If this PR is merged within the development period for 4.16 you may override the linter if the only failures are caused by issues with the headers (please make sure the markdown formatting is correct). If this PR is not merged before 4.16 development closes, please update the enhancement to conform to the new template.

@RomanBednar RomanBednar force-pushed the vsphere-config branch 2 times, most recently from c4ae7e1 to 79fb217 Compare February 21, 2024 11:20
@RomanBednar
Copy link
Contributor Author

RomanBednar commented Feb 22, 2024

All linter errors are caused by the recent template change and should be merged in 4.16 development period:

enhancements/storage/vsphere-driver-configuration.md missing "### Topology Considerations"
enhancements/storage/vsphere-driver-configuration.md missing "#### Hypershift / Hosted Control Planes"
enhancements/storage/vsphere-driver-configuration.md missing "#### Standalone Clusters"
enhancements/storage/vsphere-driver-configuration.md missing "#### Single-node Deployments or MicroShift"
enhancements/storage/vsphere-driver-configuration.md missing "## Test Plan"
enhancements/storage/vsphere-driver-configuration.md missing "## Graduation Criteria"
enhancements/storage/vsphere-driver-configuration.md missing "### Dev Preview -> Tech Preview"
enhancements/storage/vsphere-driver-configuration.md missing "### Tech Preview -> GA"
enhancements/storage/vsphere-driver-configuration.md missing "### Removing a deprecated feature"
enhancements/storage/vsphere-driver-configuration.md missing "## Upgrade / Downgrade Strategy"
enhancements/storage/vsphere-driver-configuration.md missing "## Version Skew Strategy"
enhancements/storage/vsphere-driver-configuration.md missing "## Operational Aspects of API Extensions"
enhancements/storage/vsphere-driver-configuration.md missing "## Support Procedures" 

/override ci/prow/markdownlint

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 22, 2024

@RomanBednar: RomanBednar unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file, and the following github teams:openshift: openshift-release-oversight openshift-staff-engineers.

Details

In response to this:

All linter errors are caused by the recent template change and should be merged in 4.16 development period - overriding:

enhancements/storage/vsphere-driver-configuration.md missing "### Topology Considerations"
enhancements/storage/vsphere-driver-configuration.md missing "#### Hypershift / Hosted Control Planes"
enhancements/storage/vsphere-driver-configuration.md missing "#### Standalone Clusters"
enhancements/storage/vsphere-driver-configuration.md missing "#### Single-node Deployments or MicroShift"
enhancements/storage/vsphere-driver-configuration.md missing "## Test Plan"
enhancements/storage/vsphere-driver-configuration.md missing "## Graduation Criteria"
enhancements/storage/vsphere-driver-configuration.md missing "### Dev Preview -> Tech Preview"
enhancements/storage/vsphere-driver-configuration.md missing "### Tech Preview -> GA"
enhancements/storage/vsphere-driver-configuration.md missing "### Removing a deprecated feature"
enhancements/storage/vsphere-driver-configuration.md missing "## Upgrade / Downgrade Strategy"
enhancements/storage/vsphere-driver-configuration.md missing "## Version Skew Strategy"
enhancements/storage/vsphere-driver-configuration.md missing "## Operational Aspects of API Extensions"
enhancements/storage/vsphere-driver-configuration.md missing "## Support Procedures" 

/override ci/prow/markdownlint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 22, 2024

@RomanBednar: RomanBednar unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file, and the following github teams:openshift: openshift-release-oversight openshift-staff-engineers.

Details

In response to this:

/override markdownlint

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@RomanBednar
Copy link
Contributor Author

@jsafrane You should be able to override the linter test.

@RomanBednar
Copy link
Contributor Author

Updating enhancement to reflect latest discussion, other proposed options moved to alternatives section.

Comment on lines 85 to 86
2. Additionally, they can configure any other option supported by the driver in ClusterCSIDriver - each as a separate
field that matches driver config ini file values. Administrator does not have to deal with configuring the driver directly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we wanted to allow just nr. of snapshots and nothing else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be written better to make it clear we intend to allow only 3 options in total for now. I've changed this to make it more clear.

@jsafrane
Copy link
Contributor

jsafrane commented Mar 7, 2024

/lgtm
/approve

/override ci/prow/markdownlint

If this PR is merged within the development period for 4.16 you may override the linter if the only failures are caused by issues with the headers

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2024
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 7, 2024
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 7, 2024

@jsafrane: Overrode contexts on behalf of jsafrane: ci/prow/markdownlint

Details

In response to this:

/lgtm
/approve

/override ci/prow/markdownlint

If this PR is merged within the development period for 4.16 you may override the linter if the only failures are caused by issues with the headers

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 7, 2024

@RomanBednar: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit a0f1167 into openshift:master Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants