-
Notifications
You must be signed in to change notification settings - Fork 949
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
feature: make lxcfs configurable supportd in CRI #2210
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2210 +/- ##
==========================================
- Coverage 64.9% 64.79% -0.12%
==========================================
Files 208 208
Lines 16722 16728 +6
==========================================
- Hits 10854 10839 -15
- Misses 4519 4531 +12
- Partials 1349 1358 +9
|
Do we need to cover this in the CRI changelog of Documentation? @starnop |
cri/v1alpha2/cri.go
Outdated
@@ -273,11 +274,14 @@ func (c *CriManager) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox | |||
} | |||
} | |||
|
|||
enableLxcfs, _ := strconv.ParseBool(config.Annotations[anno.LxcfsEnabled]) |
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.
What will happen if config.Annotations[anno.LxcfsEnabled]
is invalid and the parsing returns a non-nil error? @starnop
@@ -17,6 +17,9 @@ type SandboxMeta struct { | |||
|
|||
// Runtime is the runtime of sandbox | |||
Runtime string | |||
|
|||
// Runtime whether to enable lxcfs for a container | |||
LxcfsEnabled bool |
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.
How about v1alpha1?
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.
@allencloud Support for CRI functionality extensions is only available for v1alpha2, WDYT?
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.
OK, I am OK on it. We need to tell all these details to the users. About the change, about incompatibility, or a plan when to abandon v1apha1.
With respect to CRI's support for the annotation field, I thought it would be nice to create a new document to record these changes. |
It could not be better if we do this. |
Signed-off-by: Starnop <[email protected]>
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 @starnop we can add test if we introduce the end -2-end test #2198
ping @YaoZengzeng
LGTM |
Signed-off-by: Starnop [email protected]
Ⅰ. Describe what this PR did
Support resource review isolation via lxcfs in CRI Manager.
And define the specific naming in annotations:
LxcfsEnabled = "io.kubernetes.lxcfs.enabled"
Ⅱ. Does this pull request fix one issue?
fixes #2172
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
None.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews