This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 160101da6cdadf086f45d4fb418bcede0292e49b
Author: Antonin Stefanutti <anto...@stefanutti.fr>
AuthorDate: Fri Jan 28 17:28:00 2022 +0100

    chore(rbac): Add bind permission on the addressable-resolver ClusterRole
---
 config/rbac/kustomization.yaml                     |  3 +-
 ...perator-cluster-role-addressable-resolver.yaml} | 40 ++++++++--------------
 ...cluster-role-binding-addressable-resolver.yaml} | 39 ++++++++-------------
 pkg/resources/resources.go                         | 16 +++++++++
 4 files changed, 47 insertions(+), 51 deletions(-)

diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml
index 7f03ac1..6e488ca 100644
--- a/config/rbac/kustomization.yaml
+++ b/config/rbac/kustomization.yaml
@@ -39,4 +39,5 @@ resources:
 - operator-role-binding.yaml
 - operator-cluster-role-custom-resource-definitions.yaml
 - operator-cluster-role-binding-custom-resource-definitions.yaml
-
+- operator-cluster-role-addressable-resolver.yaml
+- operator-cluster-role-binding-addressable-resolver.yaml
diff --git a/config/rbac/kustomization.yaml 
b/config/rbac/operator-cluster-role-addressable-resolver.yaml
similarity index 56%
copy from config/rbac/kustomization.yaml
copy to config/rbac/operator-cluster-role-addressable-resolver.yaml
index 7f03ac1..9428404 100644
--- a/config/rbac/kustomization.yaml
+++ b/config/rbac/operator-cluster-role-addressable-resolver.yaml
@@ -15,28 +15,18 @@
 # limitations under the License.
 # ---------------------------------------------------------------------------
 
-#
-# rbac resources applicable for all kubernetes platforms
-#
-apiVersion: kustomize.config.k8s.io/v1beta1
-kind: Kustomization
-
-resources:
-- user-cluster-role.yaml
-- operator-role-events.yaml
-- operator-role-knative.yaml
-- operator-role.yaml
-- operator-role-keda.yaml
-- operator-role-leases.yaml
-- operator-role-podmonitors.yaml
-- operator-role-strimzi.yaml
-- operator-role-binding-events.yaml
-- operator-role-binding-keda.yaml
-- operator-role-binding-knative.yaml
-- operator-role-binding-leases.yaml
-- operator-role-binding-podmonitors.yaml
-- operator-role-binding-strimzi.yaml
-- operator-role-binding.yaml
-- operator-cluster-role-custom-resource-definitions.yaml
-- operator-cluster-role-binding-custom-resource-definitions.yaml
-
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: camel-k-operator-bind-addressable-resolver
+  labels:
+    app: "camel-k"
+rules:
+- apiGroups:
+  - rbac.authorization.k8s.io
+  resources:
+  - clusterroles
+  resourceNames:
+  - addressable-resolver
+  verbs:
+  - bind
diff --git a/config/rbac/kustomization.yaml 
b/config/rbac/operator-cluster-role-binding-addressable-resolver.yaml
similarity index 56%
copy from config/rbac/kustomization.yaml
copy to config/rbac/operator-cluster-role-binding-addressable-resolver.yaml
index 7f03ac1..bddbcfd 100644
--- a/config/rbac/kustomization.yaml
+++ b/config/rbac/operator-cluster-role-binding-addressable-resolver.yaml
@@ -15,28 +15,17 @@
 # limitations under the License.
 # ---------------------------------------------------------------------------
 
-#
-# rbac resources applicable for all kubernetes platforms
-#
-apiVersion: kustomize.config.k8s.io/v1beta1
-kind: Kustomization
-
-resources:
-- user-cluster-role.yaml
-- operator-role-events.yaml
-- operator-role-knative.yaml
-- operator-role.yaml
-- operator-role-keda.yaml
-- operator-role-leases.yaml
-- operator-role-podmonitors.yaml
-- operator-role-strimzi.yaml
-- operator-role-binding-events.yaml
-- operator-role-binding-keda.yaml
-- operator-role-binding-knative.yaml
-- operator-role-binding-leases.yaml
-- operator-role-binding-podmonitors.yaml
-- operator-role-binding-strimzi.yaml
-- operator-role-binding.yaml
-- operator-cluster-role-custom-resource-definitions.yaml
-- operator-cluster-role-binding-custom-resource-definitions.yaml
-
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: camel-k-operator-bind-addressable-resolver
+  labels:
+    app: "camel-k"
+subjects:
+- kind: ServiceAccount
+  name: camel-k-operator
+  namespace: placeholder
+roleRef:
+  kind: ClusterRole
+  name: camel-k-operator-bind-addressable-resolver
+  apiGroup: rbac.authorization.k8s.io
diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index 6edf7d1..1ed2736 100644
--- a/pkg/resources/resources.go
+++ b/pkg/resources/resources.go
@@ -277,6 +277,20 @@ var assets = func() http.FileSystem {
 
                        compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x53\xc1\x8e\xdb\x46\x0c\xbd\xeb\x2b\x08\xeb\x92\x00\x6b\xa9\xed\xa9\x70\x4f\xee\x66\xb7\x35\x1a\xd8\xc0\xca\x69\x90\x23\x35\xa2\x25\xc2\xa3\xa1\xca\x19\xad\xb2\xf9\xfa\x62\xc6\x76\xe2\xac\xe3\xcd\x25\x40\x74\x11\x4d\x3e\x93\xef\xf1\x51\x39\xcc\x7f\xdc\x93\xe5\xf0\x96\x0d\x39\x4f\x0d\x04\x81\xd0\x11\x2c\x07\x34\x1d\x41\x25\xbb\x30\xa1\x12\xdc\xcb\xe8\x1a\x0c\x2c\x0e\x5e\x2d\xab\xfb\xd7\x30\xba\x86\x14\xc4\x11\x88\x
 [...]
                },
+               "/rbac/operator-cluster-role-addressable-resolver.yaml": 
&vfsgen۰CompressedFileInfo{
+                       name:             
"operator-cluster-role-addressable-resolver.yaml",
+                       modTime:          time.Time{},
+                       uncompressedSize: 1228,
+
+                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\x41\x8f\xdb\x36\x10\x85\xef\xfc\x15\x0f\xd6\x25\x01\x56\x72\xdb\x53\xe1\x9e\xdc\xcd\x6e\x2b\x34\xb0\x81\x95\xd3\x20\x47\x5a\x1c\x4b\x83\xa5\x38\xea\x90\x5a\x65\xfb\xeb\x0b\xca\x76\xe3\x20\xc8\x2d\xbc\x09\x7c\x9c\xf9\xde\xbc\x51\x81\xf2\xc7\x1d\x53\xe0\x3d\xb7\x14\x22\x39\x24\x41\xea\x09\xdb\xd1\xb6\x3d\xa1\x91\x53\x9a\xad\x12\x1e\x65\x0a\xce\x26\x96\x80\x37\xdb\xe6\xf1\x2d\xa6\xe0\x48\x21\x81\x20\x8a\x41\x94\x
 [...]
+               },
+               
"/rbac/operator-cluster-role-binding-addressable-resolver.yaml": 
&vfsgen۰CompressedFileInfo{
+                       name:             
"operator-cluster-role-binding-addressable-resolver.yaml",
+                       modTime:          time.Time{},
+                       uncompressedSize: 1296,
+
+                       compressedContent: 
[]byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x53\xcd\x8e\xdb\x36\x10\xbe\xf3\x29\x3e\x58\x97\x04\x58\xcb\x6d\x4f\x85\x7b\x72\x36\xbb\xad\xd0\xc0\x06\x2c\xa7\x41\x8e\x34\x35\x96\xa6\x4b\x71\xd4\x21\xb5\x8a\xfb\xf4\x05\x65\xbb\xd9\x20\x68\x0f\x41\x78\x13\xc8\x99\xef\x57\x05\x96\xdf\xef\x98\x02\xef\xd8\x51\x88\xd4\x20\x09\x52\x47\xd8\x0c\xd6\x75\x84\x5a\x4e\x69\xb2\x4a\x78\x94\x31\x34\x36\xb1\x04\xbc\xda\xd4\x8f\xaf\x31\x86\x86\x14\x12\x08\xa2\xe8\x45\xc9\x14\x
 [...]
+               },
                
"/rbac/operator-cluster-role-binding-custom-resource-definitions.yaml": 
&vfsgen۰CompressedFileInfo{
                        name:             
"operator-cluster-role-binding-custom-resource-definitions.yaml",
                        modTime:          time.Time{},
@@ -624,6 +638,8 @@ var assets = func() http.FileSystem {
        }
        fs["/rbac"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
                fs["/rbac/openshift"].(os.FileInfo),
+               
fs["/rbac/operator-cluster-role-addressable-resolver.yaml"].(os.FileInfo),
+               
fs["/rbac/operator-cluster-role-binding-addressable-resolver.yaml"].(os.FileInfo),
                
fs["/rbac/operator-cluster-role-binding-custom-resource-definitions.yaml"].(os.FileInfo),
                
fs["/rbac/operator-cluster-role-custom-resource-definitions.yaml"].(os.FileInfo),
                fs["/rbac/operator-role-binding-events.yaml"].(os.FileInfo),

Reply via email to