-
Notifications
You must be signed in to change notification settings - Fork 143
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
Modify generate API #169
Conversation
Signed-off-by: Haiyan Meng <hmeng@redhat.com>
@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 |
@@ -461,14 +456,9 @@ func (g *Generator) ClearLinuxSysctl() { | |||
} | |||
|
|||
// 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 <hmeng@redhat.com>
Signed-off-by: Haiyan Meng <hmeng@redhat.com>
@mrunalp , PTAL. |
LGTM |
Signed-off-by: Haiyan Meng <hmeng@redhat.com> Backported to v1.0.0.rc1 from a217d8c opencontainers#169 (cherry-pick applied cleanly). Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Haiyan Meng <hmeng@redhat.com> Backported to v1.0.0.rc1 from b31cc61 opencontainers#169 (cherry-pick applied cleanly). Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Haiyan Meng <hmeng@redhat.com> Backported to v1.0.0.rc1 from a99f698 opencontainers#169 (cherry-pick applied cleanly). Signed-off-by: W. Trevor King <wking@tremily.us>
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 hmeng@redhat.com