-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathsourcegraph-frontend.Deployment.yaml
More file actions
103 lines (103 loc) · 3.09 KB
/
sourcegraph-frontend.Deployment.yaml
File metadata and controls
103 lines (103 loc) · 3.09 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
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kubectl.kubernetes.io/default-container: frontend
description: Serves the frontend of Sourcegraph via HTTP(S).
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: frontend
name: sourcegraph-frontend
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: sourcegraph-frontend
strategy:
rollingUpdate:
maxSurge: 2
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
app: sourcegraph-frontend
deploy: sourcegraph
spec:
initContainers:
- name: migrator
image: index.docker.io/sourcegraph/migrator:6.12.1792@sha256:ad38b7d371fe951df2490d21293f24f3c581cfb8f5c5f9363c6a4fe8dfb6a504
args: ["up"]
resources:
limits:
cpu: 500m
memory: 100M
requests:
cpu: 100m
memory: 50M
securityContext:
# Required to prevent escalations to root.
allowPrivilegeEscalation: false
runAsGroup: 101
runAsUser: 100
envFrom:
- configMapRef:
name: sourcegraph-frontend-env
containers:
- name: frontend
image: index.docker.io/sourcegraph/frontend:6.12.1792@sha256:42c1f397ae2112706ab8f050635f73e167ba7124647017bf5d0c7c34629d75b2
args:
- serve
envFrom:
- configMapRef:
name: sourcegraph-frontend-env
# 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
env:
- name: OTEL_AGENT_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://$(OTEL_AGENT_HOST):4317
terminationMessagePolicy: FallbackToLogsOnError
livenessProbe:
httpGet:
path: /healthz
port: debug
scheme: HTTP
initialDelaySeconds: 300
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: debug
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
ports:
- containerPort: 3080
name: http
- containerPort: 3090
name: http-internal
- containerPort: 6060
name: debug
resources:
limits:
cpu: "2"
ephemeral-storage: 8Gi
memory: 4G
requests:
cpu: "2"
ephemeral-storage: 4Gi
memory: 2G
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 101
runAsUser: 100
securityContext:
runAsUser: 100
fsGroup: 101
fsGroupChangePolicy: "OnRootMismatch"