-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathsearcher.StatefulSet.yaml
More file actions
89 lines (89 loc) · 2.52 KB
/
searcher.StatefulSet.yaml
File metadata and controls
89 lines (89 loc) · 2.52 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
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
description: Backend for text search operations.
kubectl.kubernetes.io/default-container: searcher
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: searcher
name: searcher
spec:
serviceName: searcher
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: searcher
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
deploy: sourcegraph
app: searcher
spec:
securityContext:
runAsUser: 100
fsGroup: 101
fsGroupChangePolicy: OnRootMismatch
containers:
- name: searcher
env:
- name: SEARCHER_CACHE_SIZE_MB
value: "25000"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: CACHE_DIR
value: /mnt/cache/$(POD_NAME)
# OTEL_AGENT_HOST must be defined before OTEL_EXPORTER_OTLP_ENDPOINT to substitute the node IP on which the DaemonSet pod instance runs in the latter variable
- name: OTEL_AGENT_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://$(OTEL_AGENT_HOST):4317
image: index.docker.io/sourcegraph/searcher:7.0.0@sha256:eede7d3b2d97b39e87763d77f948f915c3ebef346e39b6fa6e7107ee0630f194
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 3181
name: http
- containerPort: 6060
name: debug
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: http
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
resources:
limits:
cpu: "2"
memory: 2G
requests:
cpu: 500m
memory: 500M
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 101
runAsUser: 100
volumeMounts:
- mountPath: /mnt/cache
name: cache
volumes:
- emptyDir: {}
name: cache
volumeClaimTemplates:
- metadata:
name: cache
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 30G