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

e2e: Only create PSP if RBAC is enabled #56382

Merged
merged 2 commits into from
Jan 4, 2018

Conversation

mikkeloscar
Copy link
Contributor

@mikkeloscar mikkeloscar commented Nov 27, 2017

What this PR does / why we need it: Creating privileged PSPs during e2e tests depends on RBAC being enabled in the target cluster. However it is possible to use PSPs without having RBAC enabled thus only enable creating PSPs during e2e tests if both PSP and RBAC is enabled.

Fix #57840

Special notes for your reviewer:

Release note:

Only create Privileged PSP binding during e2e tests if RBAC is enabled.

Using PSP in e2e tests depend on RBAC being enabled in the cluster and
thus PSP should only be used when RBAC is.
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 27, 2017
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 27, 2017
@dixudx
Copy link
Member

dixudx commented Nov 27, 2017

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 27, 2017
@mikkeloscar
Copy link
Contributor Author

Flake #56262

@php-coder
Copy link
Contributor

CC @tallclair

@@ -97,7 +97,7 @@ var (
)

func CreatePrivilegedPSPBinding(f *Framework, namespace string) {
if !IsPodSecurityPolicyEnabled(f) {
if !IsPodSecurityPolicyEnabled(f) || !IsRBACEnabled(f) {
Copy link
Member

Choose a reason for hiding this comment

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

If the PSP is enabled, but RBAC is disabled, it probably means the cluster is using ABAC or allow all. In either case, we still want to create the PSP to avoid breaking things, we just don't need to bind it, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In our case we are using a custom authorization webhook instead of RBAC which is ofc. a bit special. I will try and see how it works if only the binding is skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tallclair changed it to only create the binding if RBAC is enabled, but always create the PSP PTAL.

@fejta
Copy link
Contributor

fejta commented Dec 6, 2017

/unassign @fejta @spiffxp
/assign @tallclair

@k8s-ci-robot k8s-ci-robot assigned tallclair and unassigned spiffxp and fejta Dec 6, 2017
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 16, 2017
@kubernetes kubernetes deleted a comment from k8s-github-robot Dec 16, 2017
@tallclair
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 18, 2017
@spiffxp
Copy link
Member

spiffxp commented Dec 27, 2017

/approve

@mikkeloscar
Copy link
Contributor Author

/retest

@mikkeloscar
Copy link
Contributor Author

/approve no-issue

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mikkeloscar, spiffxp, tallclair

Associated issue: #57840

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your 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 Jan 4, 2018
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 56382, 57549). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit a1db943 into kubernetes:master Jan 4, 2018
@mikkeloscar mikkeloscar deleted the e2e-psp-and-rbac branch January 4, 2018 14:40
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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants