node-maintenance-operator
node-maintenance-operator copied to clipboard
Add 3 labels to all resources, add e2e test that validate the existence of the three labels
Why we need this PR
To meet k8s custom labels standardization: Add 3 custom labels to all resources, add e2e that test the existence of name label
Changes made
- Add recommended app.kubernetes.io/name label to everything
With these changes we prevent services selecting pods by other operators, because they all have the control-plane: controller-manager label by default.
Because deployment updates with modified labels fail, also rename the deployment by modifying the namePrefix (causes bundle file renames as well).
-
Add test that validate retrieval of operator controller pod by the name label.
-
Add the default container label, for easier getting desired logs.
Which issue(s) this PR fixes
Test plan
Hi @Shai1-Levi. Thanks for your PR.
I'm waiting for a medik8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
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-sigs/prow repository.
in the past at least, label additions broke updates... [1] IIRC e2e has an update test, let's see what happens.
/test 4.17-openshift-e2e
[1] https://github.com/medik8s/node-healthcheck-operator/commit/df1d2e8f1463fc94a77d11cb99c99ee8014d5006#diff-c006b1ef995eeeb57408cce42bd84db8dfc0cbe18df03222857665cebb1ac6fdR9-R18
update still fails 🤷🏼♂️
"Failed to run bundle upgrade: error waiting for CSV to install: csv failed: reason: \"InstallComponentFailed\", message: \"install strategy failed: Deployment.apps \\\"node-maintenance-operator-controller-manager\\\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\\\"app.kubernetes.io/name\\\":\\\"node-maintenance-operator\\\", \\\"control-plane\\\":\\\"controller-manager\\\", \\\"node-maintenance-operator\\\":\\\"\\\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable\"\n" make: *** [Makefile:208: bundle-run-update] Error 1
/test 4.17-openshift-e2e
@Shai1-Levi: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.
In response to this:
/test 4.17-openshift-e2e
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-sigs/prow repository.
/ok-to-test
/test 4.17-openshift-e2e
operator update succeeded test failure looks unrelated, looking at the test history this seems to be very flaky... :/
/ok-to-test /lgtm /approve
Hey, I added some labels to fix the e2e test and test-scorecard @slintes I didn't saw your last comment before I pushed the code
/test 4.17-openshift-e2e
/retest /lgtm
/retest
setup failed...
/retest
@razo7 since when is the e2e test so flaky? :/
Error waiting for events: context deadline exceeded [FAILED] Event SucceedMaintenance was missing for test-maintenance nm CR
Unexpected error:
<context.deadlineExceededError>:
context deadline exceeded
{}
occurred
/retest
/hold
since this is not urgent, let's first try to fix the e2e test, these retests are a waste of resources...
New changes are detected. LGTM label has been removed.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Shai1-Levi Once this PR has been reviewed and has the lgtm label, please ask for approval from slintes. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@Shai1-Levi: 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/4.16-openshift-e2e | 807c5f9c8f393d3b1d9921e77a6edd6b2c813a88 | link | true | /test 4.16-openshift-e2e |
| ci/prow/4.17-openshift-e2e | 807c5f9c8f393d3b1d9921e77a6edd6b2c813a88 | link | true | /test 4.17-openshift-e2e |
| ci/prow/4.18-openshift-e2e | 807c5f9c8f393d3b1d9921e77a6edd6b2c813a88 | link | true | /test 4.18-openshift-e2e |
| ci/prow/4.20-ci-bundle-my-bundle | 1827784a0b3cd1c99b9c449d68a2176ea93a6cda | link | true | /test 4.20-ci-bundle-my-bundle |
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-sigs/prow repository. I understand the commands that are listed here.