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 123
Expand file tree
/
Copy pathcodeintel-db.Deployment.yaml
More file actions
103 lines (103 loc) · 2.98 KB
/
codeintel-db.Deployment.yaml
File metadata and controls
103 lines (103 loc) · 2.98 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:
description: Postgres database for various data.
kubectl.kubernetes.io/default-container: pgsql
labels:
app.kubernetes.io/component: codeintel-db
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
name: codeintel-db
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: codeintel-db
strategy:
type: Recreate
template:
metadata:
labels:
deploy: sourcegraph
app: codeintel-db
group: backend
spec:
initContainers:
- name: correct-data-dir-permissions
image: us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal/alpine-3.14:6.1.1295@sha256:5551722b2ba1424d00e0735773c8fbcf7fd350c49f8865b4f9675a2a35abd2f1
command: ["sh", "-c", "if [ -d /data/pgdata-12 ]; then chmod 750 /data/pgdata-12; fi"]
volumeMounts:
- mountPath: /data
name: disk
securityContext:
runAsUser: 0
resources:
limits:
cpu: "10m"
memory: "50Mi"
requests:
cpu: "10m"
memory: "50Mi"
containers:
- name: pgsql
image: us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal/postgresql-16:6.1.1295@sha256:735d3b09cd62ab48d0040dd08ad3c97ae5d13abffae6c2ace7ee7698c25978f1
terminationMessagePolicy: FallbackToLogsOnError
readinessProbe:
exec:
command:
- /ready.sh
livenessProbe:
initialDelaySeconds: 15
exec:
command:
- /liveness.sh
startupProbe:
exec:
command:
- /liveness.sh
failureThreshold: 360
periodSeconds: 10
ports:
- containerPort: 5432
name: pgsql
resources:
limits:
cpu: "4"
memory: 4Gi
requests:
cpu: "4"
memory: 4Gi
volumeMounts:
- mountPath: /data
name: disk
- mountPath: /conf
name: pgsql-conf
- env:
- name: DATA_SOURCE_NAME
value: postgres://sg:@localhost:5432/?sslmode=disable
- name: PG_EXPORTER_EXTEND_QUERY_PATH
value: /config/code_intel_queries.yaml
image: us-central1-docker.pkg.dev/sourcegraph-ci/rfc795-internal/postgres_exporter:6.1.1295@sha256:eb41e15d936f5f5c054507eddb761108bd89e0f5d8c279a33dd90ab77669cfd8
terminationMessagePolicy: FallbackToLogsOnError
name: pgsql-exporter
resources:
limits:
cpu: 10m
memory: 50Mi
requests:
cpu: 10m
memory: 50Mi
terminationGracePeriodSeconds: 120
securityContext:
runAsUser: 0
volumes:
- name: disk
persistentVolumeClaim:
claimName: codeintel-db
- name: pgsql-conf
configMap:
defaultMode: 0777
name: codeintel-db-conf