STOR-1759: add enhancement for vSphere driver configuration#1563
Conversation
|
@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. DetailsIn response to this:
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. |
| 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. |
There was a problem hiding this comment.
Please clearly state that this is option 1, but with all options configurable in CSI drivers proactively exposed into ClusterCSIDriver.
There was a problem hiding this comment.
Added a highlighted note.
| - Testing would get too complex | ||
|
|
||
|
|
||
| ### Workflow Description |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. | ||
|
|
There was a problem hiding this comment.
I think it would be useful to add an example with snapshot count.
| 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. | ||
|
|
There was a problem hiding this comment.
I think it would be useful to add an example with snapshot count.
| 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. | ||
|
|
There was a problem hiding this comment.
I think it would be useful to add an example with snapshot count.
| 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Good point, I rewrote this section to emphasize this.
33f0fa3 to
a73249b
Compare
| 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`) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:.
|
#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. |
c4ae7e1 to
79fb217
Compare
|
All linter errors are caused by the recent template change and should be merged in 4.16 development period: /override ci/prow/markdownlint |
|
@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. DetailsIn response to this:
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: 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. DetailsIn response to this:
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. |
|
@jsafrane You should be able to override the linter test. |
79fb217 to
61e01db
Compare
|
Updating enhancement to reflect latest discussion, other proposed options moved to alternatives section. |
| 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. |
There was a problem hiding this comment.
I thought we wanted to allow just nr. of snapshots and nothing else.
There was a problem hiding this comment.
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.
61e01db to
dae9a4c
Compare
|
/lgtm /override ci/prow/markdownlint
|
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@jsafrane: Overrode contexts on behalf of jsafrane: ci/prow/markdownlint DetailsIn response to this:
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: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Initial design discussion: https://docs.google.com/document/d/1U1032SG_pTK5FyF8vOB-vGtZGCZ0Mq9FnQdRkd2k998/edit#heading=h.9rnb7c5q1zhy
cc @openshift/storage