From 6a6268c8d7b6e2a9dcce1edab8ba2dd84f3eaa12 Mon Sep 17 00:00:00 2001 From: Gintautas Sulskus Date: Wed, 5 Sep 2018 16:30:43 +0100 Subject: [PATCH] added affinity and tolerations Signed-off-by: Gintautas Sulskus --- .../cert-manager/templates/deployment.yaml | 8 +++++++ contrib/charts/cert-manager/values.yaml | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/contrib/charts/cert-manager/templates/deployment.yaml b/contrib/charts/cert-manager/templates/deployment.yaml index 5a48c7942..83f801241 100644 --- a/contrib/charts/cert-manager/templates/deployment.yaml +++ b/contrib/charts/cert-manager/templates/deployment.yaml @@ -59,6 +59,14 @@ spec: {{- if .defaultACMEDNS01ChallengeProvider }} - --default-acme-issuer-dns01-provider-name={{ .defaultACMEDNS01ChallengeProvider }} {{- end }} + {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 10 }} {{- end }} env: - name: POD_NAMESPACE diff --git a/contrib/charts/cert-manager/values.yaml b/contrib/charts/cert-manager/values.yaml index 3ebec3b09..78d488742 100644 --- a/contrib/charts/cert-manager/values.yaml +++ b/contrib/charts/cert-manager/values.yaml @@ -81,3 +81,25 @@ createNamespaceResource: false # http_proxy: "http://proxy:8080" # http_proxy: "http://proxy:8080" # no_proxy: 127.0.0.1,localhost + +# expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#affinity-v1-core +# for example: +# affinity: +# nodeAffinity: +# requiredDuringSchedulingIgnoredDuringExecution: +# nodeSelectorTerms: +# - matchExpressions: +# - key: foo.bar.com/role +# operator: In +# values: +# - master +affinity: {} + +# expects input structure as per specification https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#toleration-v1-core +# for example: +# tolerations: +# - key: foo.bar.com/role +# operator: Equal +# value: master +# effect: NoSchedule +tolerations: []