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

listing services and revisions should respect namespace #86

Closed
navidshaikh opened this issue May 3, 2019 · 0 comments · Fixed by #88
Closed

listing services and revisions should respect namespace #86

navidshaikh opened this issue May 3, 2019 · 0 comments · Fixed by #88

Comments

@navidshaikh
Copy link
Collaborator

navidshaikh commented May 3, 2019

➜  kubectl create namespace n2        
namespace/n2 created

➜./kn service create svc1 -n n2 --image dev.local/ns/i:v1    

# bug: list without any option returning services from all the namespaces
➜./kn service list
s1
s2
svc1

➜ ./kn service list -n n2
svc1

➜ ./kn service list -n default
s1
s2
navidshaikh added a commit to navidshaikh/client that referenced this issue May 3, 2019
navidshaikh added a commit to navidshaikh/client that referenced this issue May 3, 2019
knative-prow-robot pushed a commit that referenced this issue May 9, 2019
* Fix returning the namespace for listing resources

 Fixes #86

* Adds license to pkg/kn/commands/namespaced.go

* Adds tests for namespace flags and retrieval

* Renames test function
maximilien pushed a commit to maximilien/client that referenced this issue May 14, 2019
* Fix returning the namespace for listing resources

 Fixes knative#86

* Adds license to pkg/kn/commands/namespaced.go

* Adds tests for namespace flags and retrieval

* Renames test function
maximilien pushed a commit to maximilien/client that referenced this issue May 14, 2019
* Fix returning the namespace for listing resources

 Fixes knative#86

* Adds license to pkg/kn/commands/namespaced.go

* Adds tests for namespace flags and retrieval

* Renames test function
maximilien pushed a commit to maximilien/client that referenced this issue May 14, 2019
* Fix returning the namespace for listing resources

 Fixes knative#86

* Adds license to pkg/kn/commands/namespaced.go

* Adds tests for namespace flags and retrieval

* Renames test function
coryrc pushed a commit to coryrc/client that referenced this issue May 14, 2020
…to let the tool magically download kubernetes and start the cluster. (knative#86)

To ensure that our tests don't unexpectedly break, we don't pin the kubernetes version to a particular one (knative/serving#1294) but always use `latest`.

However, the concept of `latest` for kubetests means "kubernetes head", which can be broken (didn't happen so far) or doesn't support all platforms (OS X is the most common case).

Unfortunately, switching to `default` or `release/stable` translates to kubernetes 1.9, which is not recommended for Knative according to the docs.

This PR adds the function `download_k8s()`: it will download the latest public, stable GKE binary supported by the test cluster and the client machine.

As a bonus, the function knocks out the `kubernetes-test.tar.gz` package; this 1.2GB package is not used by Knative tests, and is a severe burden on slower connections (anedoctal evidence: 20+ min download on my home network).

Fixes knative#40.

Bonus: fixes knative#80.
coryrc pushed a commit to coryrc/client that referenced this issue May 14, 2020
`kubectl` 1.11 doesn't recognize the `--username` and `--password` flags anymore. Because the `prow-tests` image uses `kubectl` 1.8, the Prow jobs are not broken (yet).

The changes in knative#86 don't work because the context is not changed (nor restored), but the function works as long as the current user is an owner of the GCP project (which is not the case for Prow E2E test jobs).

This change creates and uses a new context for the cluster admin, created the role binding, then switches back to the original context. This is more secure as no ACL changes are required for the current user, nor project wide ACL changes are performed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant