-
Notifications
You must be signed in to change notification settings - Fork 18.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
Add (hidden) flags to set containerd namespaces #39500
Add (hidden) flags to set containerd namespaces #39500
Conversation
59ddc3f
to
1fda6e8
Compare
related previous PR (which did this through the API) #36914 Is the namespace length still a concern? Or don't we reach the maximum length here? #36914 (comment) |
Length can still be problematic if you make too long of a name. I ran these locally and it was fine at least. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found a typo, but SGTM
Ah I need to deal with Windows issues (validation check doesn't make sense on Windows which doesn't use containerd right now). But going to let linux tests run through first. |
yes, let's see if it all works 🤞 |
this looks weird (converting it to a http url?)
|
This allows our tests, which all share a containerd instance, to be a bit more isolated by setting the containerd namespaces to the generated daemon ID's rather than the default namespaces. This came about because I found in some cases we had test daemons failing to start (really very slow to start) because it was (seemingly) processing events from other tests. Signed-off-by: Brian Goff <[email protected]>
1fda6e8
to
24ad2f4
Compare
Codecov Report
@@ Coverage Diff @@
## master #39500 +/- ##
=========================================
Coverage ? 37.33%
=========================================
Files ? 609
Lines ? 45230
Branches ? 0
=========================================
Hits ? 16886
Misses ? 26055
Partials ? 2289 |
Failure was because the plugin client was talking to the wrong namespace, fixed. |
Clean run on the first shot... |
Apparently I can't make gordon rebuild successful tests anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Two questions;
- do we want to make this visible at some point?
- do we need separate configuration for plugins and containers, or could plugins take the same ns plus a suffix (e.g.
<containerd-namespace> + "p"
)?
all green now |
🤷♂
I don't see why not, actually makes it a bit simpler to implement I think. edit: fixed typo |
Ok, that's fair; I was thinking if it was too much bells and whistles, but given that it's not a "public" UX yet, we can still change if we change our minds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me
LGTM |
Is there any way to set this flag as a user? Even if it's not in the public UX? |
@Rid Yes, this PR adds the |
@thaJeztah we're running a public docker cloud, where each user is assigned a docker daemon and we'd like as much separation between users as possible for security reasons. |
@Rid It's not really the intention to provide secure isolation with this. We just needed a mechanism to do this for tests and these flags are not guaranteed to be supported going forward. |
@cpuguy83 is it something that you'd consider supporting, given that it's useful in the use case where you're running multiple daemons per machine? |
@Rid It's definitely something I'd like to do, but I'm not sure these flags are the right place for that, and definitely not until after we have moved to totally using containerd. |
This allows our tests, which all share a containerd instance, to be a
bit more isolated by setting the containerd namespaces to the generated
daemon ID's rather than the default namespaces.
This came about because I found in some cases we had test daemons
failing to start (really very slow to start) because it was (seemingly)
processing events from other tests.