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

[release-4.3] Bug 1776521: Replacing operator creates duplicate secrets #1160

Conversation

openshift-cherrypick-robot

This is an automated cherry-pick of #1123

/assign Bowenislandsong

…or the operator's ServiceAccount

Cause:
OLM catalog ensurer EnsureServiceAccount makes sure the service account
is updated when a new version of an operator is present. This
happens during ExecutePlan applying InstallPlan to a namespace.
If it is an update, fields of service account are updated but the
references to older secrets are dropped.

Consequence:
This process of dereferencing secret fails to clean up the older
secrets and result in the secrets pilling up as the operator upgrades.
Eventually, there will be too many old secrets laying around and only
getting cleaned up when the operator is uninstalled.

Fix:
We carry over older secrets through updating the service account.
We also compare the update using DeepDerivative to see if the
update changes any existing fields. If not, we skip the update API call
since it will not change anything.

Result:
Older secretes are again referred in the updated SA and no new secrets
are created.
@openshift-ci-robot
Copy link
Collaborator

@openshift-cherrypick-robot: This pull request references Bugzilla bug 1769030, which is invalid:

  • expected the bug to target the "4.3.0" release, but it targets "4.4.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, ON_DEV, POST, POST, but it is MODIFIED instead

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:

[release-4.3] Bug 1769030: Replacing operator creates duplicate secrets

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Dec 2, 2019
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 2, 2019
@Bowenislandsong Bowenislandsong changed the title [release-4.3] Bug 1769030: Replacing operator creates duplicate secrets [release-4.3] Bug 1776521: Replacing operator creates duplicate secrets Dec 2, 2019
@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Dec 2, 2019
@openshift-ci-robot
Copy link
Collaborator

@openshift-cherrypick-robot: This pull request references Bugzilla bug 1776521, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

[release-4.3] Bug 1776521: Replacing operator creates duplicate secrets

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/test-infra repository.

@jpeeler
Copy link
Contributor

jpeeler commented Dec 3, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2019
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpeeler, openshift-cherrypick-robot

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 3, 2019
@openshift-merge-robot openshift-merge-robot merged commit b6b7c85 into operator-framework:release-4.3 Dec 3, 2019
@openshift-ci-robot
Copy link
Collaborator

@openshift-cherrypick-robot: All pull requests linked via external trackers have merged. Bugzilla bug 1776521 has been moved to the MODIFIED state.

In response to this:

[release-4.3] Bug 1776521: Replacing operator creates duplicate secrets

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/test-infra repository.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants