Skip to content

Commit b7ea748

Browse files
drivebyercndoit18
authored andcommitted
fix: operator sa have no access to mysqlbackups/status
1 parent 8b5fffb commit b7ea748

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1414
### Removed
1515
### Fixed
1616
* `orchestrator.secretName` is ignored in helm charts
17+
* Operator service account have no access to update mysqlbackups/status
1718

1819
## [0.6.1] - 2021-12-22
1920
### Changed

config/rbac/role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ rules:
7676
- mysql.presslabs.org
7777
resources:
7878
- mysqlbackups
79+
- mysqlbackups/status
7980
verbs:
8081
- create
8182
- delete

deploy/charts/mysql-operator/templates/clusterrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ rules:
7676
- mysql.presslabs.org
7777
resources:
7878
- mysqlbackups
79+
- mysqlbackups/status
7980
verbs:
8081
- create
8182
- delete

pkg/controller/mysqlbackup/mysqlbackup_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ type ReconcileMysqlBackup struct {
101101

102102
// Automatically generate RBAC rules to allow the Controller to read and write Deployments
103103
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete
104-
// +kubebuilder:rbac:groups=mysql.presslabs.org,resources=mysqlbackups,verbs=get;list;watch;create;update;patch;delete
104+
// +kubebuilder:rbac:groups=mysql.presslabs.org,resources=mysqlbackups;mysqlbackups/status,verbs=get;list;watch;create;update;patch;delete
105105

106106
// Reconcile reads that state of the cluster for a MysqlBackup object and makes changes based on the state read
107107
// and what is in the MysqlBackup.Spec

0 commit comments

Comments
 (0)