initial k8up monitoring config

This commit is contained in:
Tobias Brunner 2020-02-16 14:35:35 +01:00
parent 55410a8dc5
commit 942a9f087f
5 changed files with 32 additions and 2 deletions

View file

@ -165,6 +165,8 @@ spec:
value: http://10.42.42.2:9000 value: http://10.42.42.2:9000
- name: BACKUP_GLOBALS3BUCKET - name: BACKUP_GLOBALS3BUCKET
value: knurrli-k8up value: knurrli-k8up
- name: BACKUP_PROMURL
value: prometheus-pushgateway.monitoring.svc
ports: ports:
- containerPort: 8080 - containerPort: 8080
protocol: TCP protocol: TCP

View file

@ -4,8 +4,6 @@ kind: ServiceMonitor
metadata: metadata:
name: k8up name: k8up
namespace: k8up namespace: k8up
labels:
release: prometheus-operator
spec: spec:
endpoints: endpoints:
- interval: 30s - interval: 30s

View file

@ -39,4 +39,17 @@ items:
- kind: ServiceAccount - kind: ServiceAccount
name: prometheus-k8s name: prometheus-k8s
namespace: monitoring namespace: monitoring
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: prometheus-k8s
namespace: k8up
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: prometheus-k8s
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: monitoring
kind: RoleBindingList kind: RoleBindingList

View file

@ -48,4 +48,20 @@ items:
- get - get
- list - list
- watch - watch
- apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: prometheus-k8s
namespace: k8up
rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- pods
verbs:
- get
- list
- watch
kind: RoleList kind: RoleList

View file

@ -16,6 +16,7 @@ local kp =
prometheus+:: { prometheus+:: {
names: 'k8s', names: 'k8s',
replicas: 1, replicas: 1,
namespaces+: ['k8up'],
}, },
alertmanager+:: { alertmanager+:: {
replicas: 1, replicas: 1,