Skip to content

Commit 3dc7f08

Browse files
committed
configure resource requests and limits for native k8s executors
1 parent 7b728fe commit 3dc7f08

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

charts/sourcegraph-executor/k8s/templates/executor.Deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ spec:
6868
{{- toYaml . | trim | nindent 12 }}
6969
{{- end }}
7070
{{- end }}
71+
{{- if not .Values.sourcegraph.localDevMode }}
72+
resources:
73+
{{- toYaml .Values.executor.resources | nindent 12 }}
74+
{{- end }}
7175
livenessProbe:
7276
exec:
7377
command:

charts/sourcegraph-executor/k8s/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ sourcegraph:
1515
imagePullSecrets: [ ]
1616
# -- Add a global label to all resources
1717
labels: { }
18+
# -- When true, remove all resource stanzas, allowing the scheduler to best-fit pods. Intended for local development with limited resources.
19+
localDevMode: false
1820
# -- Set a custom name for the app.kubernetes.io/name annotation
1921
nameOverride: ""
2022
# -- Affinity,
@@ -59,6 +61,13 @@ executor:
5961
image:
6062
defaultTag: 6.0.0@sha256:6dc771a0c281a41ef676213f2f84a63d99045cf2e58d43022554a8022070ed65
6163
name: "executor-kubernetes"
64+
resources:
65+
limits:
66+
cpu: "1"
67+
memory: 1Gi
68+
requests:
69+
cpu: 500m
70+
memory: 200Mi
6271
# -- The external URL of the Sourcegraph instance. Required. **Recommended:** set to the internal service endpoint (e.g. `http://sourcegraph-frontend.sourcegraph.svc.cluster.local:30080` if Sourcegraph is deployed in the `sourcegraph` namespace).
6372
# This will avoid unnecessary network charges as traffic will stay within the local network.
6473
frontendUrl: ""

0 commit comments

Comments
 (0)