modified: .gitea/workflows/monitoring-deploy.yaml modified: monitoring/cicd-rbac.yaml
64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
namespace: monitoring
|
|
name: ci-cd
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["pods", "services", "secrets", "configmaps", "persistentvolumeclaims", "endpoints", "serviceaccounts"]
|
|
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
|
|
- apiGroups: ["apps"]
|
|
resources: ["deployments", "statefulsets","daemonsets"]
|
|
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
|
|
- apiGroups: ["networking.k8s.io"]
|
|
resources: ["ingresses"]
|
|
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
|
|
- apiGroups: ["traefik.io"]
|
|
resources: ["ingressroutes"]
|
|
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
|
|
|
|
- apiGroups: ["rbac.authorization.k8s.io"]
|
|
resources: ["clusterroles", "clusterrolebindings"]
|
|
verbs: ["get", "list", "create", "update", "patch", "delete"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: ci-cd
|
|
namespace: monitoring
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: casa-ci-cd
|
|
namespace: home-assistant
|
|
roleRef:
|
|
kind: Role
|
|
name: ci-cd
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: ci-cd-cluster
|
|
rules:
|
|
- apiGroups: ["rbac.authorization.k8s.io"]
|
|
resources: ["clusterroles", "clusterrolebindings"]
|
|
verbs: ["get", "list", "create", "update", "patch", "delete"]
|
|
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: ci-cd-clusterbinding
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: casa-ci-cd
|
|
namespace: home-assistant
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: ci-cd-cluster
|
|
apiGroup: rbac.authorization.k8s.io
|