-
Notifications
You must be signed in to change notification settings - Fork 125
/
sourcegraph-frontend.Deployment.yaml
166 lines (166 loc) · 4.68 KB
/
sourcegraph-frontend.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
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: 2
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:3.36.3@sha256:4339ced184eb228da06b5050da11794ea221f47be8a7ca24369a54a8cece923b
args: ["up"]
env:
- name: PGDATABASE
value: sg
- name: PGHOST
value: pgsql
- name: PGPORT
value: "5432"
- name: PGSSLMODE
value: disable
- name: PGUSER
value: sg
- name: CODEINSIGHTS_PGDATASOURCE
value: postgres://postgres:password@codeinsights-db:5432/postgres
- name: CODEINTEL_PGDATABASE
value: sg
- name: CODEINTEL_PGHOST
value: codeintel-db
- name: CODEINTEL_PGPORT
value: "5432"
- name: CODEINTEL_PGSSLMODE
value: disable
- name: CODEINTEL_PGUSER
value: sg
containers:
- name: frontend
image: index.docker.io/sourcegraph/frontend:insiders@sha256:5b39d9736d201df9547391c86b08fa43ba4f500eac3c151d4dd253045aeded47
args:
- serve
env:
- name: PGDATABASE
value: sg
- name: PGHOST
value: pgsql
- name: PGPORT
value: "5432"
- name: PGSSLMODE
value: disable
- name: PGUSER
value: sg
- name: CODEINSIGHTS_PGDATASOURCE
value: postgres://postgres:password@codeinsights-db:5432/postgres
- name: CODEINTEL_PGDATABASE
value: sg
- name: CODEINTEL_PGHOST
value: codeintel-db
- name: CODEINTEL_PGPORT
value: "5432"
- name: CODEINTEL_PGSSLMODE
value: disable
- name: CODEINTEL_PGUSER
value: sg
# POD_NAME is used by CACHE_DIR
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
# CACHE_DIR stores larger items we cache. Majority of it is zip
# archives of repositories at a commit.
- name: CACHE_DIR
value: /mnt/cache/$(POD_NAME)
- name: GRAFANA_SERVER_URL
value: http://grafana:30070
- name: JAEGER_SERVER_URL
value: http://jaeger-query:16686
- name: PROMETHEUS_URL
value: http://prometheus:30090
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
volumeMounts:
- mountPath: /mnt/cache
name: cache-ssd
- name: jaeger-agent
image: index.docker.io/sourcegraph/jaeger-agent:insiders@sha256:75a3a365a89dc7377583df1e99b1955214d00dbf5d1e7d2626371733facdbcbd
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
ports:
- containerPort: 5775
protocol: UDP
- containerPort: 5778
protocol: TCP
- containerPort: 6831
protocol: UDP
- containerPort: 6832
protocol: UDP
resources:
limits:
cpu: "1"
memory: 500M
requests:
cpu: 100m
memory: 100M
args:
- --reporter.grpc.host-port=jaeger-collector:14250
- --reporter.type=grpc
securityContext:
runAsUser: 0
serviceAccountName: sourcegraph-frontend
volumes:
- emptyDir: {}
name: cache-ssd