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

⚠️ (kustomize/v1,v2): applying restrictive SCC for all containers scaffolded by the tool (k8s versions < 1.19 does not work with) #2700

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented May 25, 2022

Description
(kustomize/v1,v2): applying restrictive SCC for all containers scaffolded by the tool

Note
If applied on clusters < 1.19 the error unknown field "seccompProfile" in io.k8s.api.core.v1.PodSecurityContext will be faced. Users still able to remove the seccompProfile if they need to provide patch releases for old versions

Motivation
Following good practices and ensuring containers are restrictive. (We want to ensure that all scaffold by default is restrictive independently if the cluster-admin enable or not for example SeccompDefault)

Heavily restricted policy, following current Pod hardening best practices."

More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted

Nice to know: from 1.22 was introduced for the SeccompDefault feature in kubelet, which allows cluster admins also set it for all pods, see: https://kubernetes.io/docs/tutorials/security/seccomp/#enable-the-use-of-runtimedefault-as-the-default-seccomp-profile-for-all-workloads

@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. labels May 25, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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 requested review from Adirio and estroz May 25, 2022 17:34
@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 25, 2022
@camilamacedo86 camilamacedo86 changed the title ✨ applying restrictive SCC for all containers scaffolded by the tool WIP: ✨ applying restrictive SCC for all containers scaffolded by the tool May 25, 2022
@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 May 25, 2022
@camilamacedo86
Copy link
Member Author

/retest

@camilamacedo86 camilamacedo86 changed the title WIP: ✨ applying restrictive SCC for all containers scaffolded by the tool ⚠️ sparkles: applying restrictive SCC for all containers scaffolded by the tool (k8s versions < 1.19 does not work with) May 25, 2022
@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 May 25, 2022
@camilamacedo86 camilamacedo86 changed the title ⚠️ sparkles: applying restrictive SCC for all containers scaffolded by the tool (k8s versions < 1.19 does not work with) ⚠️ (go/v3): applying restrictive SCC for all containers scaffolded by the tool (k8s versions < 1.19 does not work with) May 25, 2022
@camilamacedo86 camilamacedo86 force-pushed the containers-created-with-restrictive branch from 3821225 to 7f34aae Compare May 25, 2022 23:35
@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 May 26, 2022
@camilamacedo86
Copy link
Member Author

/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 27, 2022
@camilamacedo86 camilamacedo86 requested a review from FillZpp May 27, 2022 14:48
@FillZpp
Copy link

FillZpp commented May 28, 2022

/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 28, 2022
@k8s-ci-robot k8s-ci-robot merged commit 800fdee into kubernetes-sigs:master May 28, 2022
@camilamacedo86 camilamacedo86 deleted the containers-created-with-restrictive branch May 29, 2022 07:03
@camilamacedo86 camilamacedo86 changed the title ⚠️ (go/v3): applying restrictive SCC for all containers scaffolded by the tool (k8s versions < 1.19 does not work with) ⚠️ (kustomize/v1,v2): applying restrictive SCC for all containers scaffolded by the tool (k8s versions < 1.19 does not work with) May 29, 2022
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants