Skip to content

Commit

Permalink
feat: helm chart affinities & resource reqs/limits (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpaulsen authored Feb 23, 2024
1 parent 25aa8ce commit 2c02800
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
9 changes: 9 additions & 0 deletions helm/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -63,6 +71,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /coder-logstream-kube
resources: {{ toYaml .Values.resources | nindent 12 }}
env:
- name: CODER_URL
value: {{ .Values.url }}
Expand Down
37 changes: 36 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,44 @@ serviceAccount:
# coder.serviceAccount.name -- The service account name
name: coder-logstream-kube

# resources -- The resources to request for the Deployment. These are optional
# and are not set by default.
resources:
{}
# limits:
# cpu: 500m
# memory: 500Mi
# requests:
# cpu: 2000m
# memory: 2000Mi

# nodeSelector -- Node labels for constraining the coder-logstream pod to specific nodes.
nodeSelector: {}

# affinity -- Allows specifying an affinity rule for the Deployment.
# The default rule prefers to schedule coder pods on different
# nodes, which is only applicable if coder.replicaCount is greater than 1.
affinity: {}
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: app.kubernetes.io/instance: coder-logstream-kube
# operator: In
# values:
# - "true"
# topologyKey: kubernetes.io/hostname
# weight: 1

# tolerations -- Tolerations for tainted nodes.
# See: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: {}
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"

# labels -- The pod labels for coder-logstream-kube. See:
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
labels: {}
labels: {}

0 comments on commit 2c02800

Please sign in to comment.