From 6ddfd11f5a90ba5092c77ab1976a43d913b471a0 Mon Sep 17 00:00:00 2001
From: Stano Bocinec <stano@redpanda.com>
Date: Thu, 4 May 2023 16:29:27 +0200
Subject: [PATCH] Lint RBAC arrays

Signed-off-by: Stano Bocinec <stano@redpanda.com>
---
 .../templates/clusterrole.yaml                | 12 +++----
 .../templates/role.yaml                       |  4 +--
 deploy/local-path-storage.yaml                | 34 +++++++++----------
 examples/quota/local-path-storage.yaml        | 34 +++++++++----------
 4 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/deploy/chart/local-path-provisioner/templates/clusterrole.yaml b/deploy/chart/local-path-provisioner/templates/clusterrole.yaml
index 607f856c..9d7a9d67 100644
--- a/deploy/chart/local-path-provisioner/templates/clusterrole.yaml
+++ b/deploy/chart/local-path-provisioner/templates/clusterrole.yaml
@@ -9,15 +9,15 @@ rules:
   - apiGroups: [""]
     resources: ["nodes", "persistentvolumeclaims", "configmaps"]
     verbs: ["get", "list", "watch"]
-  - apiGroups: [ "" ]
-    resources: [ "pods" ]
-    verbs: [ "get", "list", "watch" ]
+  - apiGroups: [""]
+    resources: ["pods"]
+    verbs: ["get", "list", "watch"]
   - apiGroups: [""]
     resources: ["persistentvolumes"]
     verbs: ["*"]
-  - apiGroups: [ "" ]
-    resources: [ "events" ]
-    verbs: [ "create", "patch" ]
+  - apiGroups: [""]
+    resources: ["events"]
+    verbs: ["create", "patch"]
   - apiGroups: ["storage.k8s.io"]
     resources: ["storageclasses"]
     verbs: ["get", "list", "watch"]
diff --git a/deploy/chart/local-path-provisioner/templates/role.yaml b/deploy/chart/local-path-provisioner/templates/role.yaml
index 9562816b..ec6c2e51 100644
--- a/deploy/chart/local-path-provisioner/templates/role.yaml
+++ b/deploy/chart/local-path-provisioner/templates/role.yaml
@@ -7,7 +7,7 @@ metadata:
   labels:
 {{ include "local-path-provisioner.labels" . | indent 4 }}
 rules:
-  - apiGroups: [ "" ]
-    resources: [ "pods" ]
+  - apiGroups: [""]
+    resources: ["pods"]
     verbs: ["get", "list", "watch", "create", "patch", "update", "delete"]
 {{- end -}}
diff --git a/deploy/local-path-storage.yaml b/deploy/local-path-storage.yaml
index ee3f35b1..6e39a731 100644
--- a/deploy/local-path-storage.yaml
+++ b/deploy/local-path-storage.yaml
@@ -17,8 +17,8 @@ metadata:
   name: local-path-provisioner-role
   namespace: local-path-storage
 rules:
-  - apiGroups: [ "" ]
-    resources: [ "pods" ]
+  - apiGroups: [""]
+    resources: ["pods"]
     verbs: ["get", "list", "watch", "create", "patch", "update", "delete"]
 
 ---
@@ -27,21 +27,21 @@ kind: ClusterRole
 metadata:
   name: local-path-provisioner-role
 rules:
-  - apiGroups: [ "" ]
-    resources: [ "nodes", "persistentvolumeclaims", "configmaps" ]
-    verbs: [ "get", "list", "watch" ]
-  - apiGroups: [ "" ]
-    resources: [ "pods" ]
-    verbs: [ "get", "list", "watch" ]
-  - apiGroups: [ "" ]
-    resources: [ "persistentvolumes" ]
-    verbs: [ "*" ]
-  - apiGroups: [ "" ]
-    resources: [ "events" ]
-    verbs: [ "create", "patch" ]
-  - apiGroups: [ "storage.k8s.io" ]
-    resources: [ "storageclasses" ]
-    verbs: [ "get", "list", "watch" ]
+  - apiGroups: [""]
+    resources: ["nodes", "persistentvolumeclaims", "configmaps"]
+    verbs: ["get", "list", "watch"]
+  - apiGroups: [""]
+    resources: ["pods"]
+    verbs: ["get", "list", "watch"]
+  - apiGroups: [""]
+    resources: ["persistentvolumes"]
+    verbs: ["*"]
+  - apiGroups: [""]
+    resources: ["events"]
+    verbs: ["create", "patch"]
+  - apiGroups: ["storage.k8s.io"]
+    resources: ["storageclasses"]
+    verbs: ["get", "list", "watch"]
 
 ---
 apiVersion: rbac.authorization.k8s.io/v1
diff --git a/examples/quota/local-path-storage.yaml b/examples/quota/local-path-storage.yaml
index 39d09fea..7383806b 100644
--- a/examples/quota/local-path-storage.yaml
+++ b/examples/quota/local-path-storage.yaml
@@ -17,8 +17,8 @@ metadata:
   name: local-path-provisioner-role
   namespace: local-path-storage
 rules:
-  - apiGroups: [ "" ]
-    resources: [ "pods" ]
+  - apiGroups: [""]
+    resources: ["pods"]
     verbs: ["get", "list", "watch", "create", "patch", "update", "delete"]
 
 ---
@@ -27,21 +27,21 @@ kind: ClusterRole
 metadata:
   name: local-path-provisioner-role
 rules:
-  - apiGroups: [ "" ]
-    resources: [ "nodes", "persistentvolumeclaims", "configmaps" ]
-    verbs: [ "get", "list", "watch" ]
-  - apiGroups: [ "" ]
-    resources: [ "pods" ]
-    verbs: [ "get", "list", "watch" ]
-  - apiGroups: [ "" ]
-    resources: [ "persistentvolumes" ]
-    verbs: [ "*" ]
-  - apiGroups: [ "" ]
-    resources: [ "events" ]
-    verbs: [ "create", "patch" ]
-  - apiGroups: [ "storage.k8s.io" ]
-    resources: [ "storageclasses" ]
-    verbs: [ "get", "list", "watch" ]
+  - apiGroups: [""]
+    resources: ["nodes", "persistentvolumeclaims", "configmaps"]
+    verbs: ["get", "list", "watch"]
+  - apiGroups: [""]
+    resources: ["pods"]
+    verbs: ["get", "list", "watch"]
+  - apiGroups: [""]
+    resources: ["persistentvolumes"]
+    verbs: ["*"]
+  - apiGroups: [""]
+    resources: ["events"]
+    verbs: ["create", "patch"]
+  - apiGroups: ["storage.k8s.io"]
+    resources: ["storageclasses"]
+    verbs: ["get", "list", "watch"]
 
 ---
 apiVersion: rbac.authorization.k8s.io/v1
-- 
GitLab