-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Pod Security Policies #3498
Pod Security Policies #3498
Conversation
2d1d894
to
8a2e562
Compare
/assign @gambol99 |
i'm gonna leave this one as WIP for now and perhaps offline chat on it. The experience of PSP hasn't been great and at present there a number of outstanding PR's targeted for a 1.8.x release to make this admission controller more user friendly.
|
@gambol99 is this something that you are working on? Just grooming old PRs |
apologizes for the delay @chrislovecnm ... currently away for xmas in italy so trying to stay away from a laptop :-) .. The PR was functional, the issue was due to problem with the admission controller itself. Effectively if you had a user or service account which via rbac can see all policies (i.e. pretty much most things deployed in kube-system as it was deployed via an cluster wide admin) the controller will randomly pick a policy. So there's a percentage of pods restarted which will end up with a policy which might conflict. In our case a few restarts of kube-dns would fail due to the RunAsNonRoot requirement. Their we two PR's which fix this behavior, one which orders the policy via name and the other which add's a priority field to the policies. Both are scheduled for a 1.9 release .. |
@gambol99 PR needs rebase |
aed819f
to
07d18b1
Compare
The current implementation doesn't work with PodSecurityPolicies enabled due to no psp policies. This PR adds a default psp policy for the kubelet users and and the kube-system namespace
@justinsb @chrislovecnm ... since >= 1.9.0 this one is good to go as the issue effecting pods who's rbac permits seeing multiple policies has been fixed |
Version: fi.String(version), | ||
Selector: map[string]string{"k8s-addon": key}, | ||
Manifest: fi.String(location), | ||
KubernetesVersion: ">=1.6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can i just change this to >=1.9.0 @justinsb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah probably best to lock down to k8s 1.9+, also update the template name to match (and the references to it on L119 - L120)
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gambol99, KashifSaadat 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 |
/test pull-kops-bazel-build |
The current implementation doesn't work with PodSecurityPolicies admission controller enabled due to no psp policies. This PR adds a default psp policy for the kubelet users and and the kube-system namespace.
I still need to test this with 1.8.0; thus far only 1.7.2 / 1.7.7 has been tested