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

Add Pod Security Standards documentation #28903

Merged
merged 3 commits into from
Jul 22, 2021
Merged

Add Pod Security Standards documentation #28903

merged 3 commits into from
Jul 22, 2021

Conversation

sejr
Copy link
Contributor

@sejr sejr commented Jul 11, 2021

This PR adds documentation for Pod Security Standards.

Fixes #28721, fixes #28820, fixes #28866

This PR

  • Securing Pods with Pod Security Standards
    • Enabling feature gate
    • Configuring namespaces
    • Migrating from PSP
    • Exemptions
    • Best practices
    • Examples
      • Example namespace YAML
      • Applying labels to an existing namespace
      • Applying labels to all existing namespaces

Follow-up tasks

  • Ensure consistent language for policy levels (ie privileged baseline restricted)
  • Comb through KEP for other noteworthy callouts
    • Metrics (Beta?)
    • Scalability
      • Hard limit on # of pods analyzed
    • Looking forward
      • Baseline by default
      • Custom profiles

Related issues

@k8s-ci-robot k8s-ci-robot added this to the 1.22 milestone Jul 11, 2021
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 11, 2021
@netlify
Copy link

netlify bot commented Jul 11, 2021

👷 Deploy Preview for kubernetes-io-vnext-staging processing.

🔨 Explore the source changes: e0d4b53

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/60f83e74a325df0008b1495d

@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 11, 2021
@sejr
Copy link
Contributor Author

sejr commented Jul 11, 2021

/assign @liggitt @tabbysable (per convo w/ @tallclair)

@sejr sejr marked this pull request as ready for review July 12, 2021 03:17
@sejr sejr changed the title WIP: Add Pod Security Standards documentation [Pod Security] Add Pod Security Standards documentation Jul 12, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 12, 2021
sftim
sftim previously requested changes Jul 12, 2021
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

I'm concerned about seeing this PR propose to delete https://k8s.io/docs/concepts/security/pod-security-standards/

External projects (the likes of Kyverno) refer to these Pod security standards. It's not just in-project code that relies on them. We should keep the URL of those standards where possible: cool URIs don't change.

It's OK to document a new in-tree mechanism for enforcing that Pods follow these standards. It's important to leave a path to distinguish between the standards themselves on the one hand, and the in-tree enforcement code on the other.

@sftim
Copy link
Contributor

sftim commented Jul 12, 2021

/sig auth
/sig security

@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/security Categorizes an issue or PR as relevant to SIG Security. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 12, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2021
@sejr
Copy link
Contributor Author

sejr commented Jul 12, 2021

@sftim Very good point - reverted.

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Looking at this PR I recommend some more work on it.

If the webhook isn't available, let's leave room to add that documentation later.

nits:

  • within the page (but not the page title), write headings in sentence case
  • if you can, use glossary tooltips for any first mention of concepts, unless you're confident that readers know what these mean

content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
content/en/docs/concepts/security/securing-pods.md Outdated Show resolved Hide resolved
@sejr sejr changed the title [Pod Security] Add Pod Security Standards documentation WIP: Add Pod Security Standards documentation Jul 12, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 12, 2021
@sftim sftim dismissed their stale review July 12, 2021 14:18

Feedback was addressed

sftim
sftim previously requested changes Jul 12, 2021
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

@liggitt
Copy link
Member

liggitt commented Jul 20, 2021

#28903 (comment) is my only outstanding comment, then technical content lgtm

@liggitt
Copy link
Member

liggitt commented Jul 20, 2021

/approve
/lgtm

for technical content

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 20, 2021
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 704b45b3b56a84dfa0fcb606584940d39eeb0660

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Really good work.
/lgtm

I'll leave the release folks to approve this.

@liggitt
Copy link
Member

liggitt commented Jul 21, 2021

/assign @PI-Victor

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 21, 2021
@reylejano
Copy link
Member

re-applying lgtm after link to opa gatekeeper repo was fixed
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 21, 2021
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c2f10c36f7958065382a78014912c042127b482c

@PI-Victor
Copy link
Member

had to give this a proper read myself, thank you all for the work!

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, PI-Victor

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 Jul 22, 2021
@k8s-ci-robot k8s-ci-robot merged commit f92e3ec into kubernetes:dev-1.22 Jul 22, 2021
@liggitt liggitt mentioned this pull request Jul 22, 2021
6 tasks
@sejr sejr deleted the feat/podsecurity branch July 25, 2021 17:39
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. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/security Categorizes an issue or PR as relevant to SIG Security. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants