Add monitoring RBAC and service account for dashboards
This commit is contained in:
parent
9ba806c8c5
commit
cd1ede09ef
1 changed files with 29 additions and 0 deletions
29
k8s/app.yaml
29
k8s/app.yaml
|
|
@ -70,6 +70,34 @@ data:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: lomavuokraus-monitor
|
||||||
|
namespace: ${K8S_NAMESPACE}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: lomavuokraus-monitor
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes", "pods", "pods/status"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: lomavuokraus-monitor-${K8S_NAMESPACE}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: lomavuokraus-monitor
|
||||||
|
namespace: ${K8S_NAMESPACE}
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: lomavuokraus-monitor
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -87,6 +115,7 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: lomavuokraus-web
|
app: lomavuokraus-web
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: lomavuokraus-monitor
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-halla
|
- name: registry-halla
|
||||||
containers:
|
containers:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue