Skip to content

Commit 766b1d4

Browse files
authored
Add MinIO deployment (sourcegraph#1158)
1 parent ed272f6 commit 766b1d4

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

base/minio/minio.Deployment.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
annotations:
5+
description: MinIO for storing LSIF uploads.
6+
labels:
7+
deploy: sourcegraph
8+
sourcegraph-resource-requires: no-cluster-admin
9+
app.kubernetes.io/component: minio
10+
name: minio
11+
spec:
12+
minReadySeconds: 10
13+
replicas: 1
14+
revisionHistoryLimit: 10
15+
selector:
16+
matchLabels:
17+
app: minio
18+
strategy:
19+
type: Recreate
20+
template:
21+
metadata:
22+
labels:
23+
deploy: sourcegraph
24+
app: minio
25+
spec:
26+
containers:
27+
- env:
28+
- name: MINIO_ACCESS_KEY
29+
value: AKIAIOSFODNN7EXAMPLE
30+
- name: MINIO_SECRET_KEY
31+
value: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
32+
image: index.docker.io/sourcegraph/minio@sha256:3d7a0147396ea799284ba707765d477797518425682c9aa65faa5883a63fac4f
33+
terminationMessagePolicy: FallbackToLogsOnError
34+
name: minio
35+
ports:
36+
- containerPort: 9000
37+
name: minio
38+
livenessProbe:
39+
httpGet:
40+
path: /minio/health/live
41+
port: http
42+
scheme: HTTP
43+
initialDelaySeconds: 60
44+
timeoutSeconds: 5
45+
readinessProbe:
46+
httpGet:
47+
path: /minio/health/live
48+
port: http
49+
scheme: HTTP
50+
periodSeconds: 5
51+
timeoutSeconds: 5
52+
resources:
53+
limits:
54+
cpu: "1"
55+
memory: 500M
56+
requests:
57+
cpu: "1"
58+
memory: 500M
59+
volumeMounts:
60+
- mountPath: /data
61+
name: minio-data
62+
securityContext:
63+
runAsUser: 0
64+
volumes:
65+
- name: minio-data
66+
persistentVolumeClaim:
67+
claimName: minio
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
labels:
5+
deploy: sourcegraph
6+
sourcegraph-resource-requires: no-cluster-admin
7+
app.kubernetes.io/component: minio
8+
name: minio
9+
spec:
10+
accessModes:
11+
- ReadWriteOnce
12+
resources:
13+
requests:
14+
storage: 100Gi
15+
storageClassName: sourcegraph

base/minio/minio.Service.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
annotations:
5+
prometheus.io/port: "9000"
6+
prometheus.io/path: "/minio/prometheus/metrics"
7+
sourcegraph.prometheus/scrape: "true"
8+
labels:
9+
app: minio
10+
deploy: sourcegraph
11+
sourcegraph-resource-requires: no-cluster-admin
12+
app.kubernetes.io/component: minio
13+
name: minio
14+
spec:
15+
ports:
16+
- name: minio
17+
port: 9000
18+
targetPort: minio
19+
selector:
20+
app: minio
21+
type: ClusterIP

0 commit comments

Comments
 (0)