Fix PAO OLM operator removal#336
Conversation
|
/retest |
| @@ -156,12 +155,11 @@ func (r *PerformanceProfileReconciler) removeOLMOperator() error { | |||
| subscription := &subscriptions.Items[i] | |||
| if subscription.Name == "performance-addon-operator" { | |||
There was a problem hiding this comment.
IIRC we should not assume the name of the subscription to be performance-addon-operator
There was a problem hiding this comment.
We where talking about csv name. I was trying to go by the name provided in the market place :
oc get packagemanifests -n openshift-marketplace | grep perf hyperfoil-bundle Community Operators 25m performance-addon-operator Red Hat Operators 25m
Other possible fields of subscription are:
CatalogSource string CatalogSourceNamespace string Package string
I did not find any strong reference for either of those to be unique.
@cynepco3hahue any suggestions here?
There was a problem hiding this comment.
@camilamacedo86 perhaps you can advise here.
In case we want to remove a 4.10 optional operator when upgrading to 4.11, following the CLI steps translated into code as suggested in this PR, what would be the cretin field of the subscription we can track and delete for our operator - performance-addon-operator.
In case Subscription.Name field can be something other than performance-addon-operator , is there a field that will always contain the constant for performance-addon-operator for all types of deployments ? (CLI/UI/Manual)
There was a problem hiding this comment.
Probably you can find if the subscription.Status.CurrentCSV includes performance-addon-operator.
There was a problem hiding this comment.
I have changed the removal mechanism to get the csv first by the url
85e9ef2 to
d69d971
Compare
pkg/performanceprofile/controller/performanceprofile_controller.go
Outdated
Show resolved
Hide resolved
d69d971 to
f0ed440
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yanirq The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Perfromance addons operator removal will be done by searching for PAO deployment name that will always euqal performance-operator. It will remove the csv and its matching subscription. This fix will also ensure that all versions lower than 4.11 will remove the PAO.
f0ed440 to
ad0b3e0
Compare
|
@yanirq: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/lgtm |
Perfromance addons operator removal will be done by searching for PAO deployment name that will always euqal performance-operator. It will remove the csv and its matching subscription. This fix will also ensure that all versions lower than 4.11 will remove the PAO.
Perfromance addons operator removal will be done by searching for PAO deployment name that will always euqal performance-operator. It will remove the csv and its matching subscription. This fix will also ensure that all versions lower than 4.11 will remove the PAO.
Perfromance addons operator removal will be done by searching for PAO deployment name that will always euqal
performance-operator. It will remove the csv and its matching subscription.This fix will also ensure that all versions lower than 4.11
will remove the PAO.
unit test added.