-
Notifications
You must be signed in to change notification settings - Fork 148
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
[Release 1.3] Change the FeatureGates implemantation (#1060) #1062
Conversation
* 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 <nunnatsa@redhat.com> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com> * Fix code-review comments Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com> * modify HotplugVolumes casing to hotplugVolumes Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com> (cherry picked from commit ead55cf) Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
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 <nunnatsa@redhat.com> **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 <nunnatsa@redhat.com>
hco-e2e-upgrade-azure lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-aws 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. |
/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. |
@nunnatsa: The following tests 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. |
/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 |
/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. |
As the code of the webhook and the operator were changed for 1.3.0 in kubevirt#1062, a new images are required. This PR changes the image digests for these two images to match the latest version for 1.3.0 In addition, this PR also fir the sanity test to run in the `release-1.3` branch. Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
As the code of the webhook and the operator were changed for 1.3.0 in #1062, a new images are required. This PR changes the image digests for these two images to match the latest version for 1.3.0 In addition, this PR also fir the sanity test to run in the `release-1.3` branch. Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
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 nunnatsa@redhat.com
Release note: