Skip to content
Permalink
Branch: master
Find file Copy path
85 lines (75 sloc) 2.39 KB
# Copyright 2017 The Nuclio Authors.
#
# Licensed 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.
---
# All access to services, configmaps, deployments, ingresses and HPAs limited to the "nuclio" namespace
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: nuclio-function-deployer
namespace: nuclio
rules:
- apiGroups: [""]
resources: ["services", "configmaps", "pods", "pods/log"]
verbs: ["*"]
- apiGroups: ["apps", "extensions"]
resources: ["deployments"]
verbs: ["*"]
- apiGroups: ["extensions"]
resources: ["ingresses"]
verbs: ["*"]
- apiGroups: ["autoscaling"]
resources: ["horizontalpodautoscalers"]
verbs: ["*"]
---
# Bind the "nuclio" service account (used by controller / playground) to the nuclio-function-deployer role,
# allowing them to create deployments, services, etc
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: nuclio-function-deployer-rolebinding
namespace: nuclio
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: nuclio-function-deployer
subjects:
- kind: ServiceAccount
name: nuclio
namespace: nuclio
---
# All access to the function/project/functionevents custom resource definition
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: nuclio-functioncr-admin
rules:
- apiGroups: ["nuclio.io"]
resources: ["nucliofunctions", "nuclioprojects", "nucliofunctionevents"]
verbs: ["*"]
---
# Bind the "nuclio" service account (used by controller / playground) to the nuclio-functioncr-admin role,
# allowing them to create / delete function custom resource definitions in the "nuclio" namespace
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: nuclio-functioncr-admin-clusterrolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nuclio-functioncr-admin
subjects:
- kind: ServiceAccount
name: nuclio
namespace: nuclio
---
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.