-
Notifications
You must be signed in to change notification settings - Fork 65
feat: Add pattern uninstall blogpost #641
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
Open
darkdoc
wants to merge
1
commit into
validatedpatterns:main
Choose a base branch
from
darkdoc:uninstall_blogpost
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||||
| --- | ||||||
| date: 2026-02-10 | ||||||
| title: Experimental support for pattern uninstall | ||||||
| summary: Uninstalling patterns now possible | ||||||
| author: Akos Eros | ||||||
| blog_tags: | ||||||
| - patterns | ||||||
| - announce | ||||||
| --- | ||||||
| :toc: | ||||||
| :imagesdir: /images | ||||||
|
|
||||||
| We are excited to announce that uninstalling patterns are now experimentally supported from pattern operator version 0.0.65 | ||||||
|
|
||||||
| == Initial approach | ||||||
|
|
||||||
| When we initialy started to work on supporting pattern uninstall, the naive approach was to remove the app of apps, and let argocd handle and clean up the rest. | ||||||
| Unfortunatelly this path was unfeasable for two reasons: some long outstanding issues in argocd regarding application health checks, | ||||||
| link:https://github.com/argoproj/argo-cd/issues/6708[**here**] and link:https://github.com/argoproj/argo-cd/issues/10550[**here**] | ||||||
| and the hub-spoke architecture with acm policies. | ||||||
|
|
||||||
| == Gory implementation details | ||||||
|
|
||||||
| We decided to go with a more fine grained solution, and do phases: delete spoke child applications, delete spoke app of apps, delete hub child applications, delete hub app of apps. | ||||||
| The main controll is in the operator, we pass the phase as a variable to clustergroup chart, and to the acm chart. | ||||||
| In order to achive this, we made some changes to the clustergroup chart, to remove child applications when needed. | ||||||
| In the acm chart we also needed some changes to support distinction between the phases in hub and spoke clusters. | ||||||
| The resource removal is still managed by argocd. | ||||||
| To initiate the uninstallation, only the pattern cr needs to be deleted. | ||||||
| [source,bash] | ||||||
| ---- | ||||||
| oc delete -n openshift-operators patterns/<pattern-name> | ||||||
| ---- | ||||||
| The patterns operator, and cluster-wide OpenShift GitOps instance will remain installed. | ||||||
| In prior operator version the gitops subscription was owned by the pattern CR, we transfer the ownership to the patterns operator. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| == Known limitations | ||||||
|
|
||||||
| We did our due diligence and tested the uninstallation of the mcg pattern with both hub and spoke clusters. | ||||||
| ____ | ||||||
| "By design, when OLM uninstalls an operator it does not remove any of the operator’s owned CRDs, APIServices, or CRs in order to prevent data loss." | ||||||
| ____ | ||||||
| With the above in mind, we only remove operators/subscriptions, and do not remove any crds. | ||||||
| If the operator is installed to a namespace, its ClusterServiceVersion will be removed (when the namespace is deleted). | ||||||
| However if its installed to a namespace that is not cleaned up (ie: openshift-operators) the csv will remain in the cluster. | ||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.