Skip to content
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

Reconcile MTQ CR according to an HCO FeatureGate #2473

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

orenc1
Copy link
Collaborator

@orenc1 orenc1 commented Aug 10, 2023

If hco's .spec.featureGates.enableManagedTenantQuota=true, the MTQ CustomResource will be deployed in the installation namespace. When the feature gate is changed to false, the CR is deleted.
The feature is in Dev Preview (DP) and it is in opt-in mode (disabled by default).

What this PR does / why we need it:

Reviewer Checklist

Reviewers are supposed to review the PR for every aspect below one by one. To check an item means the PR is either "OK" or "Not Applicable" in terms of that item. All items are supposed to be checked before merging a PR.

  • PR Message
  • Commit Messages
  • How to test
  • Unit Tests
  • Functional Tests
  • User Documentation
  • Developer Documentation
  • Upgrade Scenario
  • Uninstallation Scenario
  • Backward Compatibility
  • Troubleshooting Friendly

Jira Ticket:

https://issues.redhat.com/browse/CNV-31716

Release note:

Reconcile MTQ CR and put it behind a feature gate in HCO. Default is off (opt-in feature).

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Aug 10, 2023
@orenc1 orenc1 changed the title Reconcile MTQ CR according to an HCO FeatureGate [WIP] Reconcile MTQ CR according to an HCO FeatureGate Aug 10, 2023
@kubevirt-bot kubevirt-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 10, 2023
Copy link
Member

@Barakmor1 Barakmor1 left a comment

Choose a reason for hiding this comment

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

this is the reason for tha failures i guess

"github.com/kubevirt/hyperconverged-cluster-operator/controllers/common"
"github.com/kubevirt/hyperconverged-cluster-operator/pkg/util"
hcoutil "github.com/kubevirt/hyperconverged-cluster-operator/pkg/util"
mtqv1alpha1 "kubevirt.io/managed-tenant-quota-api/pkg/apis/core/v1alpha1"
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for this PR please change to :

mtqv1alpha1 "kubevirt.io/managed-tenant-quota/staging/src/kubevirt.io/managed-tenant-quota-api/pkg/apis/core/v1alpha1"

go.mod Outdated
@@ -36,6 +36,7 @@ require (
kubevirt.io/api v1.0.0
kubevirt.io/containerized-data-importer-api v1.57.0-rc1
kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4
kubevirt.io/managed-tenant-quota-api v1.1.0
Copy link
Member

Choose a reason for hiding this comment

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

actually we didn't create api repo yet please change to:

kubevirt.io/managed-tenant-quota v1.1.0

@nunnatsa nunnatsa force-pushed the reconcile_mtq_cr branch 4 times, most recently from fe5813c to 9f8c975 Compare August 10, 2023 14:10
@coveralls
Copy link
Collaborator

coveralls commented Aug 10, 2023

Pull Request Test Coverage Report for Build 5853808040

  • 113 of 129 (87.6%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 86.343%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/hyperconverged/hyperconverged_controller.go 0 1 0.0%
controllers/operands/mtq.go 110 125 88.0%
Totals Coverage Status
Change from base Build 5821730339: 0.1%
Covered Lines: 5178
Relevant Lines: 5997

💛 - Coveralls

@orenc1 orenc1 force-pushed the reconcile_mtq_cr branch 2 times, most recently from 1b3f219 to c3910ef Compare August 11, 2023 08:09
@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 11, 2023
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 11, 2023
@nunnatsa nunnatsa force-pushed the reconcile_mtq_cr branch 3 times, most recently from 1ac0fc5 to c210311 Compare August 13, 2023 12:47
@nunnatsa
Copy link
Collaborator

/retest

@nunnatsa nunnatsa force-pushed the reconcile_mtq_cr branch 2 times, most recently from 7a245d5 to ba64257 Compare August 13, 2023 13:56
@hco-bot
Copy link
Collaborator

hco-bot commented Aug 13, 2023

okd-hco-e2e-upgrade-operator-sdk-aws lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-operator-sdk-gcp
hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-azure
hco-e2e-operator-sdk-gcp lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-aws
hco-e2e-upgrade-prev-operator-sdk-sno-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 14, 2023
@machadovilaca
Copy link
Member

/lgtm

@nunnatsa
Copy link
Collaborator

/retest

@hco-bot
Copy link
Collaborator

hco-bot commented Aug 14, 2023

okd-hco-e2e-operator-sdk-aws lane succeeded.
/override ci/prow/okd-hco-e2e-operator-sdk-gcp
hco-e2e-upgrade-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-operator-sdk-azure, ci/prow/okd-hco-e2e-operator-sdk-gcp

In response to this:

okd-hco-e2e-operator-sdk-aws lane succeeded.
/override ci/prow/okd-hco-e2e-operator-sdk-gcp
hco-e2e-upgrade-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-azure

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
Copy link
Collaborator

/test hco-e2e-upgrade-prev-operator-sdk-azure
/test hco-e2e-upgrade-prev-operator-sdk-aws

@kubevirt-bot
Copy link
Contributor

@nunnatsa: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build-hco-test-utils-image
  • /test pull-hyperconverged-cluster-operator-e2e-k8s-1.26-centos9
  • /test pull-hyperconverged-cluster-operator-e2e-k8s-1.27

Use /test all to run the following jobs that were automatically triggered:

  • pull-hyperconverged-cluster-operator-e2e-k8s-1.26-centos9
  • pull-hyperconverged-cluster-operator-e2e-k8s-1.27

In response to this:

/test hco-e2e-upgrade-prev-operator-sdk-azure
/test hco-e2e-upgrade-prev-operator-sdk-aws

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Aug 14, 2023

hco-e2e-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-sno-aws
hco-e2e-upgrade-prev-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-sno-aws, ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws

In response to this:

hco-e2e-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-sno-aws
hco-e2e-upgrade-prev-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws

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
Copy link
Collaborator

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nunnatsa

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 14, 2023
@hco-bot
Copy link
Collaborator

hco-bot commented Aug 14, 2023

hco-e2e-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-azure

In response to this:

hco-e2e-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-operator-sdk-azure

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Aug 14, 2023

hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure
okd-hco-e2e-upgrade-operator-sdk-aws lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-operator-sdk-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure, ci/prow/okd-hco-e2e-upgrade-operator-sdk-gcp

In response to this:

hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure
okd-hco-e2e-upgrade-operator-sdk-aws lane succeeded.
/override ci/prow/okd-hco-e2e-upgrade-operator-sdk-gcp

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Aug 14, 2023

hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure

In response to this:

hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure

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

openshift-ci bot commented Aug 14, 2023

@orenc1: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/hco-e2e-operator-sdk-azure 19b3f7d link true /test hco-e2e-operator-sdk-azure
ci/prow/okd-hco-e2e-operator-sdk-gcp 19b3f7d link true /test okd-hco-e2e-operator-sdk-gcp
ci/prow/okd-hco-e2e-upgrade-operator-sdk-gcp 19b3f7d link true /test okd-hco-e2e-upgrade-operator-sdk-gcp
ci/prow/hco-e2e-upgrade-operator-sdk-azure 19b3f7d link true /test hco-e2e-upgrade-operator-sdk-azure
ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure 19b3f7d link true /test hco-e2e-upgrade-prev-operator-sdk-azure
ci/prow/hco-e2e-kv-smoke-azure 19b3f7d link true /test hco-e2e-kv-smoke-azure

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.

@nunnatsa
Copy link
Collaborator

hco-e2e-kv-smoke-gcp lane passed
/override ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-upgrade-operator-sdk-aws lane passed
/override ci/prow/hco-e2e-upgrade-operator-sdk-azure
okd-hco-e2e-operator-sdk-aws lane passed
/override ci/prow/okd-hco-e2e-operator-sdk-gcp

/cherry-pick release-1.10

1 similar comment
@nunnatsa
Copy link
Collaborator

hco-e2e-kv-smoke-gcp lane passed
/override ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-upgrade-operator-sdk-aws lane passed
/override ci/prow/hco-e2e-upgrade-operator-sdk-azure
okd-hco-e2e-operator-sdk-aws lane passed
/override ci/prow/okd-hco-e2e-operator-sdk-gcp

/cherry-pick release-1.10

@kubevirt-bot
Copy link
Contributor

@nunnatsa: once the present PR merges, I will cherry-pick it on top of release-1.10 in a new PR and assign it to you.

In response to this:

hco-e2e-kv-smoke-gcp lane passed
/override ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-upgrade-operator-sdk-aws lane passed
/override ci/prow/hco-e2e-upgrade-operator-sdk-azure
okd-hco-e2e-operator-sdk-aws lane passed
/override ci/prow/okd-hco-e2e-operator-sdk-gcp

/cherry-pick release-1.10

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.

@kubevirt-bot
Copy link
Contributor

@nunnatsa: Overrode contexts on behalf of nunnatsa: ci/prow/hco-e2e-kv-smoke-azure, ci/prow/hco-e2e-upgrade-operator-sdk-azure, ci/prow/okd-hco-e2e-operator-sdk-gcp

In response to this:

hco-e2e-kv-smoke-gcp lane passed
/override ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-upgrade-operator-sdk-aws lane passed
/override ci/prow/hco-e2e-upgrade-operator-sdk-azure
okd-hco-e2e-operator-sdk-aws lane passed
/override ci/prow/okd-hco-e2e-operator-sdk-gcp

/cherry-pick release-1.10

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.

@kubevirt-bot kubevirt-bot merged commit 998e0f9 into kubevirt:main Aug 14, 2023
33 checks passed
@kubevirt-bot
Copy link
Contributor

@nunnatsa: #2473 failed to apply on top of branch "release-1.10":

Applying: Reconcile MTQ CR according to an HCO FeatureGate
.git/rebase-apply/patch:1144: trailing whitespace.
If set to true, enables the Managed Tenant Quota (MTQ) feature. See more details 
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M	controllers/hyperconverged/hyperconverged_controller_test.go
A	deploy/index-image/community-kubevirt-hyperconverged/1.11.0/manifests/hco00.crd.yaml
A	deploy/index-image/community-kubevirt-hyperconverged/1.11.0/manifests/kubevirt-hyperconverged-operator.v1.11.0.clusterserviceversion.yaml
A	deploy/olm-catalog/community-kubevirt-hyperconverged/1.11.0/manifests/hco00.crd.yaml
A	deploy/olm-catalog/community-kubevirt-hyperconverged/1.11.0/manifests/kubevirt-hyperconverged-operator.v1.11.0.clusterserviceversion.yaml
M	deploy/operator.yaml
Falling back to patching base and 3-way merge...
Auto-merging deploy/operator.yaml
Auto-merging deploy/olm-catalog/community-kubevirt-hyperconverged/1.10.0/manifests/kubevirt-hyperconverged-operator.v1.10.0.clusterserviceversion.yaml
CONFLICT (content): Merge conflict in deploy/olm-catalog/community-kubevirt-hyperconverged/1.10.0/manifests/kubevirt-hyperconverged-operator.v1.10.0.clusterserviceversion.yaml
Auto-merging deploy/index-image/community-kubevirt-hyperconverged/1.10.0/manifests/kubevirt-hyperconverged-operator.v1.10.0.clusterserviceversion.yaml
Auto-merging controllers/hyperconverged/hyperconverged_controller_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Reconcile MTQ CR according to an HCO FeatureGate
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

hco-e2e-kv-smoke-gcp lane passed
/override ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-upgrade-operator-sdk-aws lane passed
/override ci/prow/hco-e2e-upgrade-operator-sdk-azure
okd-hco-e2e-operator-sdk-aws lane passed
/override ci/prow/okd-hco-e2e-operator-sdk-gcp

/cherry-pick release-1.10

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Aug 14, 2023

Rebase Bot action has failed.
Action URL: https://github.com/kubevirt/hyperconverged-cluster-operator/actions/runs/5855729590

@kubevirt-bot
Copy link
Contributor

@nunnatsa: Overrode contexts on behalf of nunnatsa: ci/prow/hco-e2e-kv-smoke-azure, ci/prow/hco-e2e-upgrade-operator-sdk-azure, ci/prow/okd-hco-e2e-operator-sdk-gcp

In response to this:

hco-e2e-kv-smoke-gcp lane passed
/override ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-upgrade-operator-sdk-aws lane passed
/override ci/prow/hco-e2e-upgrade-operator-sdk-azure
okd-hco-e2e-operator-sdk-aws lane passed
/override ci/prow/okd-hco-e2e-operator-sdk-gcp

/cherry-pick release-1.10

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 pushed a commit to nunnatsa/hyperconverged-cluster-operator that referenced this pull request Aug 14, 2023
If hco's .spec.featureGates.enableManagedTenantQuota=true, the MTQ CustomResource will be deployed in the installation namespace.
When the feature gate is changed to 'false', the CR is deleted.

Signed-off-by: Oren Cohen <ocohen@redhat.com>
kubevirt-bot pushed a commit that referenced this pull request Aug 14, 2023
If hco's .spec.featureGates.enableManagedTenantQuota=true, the MTQ CustomResource will be deployed in the installation namespace.
When the feature gate is changed to 'false', the CR is deleted.

Signed-off-by: Oren Cohen <ocohen@redhat.com>
Co-authored-by: Oren Cohen <ocohen@redhat.com>
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants