Skip to content
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

Specific cap-add and cap-drop command #358

Merged
merged 2 commits into from
Sep 21, 2017

Conversation

zhouhao3
Copy link

The management of each field of the specific Capabilities.

Signed-off-by: zhouhao [email protected]

@zhouhao3 zhouhao3 force-pushed the cap-specific branch 2 times, most recently from 935173f to 590d32a Compare May 8, 2017 05:47
@Mashimiao
Copy link

need rebase

@zhouhao3 zhouhao3 force-pushed the cap-specific branch 3 times, most recently from 9f785cd to 3c1bfc1 Compare July 19, 2017 07:08
@zhouhao3
Copy link
Author

updated.

@@ -77,7 +77,17 @@ var generateFlags = []cli.Flag{
cli.StringFlag{Name: "output", Usage: "output file (defaults to stdout)"},
cli.BoolFlag{Name: "privileged", Usage: "enable privileged container settings"},
cli.StringSliceFlag{Name: "process-cap-add", Usage: "add Linux capabilities"},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

process-cap-add, process-cap drop should be removed

return err
}

g.initSpec()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be g.initSpecProcessCapabilities()

@@ -277,9 +277,39 @@ read the configuration from `config.json`.
**--process-cap-add**=[]
Add Linux capabilities

**--process-cap-add-ambient**=[]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to modify completion file

@zhouhao3
Copy link
Author

updated, PTAL.

@zhouhao3
Copy link
Author

@Mashimiao @liangchenye @hqhq PTAL

// AddProcessCapability adds a process capability into g.spec.Process.Capabilities.
func (g *Generator) AddProcessCapability(c string) error {
// AddProcessAmbientCapability adds a process capability into g.spec.Process.Capabilities.Ambient.
func (g *Generator) AddProcessAmbientCapability(c string) error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we did for other generator functions, function's name should be based on spec's item order. As setting value for g.spec.Process.Capabilities.Ambient, the name should be AddProcessCapabilitiesAmbient.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Mashimiao
Copy link

Mashimiao commented Jul 31, 2017

LGTM

Approved with PullApprove

@zhouhao3
Copy link
Author

zhouhao3 commented Aug 3, 2017

ping @mrunalp @liangchenye @hqhq PTAL

@zhouhao3
Copy link
Author

ping @liangchenye

@zhouhao3
Copy link
Author

reping @opencontainers/runtime-tools-maintainers

@zhouhao3
Copy link
Author

ping @liangchenye @mrunalp

zhouhao added 2 commits September 21, 2017 15:54
@zhouhao3
Copy link
Author

rebased @Mashimiao @hqhq @liangchenye @mrunalp PTAL

@Mashimiao
Copy link

Mashimiao commented Sep 21, 2017

LGTM

Approved with PullApprove

1 similar comment
@liangchenye
Copy link
Member

liangchenye commented Sep 21, 2017

LGTM

Approved with PullApprove

@liangchenye liangchenye merged commit 01205bc into opencontainers:master Sep 21, 2017
@zhouhao3 zhouhao3 deleted the cap-specific branch September 22, 2017 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants