From 3846d428fc9144741c92b0a88a0f43d7b78e7c17 Mon Sep 17 00:00:00 2001 From: Mario Hros Date: Fri, 14 Feb 2020 22:26:37 +0100 Subject: [PATCH] helm: support affinity and resources --- .../templates/deployment.yaml | 6 ++++++ helm/appidentityandaccessadapter/values.yaml | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/helm/appidentityandaccessadapter/templates/deployment.yaml b/helm/appidentityandaccessadapter/templates/deployment.yaml index ca172c4..922e59f 100644 --- a/helm/appidentityandaccessadapter/templates/deployment.yaml +++ b/helm/appidentityandaccessadapter/templates/deployment.yaml @@ -37,6 +37,12 @@ spec: volumeMounts: - name: transient-storage mountPath: /volume + resources: +{{ toYaml .Values.resources | indent 12 }} volumes: - name: transient-storage emptyDir: {} +{{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} +{{- end }} diff --git a/helm/appidentityandaccessadapter/values.yaml b/helm/appidentityandaccessadapter/values.yaml index 34f349b..5bddb37 100644 --- a/helm/appidentityandaccessadapter/values.yaml +++ b/helm/appidentityandaccessadapter/values.yaml @@ -57,3 +57,22 @@ logging: ## from -1 to 7 ## See zapcore: https://godoc.org/go.uber.org/zap/zapcore#Level level: 0 + +# resources: + # limits: + # cpu: 100m + # memory: 80Mi + # requests: + # cpu: 10m + # memory: 40Mi + +affinity: {} + # podAntiAffinity: + # preferredDuringSchedulingIgnoredDuringExecution: + # - weight: 5 + # podAffinityTerm: + # topologyKey: "kubernetes.io/hostname" + # labelSelector: + # matchLabels: + # app: {{ template "dex.name" . }} + # release: "{{ .Release.Name }}"