91 lines
1.7 KiB
YAML
91 lines
1.7 KiB
YAML
# Bootstrap once with an administrator identity. CI can update only the named
|
|
# existing runtime resources in the asciinema namespace. It cannot access
|
|
# Secrets, Jobs, the Namespace, PVCs, or the Rook object user and bucket.
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: asciinema-deployer
|
|
namespace: asciinema
|
|
automountServiceAccountToken: false
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: asciinema-deployer
|
|
namespace: asciinema
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- configmaps
|
|
resourceNames:
|
|
- asciinema
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- services
|
|
resourceNames:
|
|
- asciinema
|
|
- postgresql
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- deployments
|
|
resourceNames:
|
|
- asciinema
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- statefulsets
|
|
resourceNames:
|
|
- postgresql
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- networking.k8s.io
|
|
resources:
|
|
- ingresses
|
|
resourceNames:
|
|
- asciinema
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: asciinema-deployer
|
|
namespace: asciinema
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: asciinema-deployer
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: asciinema-deployer
|
|
namespace: asciinema
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: asciinema-deployer-token
|
|
namespace: asciinema
|
|
annotations:
|
|
kubernetes.io/service-account.name: asciinema-deployer
|
|
type: kubernetes.io/service-account-token
|