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/02/09 11:18:04 UTC
[camel-k] 01/03: chore(install): Remove duplicated Leases RBAC
resources
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 7ec3c799704018ddd092968c7af9b94fc31319c8
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Feb 9 10:58:28 2021 +0100
chore(install): Remove duplicated Leases RBAC resources
---
deploy/operator-role-binding-leases.yaml | 30 --------------------------
deploy/operator-role-leases.yaml | 37 --------------------------------
pkg/install/operator.go | 10 ++-------
pkg/resources/resources.go | 2 --
4 files changed, 2 insertions(+), 77 deletions(-)
diff --git a/deploy/operator-role-binding-leases.yaml b/deploy/operator-role-binding-leases.yaml
deleted file mode 100644
index 5bbc4ef..0000000
--- a/deploy/operator-role-binding-leases.yaml
+++ /dev/null
@@ -1,30 +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: RoleBinding
-apiVersion: rbac.authorization.k8s.io/v1
-metadata:
- name: camel-k-operator-leases
- labels:
- app: "camel-k"
-subjects:
-- kind: ServiceAccount
- name: camel-k-operator
-roleRef:
- kind: Role
- name: camel-k-operator-leases
- apiGroup: rbac.authorization.k8s.io
diff --git a/deploy/operator-role-leases.yaml b/deploy/operator-role-leases.yaml
deleted file mode 100644
index 4223e8e..0000000
--- a/deploy/operator-role-leases.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-leases
- labels:
- app: "camel-k"
-rules:
-- apiGroups:
- - "coordination.k8s.io"
- resources:
- - leases
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
diff --git a/pkg/install/operator.go b/pkg/install/operator.go
index cd58afa..d4e503d 100644
--- a/pkg/install/operator.go
+++ b/pkg/install/operator.go
@@ -267,17 +267,11 @@ func installMonitoringResources(ctx context.Context, c client.Client, namespace
func installLeaseBindings(ctx context.Context, c client.Client, namespace string, customizer ResourceCustomizer, collection *kubernetes.Collection, force bool) error {
return ResourcesOrCollect(ctx, c, namespace, collection, force, customizer,
- "operator-role-leases.yaml",
- "operator-role-binding-leases.yaml",
+ "/rbac/operator-role-leases.yaml",
+ "/rbac/operator-role-binding-leases.yaml",
)
}
-// Platform installs the platform custom resource
-// nolint: lll
-func Platform(ctx context.Context, c client.Client, clusterType string, namespace string, registry v1.IntegrationPlatformRegistrySpec) (*v1.IntegrationPlatform, error) {
- return PlatformOrCollect(ctx, c, clusterType, namespace, registry, nil)
-}
-
// PlatformOrCollect --
// nolint: lll
func PlatformOrCollect(ctx context.Context, c client.Client, clusterType string, namespace string, registry v1.IntegrationPlatformRegistrySpec, collection *kubernetes.Collection) (*v1.IntegrationPlatform, error) {
diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index 1f31b0c..401eeb2 100644
--- a/pkg/resources/resources.go
+++ b/pkg/resources/resources.go
@@ -536,8 +536,6 @@ var assets = func() http.FileSystem {
fs["/default"].(os.FileInfo),
fs["/manager"].(os.FileInfo),
fs["/manifests"].(os.FileInfo),
- fs["/operator-role-binding-leases.yaml"].(os.FileInfo),
- fs["/operator-role-leases.yaml"].(os.FileInfo),
fs["/prometheus"].(os.FileInfo),
fs["/rbac"].(os.FileInfo),
fs["/samples"].(os.FileInfo),