-
Notifications
You must be signed in to change notification settings - Fork 13
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
[teraslice, e2e] Add Kubernetes role restrictions to teraslice master #3817
Conversation
I've tested the new access controls by running a teraslice job with the new role configuration. I exec'd into the master pod, installed
Then I did the same thing in an execution pod and got this result:
Currently in the master branch, any pod in the namespace can see and interact with the k8s api. It's even possible to |
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.
Looks good, I just had a few docs suggestions.
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
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.
I think there's a minor but important improvement that can be made here, see my comment.
docs/configuration/clustering-k8s.md
Outdated
name: master-service-account | ||
namespace: <namespace> | ||
``` | ||
Make sure to reference this `ServiceAccount` in your master pod configuration by setting `spec.containers.serviceAccountName` to `master-service-account`. |
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.
master pod configuration
is probably too vague, do you mean in the deployment, or is this set somewhere else?
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.
I've refactored the whole thing to be more specific. We provide a deployment so I specified it's location within the repo and reined more specifically where it could be set.
e86253f
to
e3c4245
Compare
This PR makes the following changes:
role
to the Teraslicemaster
pod, enhancing secure access controlServiceAccount
usage, which granted all pods in the namespace full access to the Kubernetes APIRef to issue #3251