-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oadm prune --namespace=myns does not limit to specified namespace #9502
Comments
@soltysh I agree. If we support |
I don't understand. Given an image that isn't used in a particular namespace, what would you do? You can't remove it unless other namespaces aren't using it, but if you're checking other namespaces, it's no longer contained to a namespace. How about you simply detect if they specified |
It's likely that prune could prune just the image streams for -n. But it On Thu, Jun 23, 2016 at 10:14 AM, David Eads notifications@github.com
|
I like @smarterclayton idea. I'll go with that, esp. it's reasonable to reason about, with images being non-namespaced resources. |
While working on my pruning image card, I wanted to test the pruning only within my test namespace, but invoking
oadm prune images -n test --loglevel=4
showed me that all namespaces were taken into consideration. Looking at the pruning source code (builds.go, deployments.go, images.go) we always usekapi.NamespaceAll
. The question is should we take namespace into consideration?In my opinion, and from talking to @miminar for builds and deployments it's quite straightforward, so yes. Unfortunately for images, it's not that simple, since Images are non-namespaced objects, but others using them (ImageStreams, Pods, ReplicationControllerss, BuildConfigs, Builds, DeploymentConfigs) are. The only problem here is, that we can't be sure if an Image which might be a candidate for pruning in one namespace, might be still used in others. In other words, we would have to look through all namespaces still but remove only from those specified.
@miminar @smarterclayton @derekwaynecarr @deads2k thoughts?
The text was updated successfully, but these errors were encountered: