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

fix(olm): rename deployment to handle immutable selector #943

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

ebaron
Copy link
Member

@ebaron ebaron commented Sep 11, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits: git commit -S -m "YOUR_COMMIT_MESSAGE"

Fixes: #942

Description of the change:

  • Renames the operator's deployment from cryostat-operator-controller-manager to cryostat-operator-controller

Motivation for the change:

  • OLM attempts to patch the deployment during an upgrade. Because we've changed the label selector for the deployment, which is immutable, the upgrade fails. By changing the name of the deployment, OLM will recreate the deployment, instead of patching it, when upgrading the operator.

How to manually test:

  1. make deploy_bundle BUNDLE_IMG=quay.io/cryostat/cryostat-operator-bundle:3.0.0
  2. ./bin/operator-sdk run bundle-upgrade quay.io/ebaron/cryostat-operator-bundle:rename-deployment-01
  3. Upgrade should succeed

@ebaron
Copy link
Member Author

ebaron commented Sep 11, 2024

/build_test

@mergify mergify bot added the safe-to-test label Sep 11, 2024
Copy link

/build_test completed successfully ✅.
View Actions Run.

@ebaron ebaron merged commit 07403b0 into cryostatio:main Sep 11, 2024
7 checks passed
mergify bot pushed a commit that referenced this pull request Sep 11, 2024
(cherry picked from commit 07403b0)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml
ebaron added a commit that referenced this pull request Sep 11, 2024
…) (#944)

* fix(olm): rename deployment to handle immutable selector (#943)

(cherry picked from commit 07403b0)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml

* Fix conflicts

---------

Co-authored-by: Elliott Baron <ebaron@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] Upgrade to 3.0.1 fails
2 participants