-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdistributor-deployment.yaml
113 lines (113 loc) · 3.58 KB
/
distributor-deployment.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
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
107
108
109
110
111
112
113
kind: Deployment
apiVersion: apps/v1
metadata:
name: loki-microservices-distributor
labels:
app.kubernetes.io/component: distributor
app.kubernetes.io/instance: loki
app.kubernetes.io/name: loki-microservices
app.kubernetes.io/part-of: memberlist
app.kubernetes.io/version: 2.5.0
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/component: distributor
app.kubernetes.io/instance: loki
app.kubernetes.io/name: loki-microservices
template:
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: distributor
app.kubernetes.io/instance: loki
app.kubernetes.io/name: loki-microservices
app.kubernetes.io/part-of: memberlist
spec:
restartPolicy: Always
serviceAccountName: loki-microservices
schedulerName: default-scheduler
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/component: distributor
app.kubernetes.io/instance: loki
app.kubernetes.io/name: loki-microservices
topologyKey: kubernetes.io/hostname
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/component: distributor
app.kubernetes.io/instance: loki
app.kubernetes.io/name: loki-microservices
topologyKey: failure-domain.beta.kubernetes.io/zone
terminationGracePeriodSeconds: 30
containers:
- resources: {}
readinessProbe:
httpGet:
path: /ready
port: http
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
terminationMessagePath: /dev/termination-log
name: distributor
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
ports:
- name: http
containerPort: 3100
protocol: TCP
- name: grpc
containerPort: 9095
protocol: TCP
- name: http-memberlist
containerPort: 7946
protocol: TCP
imagePullPolicy: IfNotPresent
volumeMounts:
- name: config
mountPath: /etc/loki/config
terminationMessagePolicy: File
image: 'grafana/loki:2.6.1'
args:
- '-config.file=/etc/loki/config/config.yaml'
- '-config.expand-env=true'
- '-target=distributor'
env:
- name: ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: loki-microservices
key: ACCESS_KEY_ID
- name: SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: loki-microservices
key: SECRET_ACCESS_KEY
serviceAccount: loki-microservices
volumes:
- name: config
configMap:
name: loki-microservices
defaultMode: 420
dnsPolicy: ClusterFirst
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 0
revisionHistoryLimit: 10
progressDeadlineSeconds: 600