mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
helm: add affinity, nodeSelectors, tolerations (#4763)
This commit is contained in:
@ -30,9 +30,21 @@ spec:
|
||||
restartPolicy: Always
|
||||
{{- with .Values.coder.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: 60
|
||||
{{- with .Values.coder.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.coder.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.coder.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: coder
|
||||
image: {{ include "coder.image" . | quote }}
|
||||
|
@ -65,8 +65,7 @@ coder:
|
||||
|
||||
# coder.resources -- The resources to request for Coder. These are optional
|
||||
# and are not set by default.
|
||||
resources:
|
||||
{}
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
@ -74,6 +73,35 @@ coder:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# coder.affinity -- Allows specifying an affinity rule for the `coder` 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.coder.com
|
||||
operator: In
|
||||
values:
|
||||
- "true"
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 1
|
||||
|
||||
# coder.tolerations -- Tolerations for tainted nodes.
|
||||
# See: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
tolerations: {}
|
||||
# - key: "key"
|
||||
# operator: "Equal"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule"
|
||||
|
||||
# coder.nodeSelector -- Node labels for constraining coder pods to nodes.
|
||||
# See: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
nodeSelector: {}
|
||||
# kubernetes.io/os: linux
|
||||
|
||||
# coder.service -- The Service object to expose for Coder.
|
||||
service:
|
||||
# coder.service.enable -- Whether to create the Service object.
|
||||
|
Reference in New Issue
Block a user