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

✨ (go/v3) change 'runAsUser: 65532' to 'runAsNonRoot: true' #1978

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

estroz
Copy link
Contributor

@estroz estroz commented Jan 27, 2021

This PR changes the manager pod template's security context runAsUser: 65532 to runAsNonRoot: true. User 65532 is already specified in a project's Dockerfile which the security context uses when runAsUser is unset, making the security context's value redundant (and prone to drift if that value is changed in the Dockerfile) in kubebuilder's case.

Signed-off-by: Eric Stroczynski [email protected]

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 27, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 27, 2021
@estroz
Copy link
Contributor Author

estroz commented Jan 27, 2021

/retest

1 similar comment
@estroz
Copy link
Contributor Author

estroz commented Jan 27, 2021

/retest

Copy link
Contributor

@Adirio Adirio left a comment

Choose a reason for hiding this comment

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

LGTM (not adding the label too early to let others review it if needed as it is already aproved)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Adirio, estroz

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

@camilamacedo86
Copy link
Member

IMO to allow it gets merged, we need to ensure that after that the following error will not be faced.

Error: container has runAsNonRoot and image has non-numeric user (nonroot), cannot verify user is non-root

It was the motivation for the change raised in #1637.

So, we would need to check it with @harpratap.

@harpratap could you please let us know if after this change the above error will be faced? Are you ok with?

c/c @estroz @Adirio

@estroz
Copy link
Contributor Author

estroz commented Jan 28, 2021

@camilamacedo86 both the conditions listed in #1637 no longer hold (both Dockerfiles now specify non-root user IDs) so this will work with a restrictive pod security policy. You can check this yourself by applying the one specified in the issue.

@camilamacedo86
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 Jan 28, 2021
@k8s-ci-robot k8s-ci-robot merged commit 14b27b4 into kubernetes-sigs:master Jan 28, 2021
@harpratap
Copy link
Contributor

@camilamacedo86 @estroz The changes lgtm

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants