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

Tutorials for Pod Security Admission #30422

Merged
merged 2 commits into from
Dec 9, 2021

Conversation

PushkarJ
Copy link
Member

@PushkarJ PushkarJ commented Nov 9, 2021

Creates a two part tutorial for Pod Security Admission with KinD:

  • Applying Pod Security Standards at Cluster level
  • Applying Pod Security Standards at Namespace level

/kind documentation

Notes for reviewers:

  • kind node image for v1.23 is not yet available here: https://hub.docker.com/r/kindest/node/tags
  • So the steps here are documented by building a kind Node image from source
  • We could hold this PR until v1.23 tag lands for kind or I can add a step / link on how to build Node image from source
  • Once v1.23 lands, can update the tutorial to reflect the correct version instead of latest tag

(open to feedback on other ways to tackle this of course :) )

Initial slack discussion: https://kubernetes.slack.com/archives/C1J0BPD2M/p1636152420159200

@k8s-ci-robot k8s-ci-robot added kind/documentation Categorizes issue or PR as related to documentation. 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. labels Nov 9, 2021
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Nov 9, 2021
@PushkarJ
Copy link
Member Author

PushkarJ commented Nov 9, 2021

@PushkarJ
Copy link
Member Author

PushkarJ commented Nov 9, 2021

/sig security

@k8s-ci-robot k8s-ci-robot added the sig/security Categorizes an issue or PR as relevant to SIG Security. label Nov 9, 2021
@PushkarJ PushkarJ changed the title Draft: Tutorial for pod security admission WIP: Tutorial for pod security admission Nov 9, 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 Nov 9, 2021
@netlify
Copy link

netlify bot commented Nov 9, 2021

✔️ Deploy Preview for kubernetes-io-main-staging ready!

🔨 Explore the source changes: d1e2545

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/61b03ec9cc4dd20008ce01fe

😎 Browse the preview: https://deploy-preview-30422--kubernetes-io-main-staging.netlify.app

@PushkarJ PushkarJ force-pushed the psa-tutorial branch 3 times, most recently from a81b779 to 53da735 Compare November 9, 2021 19:27
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 15, 2021

CLA Signed

The committers are authorized under a signed CLA.

Copy link
Contributor

@shannonxtreme shannonxtreme left a comment

Choose a reason for hiding this comment

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

Structural review. I'll do a content review after we have hashed out some of the structural changes :)

Thank you for this PJ!!

content/en/docs/tutorials/_index.md Outdated Show resolved Hide resolved
content/en/docs/tutorials/pod-security/ns-level-pss.md Outdated Show resolved Hide resolved
content/en/docs/tutorials/pod-security/_index.md Outdated Show resolved Hide resolved
@PushkarJ PushkarJ changed the title WIP: Tutorial for pod security admission Tutorials for Pod Security Admission Nov 18, 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 Nov 18, 2021
@PushkarJ
Copy link
Member Author

/hold

Until merge timelines are aligned as per this comment: #30502 (comment)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2021
Fixed nits, broken links and numbering

Co-authored-by: Tim Bannister <tim@scalefactory.com>
Co-authored-by: Shannon Kularathna <ax3shannonkularathna@gmail.com>
Co-authored-by: Jim Angel <jimangel@users.noreply.github.com>
@PushkarJ
Copy link
Member Author

PushkarJ commented Dec 8, 2021

@sftim sftim dismissed their stale review December 8, 2021 12:20

All addressed I think - thanks @PushkarJ

@sftim
Copy link
Contributor

sftim commented Dec 8, 2021

/check-cla
/easycla

@sftim
Copy link
Contributor

sftim commented Dec 8, 2021

Hold from #30422 (comment) should stand until the blog article publishes.

Any time after 16:05 Pacific time on the 8th of December should be good to go, as the related blog article goes live at UTC midnight on the 9th.
It's also OK to PR an update to the publication time of that article if that makes the sync easier.

@sftim
Copy link
Contributor

sftim commented Dec 8, 2021

This is ready for a technical signoff from SIG Auth. It's already been through quite a few checks, including by me, so what I'm looking for is a final read-through and a formal /lgtm providing no concerns spotted.
In other words, there is no need to go through each step to verify.

Page previews:

LGTM for SIG Docs, and #30422 (review) implies it also looks good to @shannonxtreme

@sftim
Copy link
Contributor

sftim commented Dec 8, 2021

/remove-label tide/merge-method-squash

Commits are already squashed

@k8s-ci-robot k8s-ci-robot removed the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Dec 8, 2021
Comment on lines +2 to +3
# Until v1.23 is released, kind node image needs to be built from k/k master branch
# Ref: https://kind.sigs.k8s.io/docs/user/quick-start/#building-images
Copy link
Contributor

Choose a reason for hiding this comment

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

femtonit: the release has happened (very happy to fix this in a follow-up PR, though)

1. Configure the API server to consume this file during cluster creation:

```
cat <<EOF > /tmp/pss/cluster-config.yaml
Copy link
Member

Choose a reason for hiding this comment

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

is /tmp a good location for cluster confit files? I'm not sure what the typical permissions there are (or if files in /tmp are subject to automated cleanup/removal)

@@ -0,0 +1,70 @@
#!/bin/sh
mkdir -p /tmp/pss
cat <<EOF > /tmp/pss/cluster-level-pss.yaml
Copy link
Member

Choose a reason for hiding this comment

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

same question about using /tmp

pod-security.kubernetes.io/warn-version=latest
```

2. Multiple pod security standards can be enabled on any namespace, using labels.
Copy link
Member

Choose a reason for hiding this comment

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

it might be worth noting that if this is an existing namespace that already contains workloads, using --dry-run=server is recommended first to determine if the new policy levels will disrupt existing workloads

@liggitt
Copy link
Member

liggitt commented Dec 8, 2021

Technical content lgtm, had a non-blocking question about use of tmp and suggestion about calling out use of dry-run

@sftim
Copy link
Contributor

sftim commented Dec 8, 2021

Thanks @liggitt

Taking #30422 (comment) as
/lgtm

We can do a follow-up PR. I agree about taking care about using /tmp. There might be a way to improve on this.

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

LGTM label has been added.

Git tree hash: 377841f45aca39355245243a3391e41bda229ba5

@shannonxtreme
Copy link
Contributor

shannonxtreme commented Dec 8, 2021 via email

@PushkarJ
Copy link
Member Author

PushkarJ commented Dec 9, 2021

Blog is now published https://kubernetes.io/blog/2021/12/09/pod-security-admission-beta/

/hold remove

@PushkarJ
Copy link
Member Author

PushkarJ commented Dec 9, 2021

/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 Dec 9, 2021
@k8s-ci-robot k8s-ci-robot merged commit aa848ab into kubernetes:main Dec 9, 2021
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/documentation Categorizes issue or PR as related to documentation. 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants