Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Fix cross-namespace cli operations when a context is set #963

Merged
merged 2 commits into from
Jan 22, 2021

Conversation

andreaTP
Copy link
Contributor

What changes were proposed in this pull request?

Fix #961
Setting a default namespace in the current context will break the kubectl-cloudflow functionalities.

E.g.:

$ kubectl config set-context --current --namespace="non-existing"
$ kubectl cloudflow list
Error: No Cloudflow operators detected in the cluster. Exiting

Current workaround:

$ kubectl config set-context --current --namespace=""

Why are the changes needed?

Enable the usage of kubectl-cloudflow even when a namespace is defined in the current context.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Running the integration tests on GKE after setting a namespace in the context.
Running most of the operations (e.g. deploy/undeploy/configure/configuration/list/status) on a simple application on an OpenShift cluster.

cc. @thomasschoeftner @OBenner @michael-read

Copy link
Contributor

@RayRoestenburg RayRoestenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@andreaTP andreaTP merged commit e1f96c3 into master Jan 22, 2021
@andreaTP andreaTP deleted the fix-cross-namespace branch January 22, 2021 11:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: No Cloudflow operators detected in the cluster. Exiting
2 participants