From 155d29ebc12960f70defcf177059bc1176296e92 Mon Sep 17 00:00:00 2001 From: Joe Stephenson Date: Mon, 16 May 2022 10:12:39 +0100 Subject: [PATCH] fix psp fix (#134) Co-authored-by: Joe Stephenson --- config/rbac/bases/role.yaml | 12 ++++++------ main.go | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/rbac/bases/role.yaml b/config/rbac/bases/role.yaml index a22672aa..0440f45d 100644 --- a/config/rbac/bases/role.yaml +++ b/config/rbac/bases/role.yaml @@ -6,12 +6,6 @@ metadata: creationTimestamp: null name: storageos-api-manager rules: -- apiGroups: - - extensions - resources: - - podsecuritypolicies - verbs: - - use - apiGroups: - "" resources: @@ -190,6 +184,12 @@ rules: - patch - update - watch +- apiGroups: + - extensions + resources: + - podsecuritypolicies + verbs: + - use - apiGroups: - storage.k8s.io resources: diff --git a/main.go b/main.go index 4fb4da49..4ce2dcf6 100644 --- a/main.go +++ b/main.go @@ -94,6 +94,7 @@ func init() { // +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=configmaps/status,verbs=get;update;patch // +kubebuilder:rbac:groups="coordination.k8s.io",resources=leases,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="extensions",resources=podsecuritypolicies,verbs=use func main() { var loggerOpts zap.Options