-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathexecutor.Deployment.yaml
More file actions
109 lines (109 loc) · 3.53 KB
/
executor.Deployment.yaml
File metadata and controls
109 lines (109 loc) · 3.53 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
107
108
109
apiVersion: apps/v1
kind: Deployment
metadata:
name: executor
annotations:
description: Runs sourcegraph executor replicas for batch changes and codeintel auto indexing.
kubectl.kubernetes.io/default-container: executor
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: executor
spec:
selector:
matchLabels:
app: executor
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: executor
spec:
containers:
- name: executor
image: index.docker.io/sourcegraph/executor:7.0.2178@sha256:7ca5cc7f291409ebdf76b2f1e2a933467f3794e379eb0c0d2f18bda6ef6398fb
imagePullPolicy: Always
livenessProbe:
exec:
command:
- /usr/bin/pgrep
- -f
- /usr/local/bin/executor
initialDelaySeconds: 15
timeoutSeconds: 5
readinessProbe:
exec:
command:
- /usr/bin/pgrep
- -f
- /usr/local/bin/executor
periodSeconds: 5
terminationMessagePolicy: FallbackToLogsOnError
env:
- name: EXECUTOR_FRONTEND_PASSWORD
valueFrom:
secretKeyRef:
name: executor-secret
key: password
# Refer to https://docs.sourcegraph.com/admin/executors/deploy_executors_binary#step-2-setup-environment-variables on how to populate these variables
envFrom:
- configMapRef:
name: executor-config
volumeMounts:
- mountPath: /scratch
name: executor-scratch
- name: dind
image: index.docker.io/sourcegraph/dind:7.0.2178@sha256:1dc14e115bf6f33d38f596f83a8b7f23adcc0a6d3ba721db74ba803ee552392b
imagePullPolicy: Always
securityContext:
privileged: true
command:
- 'dockerd'
- '--tls=false'
- '--mtu=1200'
- '--registry-mirror=http://private-docker-registry:5000'
- '--host=tcp://0.0.0.0:2375'
livenessProbe:
tcpSocket:
port: 2375
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 5
readinessProbe:
tcpSocket:
port: 2375
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 5
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
ports:
- containerPort: 2375
protocol: TCP
volumeMounts:
- mountPath: /scratch
name: executor-scratch
- mountPath: /etc/docker/daemon.json
subPath: daemon.json
name: docker-config
volumes:
- name: executor-scratch
emptyDir:
# Ensure we don't cause disk pressure on nodes. This value can be adjusted based on the size of the batch change or code intel requirements.
# Refer to https://docs.sourcegraph.com/admin/executors/deploy_executors#resource-recommendations for more information
sizeLimit: 20Gi
- name: docker-config
configMap:
defaultMode: 420
name: docker-config