Skip to content

Commit 95d57d4

Browse files
committed
Fix RBAC creation
1 parent eb53a4e commit 95d57d4

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Diff for: config/rbac/role.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ kind: ClusterRole
44
metadata:
55
name: manager-role
66
rules:
7+
- apiGroups:
8+
- coordination.k8s.io
9+
resources:
10+
- leases
11+
verbs:
12+
- create
13+
- get
14+
- update
715
- apiGroups:
816
- db.movetokube.com
917
resources:
@@ -56,11 +64,3 @@ rules:
5664
- get
5765
- patch
5866
- update
59-
- apiGroups:
60-
- coordination.k8s.io
61-
resources:
62-
- leases
63-
verbs:
64-
- create
65-
- get
66-
- update

Diff for: internal/controller/postgres_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ func (r *PostgresReconciler) GetPrefixedDbName(dbname string) string {
6565
//+kubebuilder:rbac:groups=db.movetokube.com,resources=postgres,verbs=get;list;watch;create;update;patch;delete
6666
//+kubebuilder:rbac:groups=db.movetokube.com,resources=postgres/status,verbs=get;update;patch
6767
//+kubebuilder:rbac:groups=db.movetokube.com,resources=postgres/finalizers,verbs=update
68+
//+kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=create;get;update
6869

6970
// Reconcile is part of the main kubernetes reconciliation loop which aims to
7071
// move the current state of the cluster closer to the desired state.

0 commit comments

Comments
 (0)