Skip to content

Commit 2c02800

Browse files
authoredFeb 23, 2024
feat: helm chart affinities & resource reqs/limits (#26)
1 parent 25aa8ce commit 2c02800

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed
 

‎helm/templates/service.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ spec:
5353
imagePullSecrets:
5454
{{- toYaml . | nindent 8 }}
5555
{{- end }}
56+
{{- with .Values.affinity }}
57+
affinity:
58+
{{- toYaml . | nindent 8 }}
59+
{{- end }}
60+
{{- with .Values.tolerations }}
61+
tolerations:
62+
{{- toYaml . | nindent 8 }}
63+
{{- end }}
5664
{{- with .Values.nodeSelector }}
5765
nodeSelector:
5866
{{- toYaml . | nindent 8 }}
@@ -63,6 +71,7 @@ spec:
6371
imagePullPolicy: {{ .Values.image.pullPolicy }}
6472
command:
6573
- /coder-logstream-kube
74+
resources: {{ toYaml .Values.resources | nindent 12 }}
6675
env:
6776
- name: CODER_URL
6877
value: {{ .Values.url }}

‎helm/values.yaml

+36-1
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,44 @@ serviceAccount:
4646
# coder.serviceAccount.name -- The service account name
4747
name: coder-logstream-kube
4848

49+
# resources -- The resources to request for the Deployment. These are optional
50+
# and are not set by default.
51+
resources:
52+
{}
53+
# limits:
54+
# cpu: 500m
55+
# memory: 500Mi
56+
# requests:
57+
# cpu: 2000m
58+
# memory: 2000Mi
59+
4960
# nodeSelector -- Node labels for constraining the coder-logstream pod to specific nodes.
5061
nodeSelector: {}
5162

63+
# affinity -- Allows specifying an affinity rule for the Deployment.
64+
# The default rule prefers to schedule coder pods on different
65+
# nodes, which is only applicable if coder.replicaCount is greater than 1.
66+
affinity: {}
67+
# podAntiAffinity:
68+
# preferredDuringSchedulingIgnoredDuringExecution:
69+
# - podAffinityTerm:
70+
# labelSelector:
71+
# matchExpressions:
72+
# - key: app.kubernetes.io/instance: coder-logstream-kube
73+
# operator: In
74+
# values:
75+
# - "true"
76+
# topologyKey: kubernetes.io/hostname
77+
# weight: 1
78+
79+
# tolerations -- Tolerations for tainted nodes.
80+
# See: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
81+
tolerations: {}
82+
# - key: "key"
83+
# operator: "Equal"
84+
# value: "value"
85+
# effect: "NoSchedule"
86+
5287
# labels -- The pod labels for coder-logstream-kube. See:
5388
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
54-
labels: {}
89+
labels: {}

0 commit comments

Comments
 (0)
Please sign in to comment.