Skip to content

Commit 72fc9aa

Browse files
daxmc99davejrt
andauthored
Create CI overlay (sourcegraph#4012)
* Create low resource overlay Co-authored-by: Dave Try <[email protected]>
1 parent 1989743 commit 72fc9aa

File tree

8 files changed

+476
-0
lines changed

8 files changed

+476
-0
lines changed

overlays/low-resource/LimitRange.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: LimitRange
3+
metadata:
4+
name: min-max-resources
5+
spec:
6+
7+
limits:
8+
- max:
9+
memory: 50G
10+
cpu: "16"
11+
min:
12+
memory: 500M
13+
cpu: 500m
14+
type: Container

overlays/low-resource/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Low Resources overlay
2+
3+
This overlay is intended for Sourcegraph internal CI tests. It removes resource requests including cpu, memory and persistent volumes to reduce load on shared clusters.
4+
5+
Note: `persistentVolumeClaim: null` is needed to avoid https://github.com/kubernetes-sigs/kustomize/issues/2037
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- op: remove
2+
path: /spec/template/spec/containers/0/resources
3+
- op: remove
4+
path: /spec/template/spec/containers/1/resources
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- op: remove
2+
path: /spec/template/spec/containers/0/resources
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: not-used
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: gitserver
10+
env:
11+
- name: POD_NAME
12+
valueFrom:
13+
fieldRef:
14+
apiVersion: v1
15+
fieldPath: metadata.name
16+
volumeMounts:
17+
- name: ci-volume
18+
mountPath: /data/repos
19+
subPathExpr: $(POD_NAME)
20+
volumes:
21+
- name: ci-volume
22+
hostPath:
23+
path: /mnt/disks/ssd0/buildkite/cluster-statefulset/
24+
type: DirectoryOrCreate
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: not-used
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: grafana
10+
env:
11+
- name: POD_NAME
12+
valueFrom:
13+
fieldRef:
14+
apiVersion: v1
15+
fieldPath: metadata.name
16+
volumeMounts:
17+
- name: ci-volume
18+
mountPath: /var/lib/grafana
19+
subPathExpr: $(POD_NAME)
20+
volumes:
21+
- name: ci-volume
22+
hostPath:
23+
path: /mnt/disks/ssd0/buildkite/cluster-statefulset/
24+
type: DirectoryOrCreate
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: not-used
5+
spec:
6+
template:
7+
spec:
8+
containers:
9+
- name: zoekt-webserver
10+
env:
11+
- name: POD_NAME
12+
valueFrom:
13+
fieldRef:
14+
apiVersion: v1
15+
fieldPath: metadata.name
16+
volumeMounts:
17+
- name: ci-volume
18+
mountPath: /data
19+
subPathExpr: $(POD_NAME)
20+
- name: zoekt-indexserver
21+
env:
22+
- name: POD_NAME
23+
valueFrom:
24+
fieldRef:
25+
apiVersion: v1
26+
fieldPath: metadata.name
27+
volumeMounts:
28+
- name: ci-volume
29+
mountPath: /data
30+
subPathExpr: $(POD_NAME)
31+
volumes:
32+
- name: ci-volume
33+
hostPath:
34+
path: /mnt/disks/ssd0/buildkite/cluster-statefulset/
35+
type: DirectoryOrCreate

0 commit comments

Comments
 (0)