-
Notifications
You must be signed in to change notification settings - Fork 142
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
Fix security-context for apiserver - audit logs are supported only in Enterprise version #2906
Fix security-context for apiserver - audit logs are supported only in Enterprise version #2906
Conversation
7e081ef
to
6427e23
Compare
Have you tested this out in a real system (I'm guessing so because of your other PRs)? |
…, it shall run as non-root Signed-off-by: Adam Mihelcsik <18672841+mihivagyok@users.noreply.github.com>
6427e23
to
f962a05
Compare
@tmjd I will get back to you with some test result tomorrow! Thanks! |
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.
LGTM
/sem-approve |
Seems it is not really working. Try to figure out why: |
That permission error could be caused by https://github.com/projectcalico/calico/blob/release-v3.27/apiserver/docker-image/Dockerfile.amd64#L11 so the recreated The |
@hjiawei Thanks for pointing out! Also, I don't really understand the comment here. https://github.com/projectcalico/calico/blob/release-v3.27/apiserver/docker-image/Dockerfile.amd64#L8 For me, it seems it does nothing special with Thanks! |
Yeah. You are right about this @mihivagyok . It is related to |
With latest changes:
|
This change backports changes from [1] for `calico/apiserver` only to fix the `/tmp` folder permission. Currently, when `/tmp` folder is copied form ubi stage to scratch, the folder permission is 0755 so it isn't writable for non-root processes. With the changes in [2], apiserver won't be ready because `/tmp/ready` flag can't be written. [1] #8299 [2] tigera/operator#2906
This change backports changes from [1] for `calico/apiserver` only to fix the `/tmp` folder permission. Currently, when `/tmp` folder is copied form ubi stage to scratch, the folder permission is 0755 so it isn't writable for non-root processes. With the changes in [2], apiserver won't be ready because `/tmp/ready` flag can't be written. [1] #8299 [2] tigera/operator#2906
This change backports changes from [1] for `calico/apiserver` only to fix the `/tmp` folder permission. Currently, when `/tmp` folder is copied form ubi stage to scratch, the folder permission is 0755 so it isn't writable for non-root processes. With the changes in [2], apiserver won't be ready because `/tmp/ready` flag can't be written. [1] #8299 [2] tigera/operator#2906
This change backports changes from [1] for `calico/apiserver` only to fix the `/tmp` folder permission. Currently, when `/tmp` folder is copied form ubi stage to scratch, the folder permission is 0755 so it isn't writable for non-root processes. With the changes in [2], apiserver won't be ready because `/tmp/ready` flag can't be written. [1] #8299 [2] tigera/operator#2906
AFAICT we're still waiting to drop the last/2nd commit that added an emptyDir volume. |
@tmjd Let me revert those. Sorry for the delay! |
6c3ecea
to
f962a05
Compare
/sem-approve |
All tests are passed :) Thank you! |
Thank you @mihivagyok for this PR |
…-oss-openshift Fix security-context for apiserver - audit logs are supported only in Enterprise version
…-oss-openshift Fix security-context for apiserver - audit logs are supported only in Enterprise version
…-oss-openshift Fix security-context for apiserver - audit logs are supported only in Enterprise version
…penshift (#3310) Fix security-context for apiserver - audit logs are supported only in Enterprise version Co-authored-by: Erik Stidham <erik@tigera.io>
Description
kind/bug
It fixes the case when the operator installs apiserver OSS version. In case of OSS Calico, it shall run as non-root as audit logs are only supported in Enterprise version.
The change makes apiserver deployment more secure (least privilege).
For PR author
make gen-files
make gen-versions
For PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bug
if this is a bugfix.kind/enhancement
if this is a a new feature.enterprise
if this PR applies to Calico Enterprise only.