-
Notifications
You must be signed in to change notification settings - Fork 237
Independent mysql-agent ClusterRole and RBAC #121
Conversation
Separates the mysql-operator and mysql-agent ClusterRoles and scopes the RBAC to the minimal permissions required by each.
@@ -29,12 +27,11 @@ import ( | |||
) | |||
|
|||
// StatefulSetControlInterface defines the interface that the | |||
// MySQLClusterController uses to create, update, and delete StatefulSets. It | |||
// MySQLClusterController uses to create and update StatefulSets. It |
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.
MySQLClusterController uses [this interface] to create
@@ -29,12 +27,11 @@ import ( | |||
) | |||
|
|||
// StatefulSetControlInterface defines the interface that the | |||
// MySQLClusterController uses to create, update, and delete StatefulSets. It | |||
// MySQLClusterController uses to create and update StatefulSets. It | |||
// is implemented as an interface to enable testing. | |||
type StatefulSetControlInterface interface { | |||
CreateStatefulSet(ss *apps.StatefulSet) error |
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.
Ideally we'd rename CreateStatefulSet to align with the name changes to PatchStatefulSet below i.e.
m.statefulSetControl.Patch
m.statefulSetControl.Create(...)
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’m actually planning a follow on to remove all the control interfaces and just use the client directly. With the fake client we don’t need the interfaces for testing and they just add a bunch of complexity and indirection.
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.
Changes are good. Some minor commentary on ensuring we maintain naming consistency in interfaces etc.
Separates the
mysql-operator
andmysql-agent
ClusterRoles and scopes the RBAC to the minimal permissions required by each.Changelog