You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/09/27 14:31:16 UTC
[camel-k] 08/15: Fix #2553: Remove ServiceBinding roles
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 4890b997fb5ac733451789f59d56d6e6c9f27941
Author: John Poth <po...@gmail.com>
AuthorDate: Mon Sep 6 16:33:21 2021 +0200
Fix #2553: Remove ServiceBinding roles
---
config/rbac/operator-role-service-binding.yaml | 37 --------------------------
helm/camel-k/templates/operator-role.yaml | 13 ---------
pkg/install/operator.go | 14 ----------
3 files changed, 64 deletions(-)
diff --git a/config/rbac/operator-role-service-binding.yaml b/config/rbac/operator-role-service-binding.yaml
deleted file mode 100644
index d06ff21..0000000
--- a/config/rbac/operator-role-service-binding.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-# ---------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ---------------------------------------------------------------------------
-
-kind: Role
-apiVersion: rbac.authorization.k8s.io/v1
-metadata:
- name: camel-k-operator-service-binding
- labels:
- app: "camel-k"
-rules:
-- apiGroups:
- - binding.operators.coreos.com
- resources:
- - servicebindings
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
diff --git a/helm/camel-k/templates/operator-role.yaml b/helm/camel-k/templates/operator-role.yaml
index 8515705..42d8f5f 100644
--- a/helm/camel-k/templates/operator-role.yaml
+++ b/helm/camel-k/templates/operator-role.yaml
@@ -274,16 +274,3 @@ rules:
- patch
- update
- watch
-- apiGroups:
- - "operators.coreos.com"
- resources:
- - servicebindings
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
diff --git a/pkg/install/operator.go b/pkg/install/operator.go
index b3b68a3..ad50a60 100644
--- a/pkg/install/operator.go
+++ b/pkg/install/operator.go
@@ -261,13 +261,6 @@ func OperatorOrCollect(ctx context.Context, c client.Client, cfg OperatorConfigu
fmt.Println("Warning: the operator will not be able to create Leases. Try installing as cluster-admin to allow management of Lease resources.")
}
- if errmtr := installServiceBindings(ctx, c, cfg.Namespace, customizer, collection, force); errmtr != nil {
- if k8serrors.IsAlreadyExists(errmtr) {
- return errmtr
- }
- fmt.Println("Warning: the operator will not be able to lookup ServiceBinding resources. Try installing as cluster-admin to allow the lookup of ServiceBinding resources.")
- }
-
if cfg.Monitoring.Enabled {
if err := installMonitoringResources(ctx, c, cfg.Namespace, customizer, collection, force); err != nil {
if k8serrors.IsForbidden(err) {
@@ -406,13 +399,6 @@ func installLeaseBindings(ctx context.Context, c client.Client, namespace string
)
}
-func installServiceBindings(ctx context.Context, c client.Client, namespace string, customizer ResourceCustomizer, collection *kubernetes.Collection, force bool) error {
- return ResourcesOrCollect(ctx, c, namespace, collection, force, customizer,
- "/rbac/operator-role-service-binding.yaml",
- "/rbac/operator-role-binding-service-binding.yaml",
- )
-}
-
// PlatformOrCollect --
// nolint: lll
func PlatformOrCollect(ctx context.Context, c client.Client, clusterType string, namespace string, skipRegistrySetup bool, registry v1.IntegrationPlatformRegistrySpec, collection *kubernetes.Collection) (*v1.IntegrationPlatform, error) {