-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Set readOnlyRootFilesystem: true for the controller and webhook containers to improve default security posture #2219
base: master
Are you sure you want to change the base?
Set readOnlyRootFilesystem: true for the controller and webhook containers to improve default security posture #2219
Conversation
…its filesystem Avoid writing to the rootFileSystem of the webhook container by mounting an empty dir where the webhook creates its certs. This improves the security posture of the webhook pod by allowing a securityContext with rootFilesystemReadOnly: true. Signed-off-by: Nicholas Gretzon <[email protected]>
…ting its filesystem Avoid writing to the rootFileSystem of the controller container by mounting an empty dir where the controller downloads Spark artifacts for spark apps. This improves the security posture of the controller pod by allowing a securityContext with rootFilesystemReadOnly: true. Signed-off-by: Nicholas Gretzon <[email protected]>
…true Improve the default security posture of the Helm chart deployment by preventing writes to container filesystems now that the controller and webhook pods no longer need to write to their filesystems. Signed-off-by: Nicholas Gretzon <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Nicholas Gretzon <[email protected]>
This is already done in the deployment.yaml for the controller. Signed-off-by: Nicholas Gretzon <[email protected]>
…roller deployment Signed-off-by: Nicholas Gretzon <[email protected]>
/lgtm |
@cccsss01: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
…r tmp dir and a webhook certs dir Create the ability to disable the creation of a tmp directory for the controller pod to write Spark artifacts to when running Spark Applications and the ability to disable the creation of a directory for the webhook pod to write certificates in. Signed-off-by: Nicholas Gretzon <[email protected]>
Create logic to add a volume and volumeMount to the controller pod if controllerTmpDirectory is enabled in the values.yaml Signed-off-by: Nicholas Gretzon <[email protected]>
Create logic to add a volume and volumeMount to the webhook pod if webhookCertsDirectory is enabled in the values.yaml Signed-off-by: Nicholas Gretzon <[email protected]>
…tory Test the functionality of controllerTmpDirectory in the values.yaml to confirm the volumeMount and volume are created. The volume also should have the appropriate sizeLimit set. Signed-off-by: Nicholas Gretzon <[email protected]>
Signed-off-by: Nicholas Gretzon <[email protected]>
Test the functionality of webhookCertsDirectory in the values.yaml to confirm the volumeMount and volume are created. The volume also should have the appropriate sizeLimit set. Signed-off-by: Nicholas Gretzon <[email protected]>
Signed-off-by: Nicholas Gretzon <[email protected]>
Signed-off-by: Nicholas Gretzon <[email protected]>
Signed-off-by: Nicholas Gretzon <[email protected]>
Signed-off-by: Nicholas Gretzon <[email protected]>
… deployment Signed-off-by: Nicholas Gretzon <[email protected]>
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
🛑 Important:
Please open an issue to discuss significant work before you start. We appreciate your contributions and don't want your efforts to go to waste!
For guidelines on how to contribute, please review the CONTRIBUTING.md document.
Purpose of this PR
Provide a clear and concise description of the changes. Explain the motivation behind these changes and link to relevant issues or discussions.
By default, the controller and webhook containers write to their filesystems. DevOpSec at multiple organizations using the spark-operator chart require Kubernetes container security contexts to prohibit writing to the root filesystem ( Slack Conversation, Issue for Improved Security)
This PR will allow the spark-operator chart to be deployed with a read-only root filesystem to improve the default security posture and meet the requirements of users.
Proposed changes:
Change Category
Indicate the type of change by marking the applicable boxes:
Rationale
Multiple users of the Helm chart require an increased security posture in their Kubernetes deployments.
Checklist
Before submitting your PR, please review the following:
Additional Notes