kubectl-operator icon indicating copy to clipboard operation
kubectl-operator copied to clipboard

Allow installing into global-operator group

Open kouk opened this issue 3 years ago • 2 comments

The possibleInstallModes method doesn't deal with the special case of a target namespace being the empty string, so validation fails when installing to the global operator group. E.g.

❯ kubectl operator install cert-manager --channel stable --approval Automatic -n operators
failed to install operator: operator "cert-manager" not installable: install modes supported by operator ("AllNamespaces") not compatible with install modes supported by existing operator group ("SingleNamespace")

Add a special method to determine the operator group's supported methods. Ref: https://olm.operatorframework.io/docs/concepts/crds/operatorgroup/#installmodes-and-supported-operatorgroups

kouk avatar Apr 28 '22 06:04 kouk

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kouk To complete the pull request process, please assign joelanford after the PR has been reviewed. You can assign the PR to them by writing /assign @joelanford in a comment when ready.

The full list of commands accepted by this bot can be found 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[bot] avatar Apr 28 '22 06:04 openshift-ci[bot]

/assign @joelanford

kouk avatar Apr 28 '22 06:04 kouk

Hi @kouk, I think the issue you were experiencing may have been solved by https://github.com/operator-framework/kubectl-operator/pull/80

On a build from main, I retried your command and got this:

$ kubectl operator install cert-manager --channel stable --approval Automatic -n operators
subscription "cert-manager" created
operator "cert-manager" installed; installed csv is "cert-manager.v1.10.2"

I'm going to close this out since it looks like its fixed, but please open another issue or PR if you see something else missing!

joelanford avatar Jan 18 '23 03:01 joelanford

thanks @joelanford I can't check it right now but seems legit.

kouk avatar Jan 19 '23 12:01 kouk