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

LOG-6280: Only cleanup dashboard when owned by 'this' operator version #2921

Open
wants to merge 1 commit into
base: release-6.1
Choose a base branch
from

Conversation

jcantrill
Copy link
Contributor

Description

This PR:

  • Adds labels version, managedby to the collector dashboard configmap
  • Modifies logic to only delete the dashboard on operator exit if the label set matches those expected by the operator
  • Resolves the issue where the old version of the operator deleted the dashboard on_exit after the new version of the operator updated it

Links

https://issues.redhat.com/browse/LOG-6280

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 10, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 10, 2025

@jcantrill: This pull request references LOG-6280 which is a valid jira issue.

In response to this:

Description

This PR:

  • Adds labels version, managedby to the collector dashboard configmap
  • Modifies logic to only delete the dashboard on operator exit if the label set matches those expected by the operator
  • Resolves the issue where the old version of the operator deleted the dashboard on_exit after the new version of the operator updated it

Links

https://issues.redhat.com/browse/LOG-6280

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 openshift-eng/jira-lifecycle-plugin repository.

@jcantrill
Copy link
Contributor Author

/cherrpick release-6.0

@jcantrill
Copy link
Contributor Author

/cherrypick release-6.0

@openshift-cherrypick-robot

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

In response to this:

/cherrypick release-6.0

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.

@jcantrill
Copy link
Contributor Author

/cherrypick master

@openshift-cherrypick-robot

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

In response to this:

/cherrypick master

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.

Copy link
Contributor

openshift-ci bot commented Jan 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcantrill

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 10, 2025
@jcantrill
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 10, 2025
}
return c.Delete(context.TODO(), cm)
configMaps := &corev1.ConfigMapList{}
if err := r.List(context.TODO(), configMaps, options); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about Get(cm) and then compare the actual labels with the expected ones?
The List() could find configmaps that have identical labels but a different name - its unlikely, but a Get is more efficient and direct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alanconway updated to check labels

@jcantrill
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 16, 2025
@jcantrill
Copy link
Contributor Author

/refresh

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. release/6.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants