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

--gc-tag feature doesn't work if it cannot list all the things #189

Open
mkmik opened this issue Feb 15, 2018 · 0 comments
Open

--gc-tag feature doesn't work if it cannot list all the things #189

mkmik opened this issue Feb 15, 2018 · 0 comments
Labels

Comments

@mkmik
Copy link
Contributor

mkmik commented Feb 15, 2018

I'm using kubecfg update foo.jsonnet --gc-tag=bar in a cluster with RBAC enabled and with an account that can create and list (almost) all objects in a few namespaces, but it cannot list many resource types in most of the other namespaces (e.g. secrets).

In this scenario the kubecfg GC feature cannot be used at all because it fails hard when it tries to list all resources in all namespaces (by using metav1.NamespaceAll)

apiservices.apiregistration.k8s.io is forbidden: User "system:serviceaccount:toolchain-web:toolchain-web-svcaccount" cannot list apiservices.apiregistration.k8s.io at the cluster scope

(The same kind of error happens when using e.g. kubectl get secret --all-namespaces)

My deployment spans a handful of namespaces; the jsonnet resource specify in which namespaces each object goes.

I'd like to be able to use the GC in this scenario.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants