-
Notifications
You must be signed in to change notification settings - Fork 1
/
environment-exporter-example.yaml
56 lines (54 loc) · 1.46 KB
/
environment-exporter-example.yaml
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
# Deployment example
# Note that when running in Kubernetes, the field =shareProcessNamespace= in =v1.Pod.Spec= must be set to =true=.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: environment-dev
namespace: default
spec:
serviceName: environment-dev
replicas: 1
selector:
matchLabels:
app: environment-dev
template:
metadata:
labels:
app: environment-dev
spec:
shareProcessNamespace: true
containers:
- name: environment
image: registry.gitlab.com/sharingio/environment:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- name: home-ii
mountPath: /home/ii
- name: podlabels
mountPath: /etc/podlabels
command:
- sleep
- +Inf
- name: environment-exporter
image: registry.gitlab.com/sharingio/environment/exporter:latest
imagePullPolicy: IfNotPresent
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
ports:
- containerPort: 10093
volumeMounts:
- name: podlabels
mountPath: /etc/podlabels
volumes:
- name: home-ii
hostPath:
path: /home/ii
- name: podlabels
downwardAPI:
items:
- path: "labels"
fieldRef:
fieldPath: metadata.labels