-
Notifications
You must be signed in to change notification settings - Fork 237
Conversation
resources: | ||
- secrets | ||
verbs: | ||
- get |
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.
This is a problem when cluster scoped. Can we remove this one?
verbs: | ||
- get | ||
- create | ||
- delete |
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.
Shouldn't be needed
- list | ||
- watch | ||
- create | ||
- delete |
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.
Shouldn't be needed
@@ -19,11 +19,67 @@ metadata: | |||
namespace: {{ .Values.operator.namespace}}{{ end }} | |||
rules: |
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.
We need two ClusterRoles: mysql-agent
and mysql-operator
as the components require different permissions (principle of least privilege).
We need a ServiceAccount mysql-operator
and corresponding ClusterRoleBinding in the namespace into which the operator is being installed.
Users must create a ServiceAccount mysql-agent
and RoleBinding to the ClusterRole mysql-agnet
in each namespace they want to deploy clusters. We should not create this in the default namespace automatically but rather document the requirement clearly.
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.
See comments 🙂
Closing in favour of #121 |
This change locks down RBAC rules for the mysql-operator service account. In future we might want a separate service account for the operator and agent.