da00fc708f
Signed-off-by: Ryan Richard <richardry@vmware.com>
35 lines
890 B
YAML
35 lines
890 B
YAML
#! Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
|
#! SPDX-License-Identifier: Apache-2.0
|
|
|
|
#@ load("@ytt:data", "data")
|
|
|
|
#! Give permission to various objects within the app's own namespace
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: #@ data.values.app_name
|
|
namespace: #@ data.values.namespace
|
|
labels:
|
|
app: #@ data.values.app_name
|
|
rules:
|
|
- apiGroups: [config.pinniped.dev]
|
|
resources: [oidcproviderconfigs]
|
|
verbs: [update, get, list, watch]
|
|
---
|
|
kind: RoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: #@ data.values.app_name
|
|
namespace: #@ data.values.namespace
|
|
labels:
|
|
app: #@ data.values.app_name
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: #@ data.values.app_name
|
|
namespace: #@ data.values.namespace
|
|
roleRef:
|
|
kind: Role
|
|
name: #@ data.values.app_name
|
|
apiGroup: rbac.authorization.k8s.io
|