openshift / compliance-operator

Operator providing OpenShift cluster compliance checks
Apache License 2.0
110 stars 110 forks source link

Bug 2075029: scans: Delete scan pods and aggregator when they're done #820

Closed jhrozek closed 2 years ago

jhrozek commented 2 years ago

We didn't delete scan pods and the aggregator after a scan was done unless the delete was forced by the scan object being deleted. This appears to be breaking the cluster-autoscaler which can't drain pods from nodes that are not backed by a replicating controller.

Since there appears to be no reason to keep the pods around unless the debug=true option is set, let's remove those pods when the scan reaches done and only keep the other resources around that are needed for eventually re-running the scan.

Jira: OCPBUGSM-43262

openshift-ci[bot] commented 2 years ago

@jhrozek: This pull request references Bugzilla bug 2075029, which is invalid:

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to [this](https://github.com/openshift/compliance-operator/pull/820): >Bug 2075029: scans: Delete scan pods and aggregator when they're done 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/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
jhrozek commented 2 years ago

/bugzilla refresh

openshift-ci[bot] commented 2 years ago

@jhrozek: This pull request references Bugzilla bug 2075029, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target release (4.11.0) matches configured target release for branch (4.11.0) * bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact: /cc @xiaojiey

In response to [this](https://github.com/openshift/compliance-operator/pull/820#issuecomment-1105640048): >/bugzilla refresh 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/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
openshift-ci[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhrozek, Vincent056

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/openshift/compliance-operator/blob/master/OWNERS)~~ [Vincent056,jhrozek] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mrogers950 commented 2 years ago

Just the rebase and one nit about the error, otherwise LGTM

jhrozek commented 2 years ago

Thanks for the reviews. I'll add the debug test and fix the other small issues tomorrow. Removing lgtm until then

jhrozek commented 2 years ago

/test e2e-aws metrics flake

rhmdnd commented 2 years ago

/lgtm

openshift-ci[bot] commented 2 years ago

@jhrozek: all tests passed!

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/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci[bot] commented 2 years ago

@jhrozek: All pull requests linked via external trackers have merged:

Bugzilla bug 2075029 has been moved to the MODIFIED state.

In response to [this](https://github.com/openshift/compliance-operator/pull/820): >Bug 2075029: scans: Delete scan pods and aggregator when they're done 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/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.