2b8773aa54
Signed-off-by: Matt Moyer <moyerm@vmware.com>
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
#! Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
|
#! SPDX-License-Identifier: Apache-2.0
|
|
|
|
#@ load("@ytt:data", "data")
|
|
#@ load("helpers.lib.yaml", "labels", "namespace", "defaultResourceName", "defaultResourceNameWithSuffix")
|
|
|
|
#! Give permission to various objects within the app's own namespace
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: #@ defaultResourceName()
|
|
namespace: #@ namespace()
|
|
labels: #@ labels()
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: [secrets]
|
|
verbs: [create, get, list, patch, update, watch, delete]
|
|
- apiGroups: [config.supervisor.pinniped.dev]
|
|
resources: [oidcproviders]
|
|
verbs: [update, get, list, watch]
|
|
---
|
|
kind: RoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: #@ defaultResourceName()
|
|
namespace: #@ namespace()
|
|
labels: #@ labels()
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: #@ defaultResourceName()
|
|
namespace: #@ namespace()
|
|
roleRef:
|
|
kind: Role
|
|
name: #@ defaultResourceName()
|
|
apiGroup: rbac.authorization.k8s.io
|