Skip to content

Commit 4ee549f

Browse files
committed
feat: add kustomize manifest
1 parent 5ab4376 commit 4ee549f

File tree

4 files changed

+129
-0
lines changed

4 files changed

+129
-0
lines changed

deploy/kubernetes/deployment.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
5+
metadata:
6+
name: scw-exporter
7+
labels:
8+
app.kubernetes.io/name: scw-exporter
9+
app.kubernetes.io/component: exporter
10+
11+
spec:
12+
replicas: 1
13+
14+
revisionHistoryLimit: 3
15+
progressDeadlineSeconds: 600
16+
17+
strategy:
18+
type: Recreate
19+
20+
selector:
21+
matchLabels:
22+
app.kubernetes.io/name: scw-exporter
23+
app.kubernetes.io/component: exporter
24+
25+
template:
26+
metadata:
27+
labels:
28+
app.kubernetes.io/name: scw-exporter
29+
app.kubernetes.io/component: exporter
30+
31+
spec:
32+
restartPolicy: Always
33+
terminationGracePeriodSeconds: 30
34+
35+
containers:
36+
- name: exporter
37+
image: scw-exporter
38+
imagePullPolicy: Always
39+
40+
envFrom:
41+
- configMapRef:
42+
name: scw-exporter
43+
- secretRef:
44+
name: scw-exporter
45+
46+
ports:
47+
- name: http
48+
containerPort: 9503
49+
protocol: TCP
50+
51+
livenessProbe:
52+
httpGet:
53+
path: /healthz
54+
port: http
55+
56+
readinessProbe:
57+
httpGet:
58+
path: /readyz
59+
port: http
60+
61+
...

deploy/kubernetes/kustomization.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
resources:
6+
- servicemonitor.yml
7+
- service.yml
8+
- deployment.yml
9+
10+
configMapGenerator:
11+
- name: scw-exporter
12+
literals: []
13+
14+
secretGenerator:
15+
- name: scw-exporter
16+
literals: []
17+
18+
images:
19+
- name: scw-exporter
20+
newName: quay.io/promhippie/scw-exporter
21+
newTag: latest
22+
23+
...

deploy/kubernetes/service.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
kind: Service
3+
apiVersion: v1
4+
5+
metadata:
6+
name: scw-exporter
7+
labels:
8+
app.kubernetes.io/name: scw-exporter
9+
app.kubernetes.io/component: exporter
10+
11+
spec:
12+
selector:
13+
app.kubernetes.io/name: scw-exporter
14+
app.kubernetes.io/component: exporter
15+
16+
ports:
17+
- name: http
18+
port: 9503
19+
targetPort: http
20+
protocol: TCP
21+
22+
...

deploy/kubernetes/servicemonitor.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: ServiceMonitor
4+
5+
metadata:
6+
name: scw-exporter
7+
labels:
8+
app.kubernetes.io/name: scw-exporter
9+
app.kubernetes.io/component: exporter
10+
11+
spec:
12+
endpoints:
13+
- interval: 60s
14+
port: http
15+
scheme: http
16+
path: /metrics
17+
18+
selector:
19+
matchLabels:
20+
app.kubernetes.io/name: scw-exporter
21+
app.kubernetes.io/component: exporter
22+
23+
...

0 commit comments

Comments
 (0)