Skip to content

Conversation

@pjbgf
Copy link
Member

@pjbgf pjbgf commented May 7, 2020

Amendments around RuntimeProfile and LocalhostProfile on Tim's initial KEP. The goal remains unchanged: to do the bare minimum to clean up the feature, without blocking future enhancements.

/sig-node
/sig-auth

/priority important-longterm

/assign @liggitt @dchen1107 @derekwaynecarr @tallclair
/cc @jessfraz

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label May 7, 2020
@k8s-ci-robot k8s-ci-robot requested a review from jessfraz May 7, 2020 12:00
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/node Categorizes an issue or PR as relevant to SIG Node. labels May 7, 2020
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Looks pretty good and I like the deprecation of the docker/default profile.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 7, 2020
Copy link
Member

@tallclair tallclair left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

@k8s-ci-robot k8s-ci-robot requested a review from liggitt May 7, 2020 20:03
Copy link

@evrardjp evrardjp left a comment

Choose a reason for hiding this comment

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

I see this as a positive improvement.

I agree with @tallclair on the need to clarify the LocalhostProfile section, for posterity.

I am looking forward to see more eyes on the Localhost Profile Validation section too.

@tallclair tallclair mentioned this pull request May 9, 2020
22 tasks
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2020
@pjbgf pjbgf requested a review from tallclair May 10, 2020 07:09
@pjbgf
Copy link
Member Author

pjbgf commented May 12, 2020

@palnabarun I have added the PRR as you asked. There are a few points TBC, but the majority should be there now.

@palnabarun
Copy link
Member

@johnbelamaric Can you please have a look at the PRR questions once? 🙂

Copy link
Member

@tallclair tallclair left a comment

Choose a reason for hiding this comment

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

Added a few clarifications, but this basically lgtm

@tallclair
Copy link
Member

/lgtm
/approve

/hold
For @liggitt 's review of the tightening validation approach.

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels May 18, 2020
@tallclair
Copy link
Member

Also @derekwaynecarr for KEP approval.

Comment on lines 200 to 202
// LocalhostProfile must be 100 characters or less, beginning and ending with an alphanumeric
// character ([a-z0-9A-Z]). It may include forward slashes (/), underscores (_), dashes (-) and dots (.)
// between alphanumeric characters.
Copy link
Member

Choose a reason for hiding this comment

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

this is more restrictive than the current annotation... what happens to annotations that do not fit inside these restrictions?

Copy link
Member

Choose a reason for hiding this comment

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

the annotation validation also disallows .. path segments, and does not allow starting with a /

Copy link
Member

Choose a reason for hiding this comment

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

how was the 100 character limit selected?

Copy link
Member Author

Choose a reason for hiding this comment

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

The character limit selected was mostly to decrease the likelihood of going over the max file path in some systems. After reviewing this point, I realised that the limitation on most FSs is around file name length, which would fit the current rules.

I will revert this, to keep the existing validation and simply formalise it on the documentation.

Comment on lines 428 to 431
migrated, the same warning annotation will be added to the controller as for pods:

```
warning.kubernetes.io/seccomp: "Seccomp set through annotations. Support will be dropped in v1.22"
warning.kubernetes.io/seccomp: "Seccomp set through annotations. Support will be dropped in v1.23"
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit unusual... I'm not sure we want to annotate like this. There's not a great central place to sweep all workload objects that contain pod templates to get them to mutate this correctly.

  • Would we warn if a workload object had both the annotation and the seccomp field set?
  • If an update dropped the seccomp annotation, would we clear the warning?
  • Would tying this to an actual warning make more sense once that mechanism is available in 1.19?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is reasonable. I have added a reference to the warning mechanism.

Given that today is KEP freeze, and this is the only open point, I wonder whether it would be OK to leave as is (with the reference) and I will follow up with a new PR with the details around the warning?

Copy link
Member

Choose a reason for hiding this comment

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

Reword this to commit to avoid committing to a specific warning method. You can mention possible mechanisms like a metric, an audit annotation, an annotation on the object, an event, or a warning as described in KEP 1693

Copy link
Member Author

Choose a reason for hiding this comment

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

Added reference to the different mechanisms and removed the previous example.

Copy link
Member

@derekwaynecarr derekwaynecarr left a comment

Choose a reason for hiding this comment

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

I would like to clarify that the flag @liggitt noted is also promoted to GA.

Comment on lines 259 to 260
Promoting LocalhostProfile to GA signals to the community that this is a feature they can use and rely on,
until a better option materializes. If and when that happens, a new KEP will be created accordingly.
Copy link
Member

Choose a reason for hiding this comment

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

since we are trying to do a kep per feature, any enhancement post GA is new feature and new kep, so agree that we dont need to promise future enhancements.

## Alternatives

### Localhost profiles
The localhost feature currently depends on an alpha Kubelet flag. We could therefore label the
Copy link
Member

Choose a reason for hiding this comment

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

i would like this clarified as well.

the kubelet uses this to build a path like localhost/<some-dir>/<name> when passing the seccompfile path down to sandbox creation flows.

@pjbgf
Copy link
Member Author

pjbgf commented May 19, 2020

Covered all the open points and squashed the commits. PTAL @tallclair @derekwaynecarr @liggitt

Comment on lines 337 to 305
### Seccomp root path configuration

The existing kubelet (alpha) flag `--seccomp-profile-root` allows for seccomp root path configuration.
This flag will be marked as deprecated as of v1.19, and will be removed on v1.23.
The seccomp root path will then be derived from the kubelet root path, which is defined by `--root-dir`.

Copy link
Member Author

Choose a reason for hiding this comment

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

@derekwaynecarr @liggitt @tallclair this is the new paragraph on '--seccomp-profile-root' being deprecated.

Copy link
Member

Choose a reason for hiding this comment

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

nit: note that the default value for the --seccomp-profile-root is <root-dir>/seccomp. So the proposal is to make the default behavior the only behavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added that information to the same section.

Copy link
Member

Choose a reason for hiding this comment

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

I am happy with that.

@tallclair
Copy link
Member

Spoke with @liggitt offline, and he convinced me that we should drop the PodSecurityPolicy API changes for now. Basically, the PSP implementation needs to be updated to enforce the policy on the new pod fields, but the API on the PSP will still be through annotations. If PSP sticks around, we can always add the API back later. Rather than deleting everything we have about the PSP API, can you just move it to the "alternatives considered" section?

@pjbgf
Copy link
Member Author

pjbgf commented May 19, 2020

@tallclair okie dokie, making the changes now.

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 19, 2020
@pjbgf
Copy link
Member Author

pjbgf commented May 19, 2020

@liggitt @tallclair moved the PSP API changes to alternatives.

@liggitt
Copy link
Member

liggitt commented May 19, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2020
Copy link
Member

@derekwaynecarr derekwaynecarr left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: derekwaynecarr, pjbgf, tallclair

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 19, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2020
@pjbgf
Copy link
Member Author

pjbgf commented May 19, 2020

Based on feedback I marked it as implementable.

pjbgf added 2 commits May 19, 2020 23:45
GA flag. Update validation. Update warnings.
Move PSP API to alternatives
@tallclair
Copy link
Member

/lgtm

I think @derekwaynecarr gets the final say as sig-node lead.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2020
@liggitt
Copy link
Member

liggitt commented May 20, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 20, 2020
@k8s-ci-robot k8s-ci-robot merged commit dc72918 into kubernetes:master May 20, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone May 20, 2020
@pjbgf pjbgf deleted the seccomp-ga branch May 20, 2020 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants