kubevirt / hyperconverged-cluster-operator

Operator pattern for managing multi-operator products
Apache License 2.0
154 stars 153 forks source link

Fix a bug with user-defined labels in priorityClass #3085

Closed nunnatsa closed 2 months ago

nunnatsa commented 2 months ago

HCO already supports user-defined labels in priorityClass, but if another change is done to the priorityClass, either a change in a required label, or a change in the spec fields, the user-defined labels are deleted. This is also happens if the other modofication is done in different request.

This PR fixes this issue, and makes sure that user-defined labels are stay in place on update of the priorityClass.

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.

Jira Ticket:

None

Release note:

Fix a bug with user-defined labels in priorityClass
coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10679520351

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/operands/kubevirt.go 24 28 85.71%
<!-- Total: 49 53 92.45% -->
Totals Coverage Status
Change from base Build 10679428062: 0.02%
Covered Lines: 5337
Relevant Lines: 6222

💛 - Coveralls
hco-bot commented 2 months ago

hco-e2e-kv-smoke-gcp lane succeeded. /override ci/prow/hco-e2e-kv-smoke-azure

kubevirt-bot commented 2 months ago

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2323456370): >hco-e2e-kv-smoke-gcp lane succeeded. >/override ci/prow/hco-e2e-kv-smoke-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2324526189): >hco-e2e-operator-sdk-sno-aws lane succeeded. >/override ci/prow/hco-e2e-operator-sdk-sno-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2324543582): >hco-e2e-upgrade-prev-operator-sdk-sno-aws lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
nunnatsa commented 2 months ago

/retest

hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2324567554): >hco-e2e-upgrade-prev-operator-sdk-sno-aws lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2324690724): >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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
nunnatsa commented 2 months ago

/override-bot

hco-bot commented 2 months ago

hco-e2e-kv-smoke-gcp lane succeeded. /override ci/prow/hco-e2e-kv-smoke-azure

kubevirt-bot commented 2 months ago

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2324737739): >hco-e2e-kv-smoke-gcp lane succeeded. >/override ci/prow/hco-e2e-kv-smoke-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
nunnatsa commented 2 months ago

/retest

hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2324898293): >hco-e2e-consecutive-operator-sdk-upgrades-aws lane succeeded. >/override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
nunnatsa commented 2 months ago

/retest

hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2325764938): >hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure >hco-e2e-upgrade-prev-operator-sdk-sno-aws lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
tiraboschi commented 2 months ago

/approve

kubevirt-bot commented 2 months ago

[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: - ~~[OWNERS](https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/OWNERS)~~ [tiraboschi] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2325877049): >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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2325918379): >hco-e2e-consecutive-operator-sdk-upgrades-aws lane succeeded. >/override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2326175380): >hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure >hco-e2e-upgrade-prev-operator-sdk-sno-aws lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2326199917): >hco-e2e-upgrade-prev-operator-sdk-sno-aws lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2326271162): >hco-e2e-consecutive-operator-sdk-upgrades-aws lane succeeded. >/override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
tiraboschi commented 2 months ago

/retest

openshift-ci[bot] commented 2 months ago

@nunnatsa: 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-upgrade-prev-operator-sdk-sno-azure 7da9ab079d0adfcba1f030fd51d76dcbf26705d6 link false /test hco-e2e-upgrade-prev-operator-sdk-sno-azure
ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure 7da9ab079d0adfcba1f030fd51d76dcbf26705d6 link true /test hco-e2e-consecutive-operator-sdk-upgrades-azure
ci/prow/hco-e2e-upgrade-operator-sdk-azure 7da9ab079d0adfcba1f030fd51d76dcbf26705d6 link true /test hco-e2e-upgrade-operator-sdk-azure
ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure 7da9ab079d0adfcba1f030fd51d76dcbf26705d6 link false /test hco-e2e-upgrade-operator-sdk-sno-azure

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2326587424): >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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
hco-bot commented 2 months ago

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

kubevirt-bot commented 2 months ago

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

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3085#issuecomment-2326627783): >hco-e2e-upgrade-operator-sdk-sno-aws lane succeeded. >/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.