-
Notifications
You must be signed in to change notification settings - Fork 153
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
Change the FeatureGates implemantation #1060
Conversation
Change the FeatureGates implemantation to be strict and to add documentation to the CR for each feature gate Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
deploy/olm-catalog/kubevirt-hyperconverged/1.4.0/hco00.crd.yaml
Outdated
Show resolved
Hide resolved
deploy/olm-catalog/kubevirt-hyperconverged/1.4.0/hco00.crd.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
And another general comment - what is the significance (in terms of API design) of grouping various knobs under a |
Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp In 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. |
@zcahana Yes. Once a preview/optional feature will grown up into a fully fledged one, we will remove it from the feature gate section and perhaps it will have it's own place in the HCO CR. |
Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
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.
/lgtm
@nunnatsa I am feeling uncomforatble with using fmt.Print
in the code, but if there is a promise to refactor the code to add a logger then let's go forward with this code change.
@nunnatsa: The following test failed, say
Full PR test history. Your PR dashboard. 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. |
hco-e2e-upgrade-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-azure, ci/prow/hco-e2e-upgrade-azure, ci/prow/hco-e2e-upgrade-prev-azure In 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. |
Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
Done. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tiraboschi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
/lgtm
/override-bot |
hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp In 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. |
/cherry-pick release-1.3 |
@nunnatsa: #1060 failed to apply on top of branch "release-1.3":
In 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. |
* Change the FeatureGates implemantation Change the FeatureGates implemantation to be strict and to add documentation to the CR for each feature gate Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * modify HotplugVolumes casing to hotplugVolumes Signed-off-by: Nahshon Unna-Tsameret <[email protected]> (cherry picked from commit ead55cf) Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
Change the FeatureGates implemantation to be strict and to add documentation to the CR for each feature gate. The previose implementation used a `map[string]bool` to store the feature gates. That way, it was impossible to add documentation for each feature gate. This PR changes the implementation so the feature gates are now stored in a struct, as a pointer to boolean (to keep them optional). The result is a documentable feature gates as well as strict naming of the feature gates, because their names are not just astring but a field name. Since `HotplugVolumes` is not a valid json or yaml tag name (starts with upper case), the gate name was changed to `hotplugVolumes` (starts with lower case) As part of this change, the HyperConverged CRD contains the documentation for the `hotplugVolumes` feature gate, that can be read directly from the CRD, or by calling `kubectl explain`: ``` $ kubectl explain HyperConverged.spec.featureGates KIND: HyperConverged VERSION: hco.kubevirt.io/v1beta1 RESOURCE: featureGates <Object> DESCRIPTION: featureGates HyperConvergedFeatureGates contains a list of feature enabler flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. FIELDS: hotplugVolumes <boolean> Allow attaching a data volume to a running VMI; type is boolean; default is false ``` In addition, this PR adds feature gates documentation to the `docs/cluster-configuration.md` file with the following usage example: ```yaml apiVersion: hco.kubevirt.io/v1beta1 kind: HyperConverged metadata: name: kubevirt-hyperconverged spec: infra: {} workloads: {} featureGates: hotplugVolumes: true ``` Signed-off-by: Nahshon Unna-Tsameret <[email protected]> **Release note**: ```release-note Added CRD documentation to the hotplugVolumes feature gate Added Feature gates documentation to the cluster-configuration.md document Change HotplugVolumes to hotplugVolumes ``` Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
* Change the FeatureGates implemantation (#1060) * Change the FeatureGates implemantation Change the FeatureGates implemantation to be strict and to add documentation to the CR for each feature gate Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * modify HotplugVolumes casing to hotplugVolumes Signed-off-by: Nahshon Unna-Tsameret <[email protected]> (cherry picked from commit ead55cf) Signed-off-by: Nahshon Unna-Tsameret <[email protected]> * Change the FeatureGates implemantation (#1060) Change the FeatureGates implemantation to be strict and to add documentation to the CR for each feature gate. The previose implementation used a `map[string]bool` to store the feature gates. That way, it was impossible to add documentation for each feature gate. This PR changes the implementation so the feature gates are now stored in a struct, as a pointer to boolean (to keep them optional). The result is a documentable feature gates as well as strict naming of the feature gates, because their names are not just astring but a field name. Since `HotplugVolumes` is not a valid json or yaml tag name (starts with upper case), the gate name was changed to `hotplugVolumes` (starts with lower case) As part of this change, the HyperConverged CRD contains the documentation for the `hotplugVolumes` feature gate, that can be read directly from the CRD, or by calling `kubectl explain`: ``` $ kubectl explain HyperConverged.spec.featureGates KIND: HyperConverged VERSION: hco.kubevirt.io/v1beta1 RESOURCE: featureGates <Object> DESCRIPTION: featureGates HyperConvergedFeatureGates contains a list of feature enabler flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. FIELDS: hotplugVolumes <boolean> Allow attaching a data volume to a running VMI; type is boolean; default is false ``` In addition, this PR adds feature gates documentation to the `docs/cluster-configuration.md` file with the following usage example: ```yaml apiVersion: hco.kubevirt.io/v1beta1 kind: HyperConverged metadata: name: kubevirt-hyperconverged spec: infra: {} workloads: {} featureGates: hotplugVolumes: true ``` Signed-off-by: Nahshon Unna-Tsameret <[email protected]> **Release note**: ```release-note Added CRD documentation to the hotplugVolumes feature gate Added Feature gates documentation to the cluster-configuration.md document Change HotplugVolumes to hotplugVolumes ``` Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
Change the FeatureGates implemantation to be strict and to add documentation to the CR for each feature gate.
The previose implementation used a
map[string]bool
to store the feature gates. That way, it was impossible to add documentation for each feature gate.This PR changes the implementation so the feature gates are now stored in a struct, as a pointer to boolean (to keep them optional). The result is a documentable feature gates as well as strict naming of the feature gates, because their names are not just astring but a field name.
Since
HotplugVolumes
is not a valid json or yaml tag name (starts with upper case), the gate name was changed tohotplugVolumes
(starts with lower case)As part of this change, the HyperConverged CRD contains the documentation for the
hotplugVolumes
feature gate, that can be read directly from the CRD, or by callingkubectl explain
:In addition, this PR adds feature gates documentation to the
docs/cluster-configuration.md
file with the following usage example:Signed-off-by: Nahshon Unna-Tsameret [email protected]
Release note: