80 lines
1.6 KiB
YAML
80 lines
1.6 KiB
YAML
# Bootstrap this file once with an administrator identity. CI can update only
|
|
# the existing Home Assistant resources and cannot call the Secrets API.
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: home-assistant-deployer
|
|
namespace: default
|
|
automountServiceAccountToken: false
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: home-assistant-deployer
|
|
namespace: default
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- services
|
|
resourceNames:
|
|
- home-assistant
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- persistentvolumeclaims
|
|
resourceNames:
|
|
- home-assistant-pvc
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- deployments
|
|
resourceNames:
|
|
- home-assistant
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- networking.k8s.io
|
|
resources:
|
|
- ingresses
|
|
resourceNames:
|
|
- home-assistant
|
|
- home-assistant-auth
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: home-assistant-deployer
|
|
namespace: default
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: home-assistant-deployer
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: home-assistant-deployer
|
|
namespace: default
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: home-assistant-deployer-token
|
|
namespace: default
|
|
annotations:
|
|
kubernetes.io/service-account.name: home-assistant-deployer
|
|
type: kubernetes.io/service-account-token
|