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

OCPBUGS-38601: The operand should not fail when the operator is uninstalled without prior deletion of the operator #222

Merged

Conversation

aleskandro
Copy link
Member

@aleskandro aleskandro commented Aug 16, 2024

When the operator is uninstalled without prior deletion of the operand, we should not let the operand fail. This is due to the removal of the service account and other RBAC objects. This commit will let the operator create the RBAC objects and additional service accounts detached from the OLM ones.
The first commit also includes an edge-case fix: when a deployment is deleted outside of the operand's lifecycle, the operator must be able to reconcile it, so we need to remove the finalizer.

This PR also adds TopologySpreadConstraints to handle scenarios of nodes maintenance.

Depends on #214

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Aug 16, 2024
@openshift-ci-robot
Copy link

@aleskandro: This pull request references Jira Issue OCPBUGS-38601, which is invalid:

  • expected the bug to target the "4.18.0" version, but no target version was set

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

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

When the operator is uninstalled without prior deletion of the operand, we should not let the operand fail. This is due to the removal of the service account and other RBAC objects. This commit will let the operator create the RBAC objects and additional service accounts detached from the OLM ones.
The first commit also includes an edge-case fix: when a deployment is deleted outside of the operand's lifecycle, the operator must be able to reconcile it, so we need to remove the finalizer.

  • Added tests to check reconciliation of RBAC objects
  • Some builders now return a pointer
  • deploymentsAreRunning|validateReconcile and deploymentsAreDeleted|validateDeletion are unified across integration and E2Es.
  • Minor fixes

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.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Aug 16, 2024
@aleskandro
Copy link
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 16, 2024
@openshift-ci-robot
Copy link

@aleskandro: This pull request references Jira Issue OCPBUGS-38601, 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 version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lwan-wanglin

In response to this:

/jira refresh

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.

@aleskandro
Copy link
Member Author

/cc @Prashanth684 @AnnaZivkovic
(about cc8f805)

/cc @lwan-wanglin
(for testing and in particular about the changes in b93b63e)

@lwan-wanglin
Copy link
Contributor

/retest

@openshift-ci-robot
Copy link

@aleskandro: This pull request references Jira Issue OCPBUGS-38601, which is valid.

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

Requesting review from QA contact:
/cc @lwan-wanglin

In response to this:

When the operator is uninstalled without prior deletion of the operand, we should not let the operand fail. This is due to the removal of the service account and other RBAC objects. This commit will let the operator create the RBAC objects and additional service accounts detached from the OLM ones.
The first commit also includes an edge-case fix: when a deployment is deleted outside of the operand's lifecycle, the operator must be able to reconcile it, so we need to remove the finalizer.

This PR also adds Pod Disruption Budgets to handle scenarios of nodes maintenance.

Depends on #214

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.

@aleskandro
Copy link
Member Author

/test e2e-gcp-multi-operator-olm e2e-gcp-multi-operator

@aleskandro
Copy link
Member Author

/test e2e-gcp-multi-operator e2e-gcp-multi-operator-olm

2 similar comments
@aleskandro
Copy link
Member Author

/test e2e-gcp-multi-operator e2e-gcp-multi-operator-olm

@aleskandro
Copy link
Member Author

/test e2e-gcp-multi-operator e2e-gcp-multi-operator-olm

@aleskandro
Copy link
Member Author

/test e2e-gcp-multi-operator

…talled without prior deletion of the operator

When the operator is uninstalled without prior deletion of the operand, we should not let the operand to fail. This is due to the removal of the service account and other RBAC objects. This commit will let the operator to create the RBAC objects and additional service accounts, detached from the OLM ones.
This commmit also includes an edge-case fix where a deployment is deleted outside of the lifecycle of the operand: the operator must be able to reconcile it, therefore we need to remove the finalizer.
@aleskandro
Copy link
Member Author

/test images e2e-gcp-multi-operator-olm e2e-gcp-multi-operator

@Prashanth684
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 21, 2024
Copy link

openshift-ci bot commented Aug 21, 2024

@aleskandro: all tests passed!

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.

@AnnaZivkovic
Copy link
Contributor

/approve

Copy link

openshift-ci bot commented Aug 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AnnaZivkovic

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 Aug 21, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 470113b into openshift:main Aug 21, 2024
20 checks passed
@openshift-ci-robot
Copy link

@aleskandro: Jira Issue OCPBUGS-38601: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-38601 has been moved to the MODIFIED state.

In response to this:

When the operator is uninstalled without prior deletion of the operand, we should not let the operand fail. This is due to the removal of the service account and other RBAC objects. This commit will let the operator create the RBAC objects and additional service accounts detached from the OLM ones.
The first commit also includes an edge-case fix: when a deployment is deleted outside of the operand's lifecycle, the operator must be able to reconcile it, so we need to remove the finalizer.

This PR also adds TopologySpreadConstraints to handle scenarios of nodes maintenance.

Depends on #214

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.

This pull request was closed.
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/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants