-
Notifications
You must be signed in to change notification settings - Fork 159
Modify generate API #169
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
Modify generate API #169
Conversation
Signed-off-by: Haiyan Meng <[email protected]>
|
@mrunalp , PTAL. |
|
@mrunalp , to make it easy for you to test the PR, here is the test command for testing all the changed functions in this PR: |
|
LGTM |
generate/generate.go
Outdated
|
|
||
| // AddLinuxSysctl adds a new sysctl config into g.spec.Linux.Sysctl. | ||
| func (g *Generator) AddLinuxSysctl(s string) error { | ||
| func (g *Generator) AddLinuxSysctl(key, value string) error { |
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.
It seems this function does not need return error any more. Same as other AddXXXX() function.
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.
@Mashimiao , thanks for pointing out. Fixed it. PTAL.
I also change the param of AddProcessAdditionalGid from string to uint32.
Signed-off-by: Haiyan Meng <[email protected]>
Signed-off-by: Haiyan Meng <[email protected]>
|
@mrunalp , PTAL. |
|
LGTM |
Signed-off-by: Haiyan Meng <[email protected]> Backported to v1.0.0.rc1 from a217d8c opencontainers#169 (cherry-pick applied cleanly). Signed-off-by: W. Trevor King <[email protected]>
Signed-off-by: Haiyan Meng <[email protected]> Backported to v1.0.0.rc1 from b31cc61 opencontainers#169 (cherry-pick applied cleanly). Signed-off-by: W. Trevor King <[email protected]>
Signed-off-by: Haiyan Meng <[email protected]> Backported to v1.0.0.rc1 from a99f698 opencontainers#169 (cherry-pick applied cleanly). Signed-off-by: W. Trevor King <[email protected]>
This PR tries to make the generate API easier to use. For example, instead of feeding a whole string to
AddAnnotation, the new API allows the user to feed a key and a value toAddAnnotation.Note: This PR does not touch any seccomp-relative function to avoid conflicts with Grant's work.
Signed-off-by: Haiyan Meng [email protected]