This repository was archived by the owner on Jun 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathexecutor.Deployment.yaml
More file actions
116 lines (116 loc) · 3.88 KB
/
executor.Deployment.yaml
File metadata and controls
116 lines (116 loc) · 3.88 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
110
111
112
113
114
115
116
apiVersion: apps/v1
kind: Deployment
metadata:
name: executor
annotations:
description: Runs sourcegraph executor replicas for batch chanes 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: us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal/executor:5.11.4013@sha256:0c6d3903da4095efd968cb56204f47abf605d436b8fc0bf4448811873a25e8ea
imagePullPolicy: Always
livenessProbe:
exec:
command:
- /usr/bin/pgrep
- /usr/local/bin/executor
initialDelaySeconds: 15
timeoutSeconds: 5
readinessProbe:
exec:
command:
- /usr/bin/pgrep
- /usr/local/bin/executor
periodSeconds: 5
terminationMessagePolicy: FallbackToLogsOnError
# Refer to https://docs.sourcegraph.com/admin/deploy_executors_binary#step-2-setup-environment-variables on how to populate these variables
env:
- name: EXECUTOR_FRONTEND_URL
value:
- name: EXECUTOR_FRONTEND_PASSWORD
value:
- name: EXECUTOR_USE_FIRECRACKER
value: "false"
- name: EXECUTOR_QUEUE_NAME
value:
- name: EXECUTOR_JOB_NUM_CPUS
value: "0"
- name: EXECUTOR_JOB_MEMORY
value: "0"
- name: DOCKER_HOST
value: tcp://localhost:2375
# Note: Must match the mount point shared with the dind sidecar
- name: TMPDIR
value: /scratch
volumeMounts:
- mountPath: /scratch
name: executor-scratch
- name: dind
image: us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal/dind:5.11.4013@sha256:4aefceeddf1c0b439e5e4842a9fb4878e795ad87ea507d18b44ed9243ca25a4c
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