Alvearie / alvearie-helm

repository for the helm chart source and package for Alvearie projects
https://artifacthub.io/packages/helm/linuxforhealth
Apache License 2.0
3 stars 5 forks source link

[FHIR] Support configuring pod affinity, nodeSelector, and tolerations #39

Closed chgl closed 2 years ago

chgl commented 3 years ago

To follow best-practices when deploying more than one replica of the server, we should allow configuring the pod affinity, nodeSelector and toleration settings. See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/

A fairly simple, yet flexible implementation from the chart-users point of view would be the following:

    {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
    {{- end }}
    {{- with .Values.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
    {{- end }}
    {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
    {{- end }}

Additionally, adding a PDB (https://kubernetes.io/docs/tasks/run-application/configure-pdb/) is helpful from an "ops" perspective as well. See e.g. https://github.com/bitnami/charts/blob/master/bitnami/airflow/templates/web/poddisruptionbudget.yaml

chgl commented 2 years ago

Also clsoed by #65 🚀