Closed Aransh closed 2 weeks ago
/assign @ChenYi015
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: ChenYi015, ImpSy, malki-akamai
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/lgtm
Purpose of this PR
By default, kubernetes enables "automountServiceAccountToken" for all pods. This poses a security risk, as pods might get kube-api permissions unintentionally. More specifically, this fails security compliance tests: https://learn.microsoft.com/en-us/azure/governance/policy/samples/built-in-policies https://www.azadvertizer.net/azpolicyadvertizer/kubernetes_block-automount-token.html
Solution - Disable "automountServiceAccountToken", create projected volume for the token, and mount it on relevant containers
Fixes https://github.com/kubeflow/spark-operator/issues/1189
Proposed changes:
Change Category
Rationale
Checklist
Additional Notes
While default behavior remains unchanged, and anyone disabling "automountServiceAccountToken" should know the consequences (as this is a standard k8s feature, not a spark-operator one), I am adding an example values file for deploying the operator with it disabled: