-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample-deployment.yml
More file actions
106 lines (106 loc) · 2.61 KB
/
sample-deployment.yml
File metadata and controls
106 lines (106 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
apiVersion: v1
kind: ServiceAccount
metadata:
name: katastasi-service-account
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: default
name: configmap-reader
rules:
- apiGroups: [ "" ]
resources: [ "configmaps" ]
verbs: [ "get", "watch", "list" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: read-configmaps
namespace: default
subjects:
- kind: ServiceAccount
name: katastasi-service-account
namespace: default
roleRef:
kind: Role
name: configmap-reader
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ConfigMap
metadata:
name: katastasi-config
labels:
katastasi.io: "config"
data:
config.yml: |
prometheus:
url: 'http://prometheus-k8s.monitoring.svc.cluster.local:9090/'
cache:
ttl: 12s
queries:
ten: '10'
unhealthy_pods: 'sum (kube_pod_status_ready{condition="false", namespace="{{.Namespace}}"})'
unhealthy_pods_for_deployment: 'sum (kube_pod_status_ready{condition="false", namespace="{{.Namespace}}", deployment="{{.Deployment}}"})'
unhealthy_pods_for_statefulset: 'sum (kube_pod_status_ready{condition="false", namespace="{{.Namespace}}", statefulset="{{.StatefulSet}}"})'
consumergroup_lag: 'sum (kafka_consumergroup_lag{consumergroup="{{.ConsumerGroup}}"})'
consumergroup_lag_for_topic: 'sum (kafka_consumergroup_lag{consumergroup="{{.ConsumerGroup}}", topic="{{.Topic}}"})'
autoload:
active: true
namespaces:
pages:
- default
services:
- default
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: katastasi-deployment
labels:
app: katastasi
spec:
## we should generally let katastasi run only with one replica, as it doesn't use a distributed cache
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: katastasi
template:
metadata:
labels:
app: katastasi
spec:
serviceAccountName: katastasi-service-account
containers:
- name: katastasi
image: ghcr.io/gitu/katastasi:latest
imagePullPolicy: Always
ports:
- containerPort: 1323
volumeMounts:
- name: config-volume
mountPath: /etc/katastasi/
volumes:
- name: config-volume
configMap:
name: katastasi-config
---
apiVersion: v1
kind: Service
metadata:
name: katastasi-service
labels:
app: katastasi
spec:
ports:
- port: 1323
targetPort: 1323
selector:
app: katastasi