This is an automated email from the ASF dual-hosted git repository.
kvn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new 8afbea1 fix: break change with affinity (#36)
8afbea1 is described below
commit 8afbea11b7246559bdfe02365e55ab95cd36eb4c
Author: Jun <[email protected]>
AuthorDate: Thu Mar 4 12:37:08 2021 +0800
fix: break change with affinity (#36)
---
charts/apisix/templates/deployment.yaml | 7 +++++--
charts/apisix/values.yaml | 5 ++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/charts/apisix/templates/deployment.yaml
b/charts/apisix/templates/deployment.yaml
index aaba932..e8df5ca 100644
--- a/charts/apisix/templates/deployment.yaml
+++ b/charts/apisix/templates/deployment.yaml
@@ -97,8 +97,11 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
- {{- if .Values.affinity.enable }}
affinity:
+ {{- with .Values.affinity }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- if .Values.podAntiAffinity.enabled }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
@@ -109,7 +112,7 @@ spec:
values:
- {{ include "apisix.name" . }}
topologyKey: kubernetes.io/hostname
- weight: 100'
+ weight: 100
{{- end }}
{{- with .Values.tolerations }}
tolerations:
diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml
index e2b94b3..5cb53ed 100644
--- a/charts/apisix/values.yaml
+++ b/charts/apisix/values.yaml
@@ -190,5 +190,8 @@ nodeSelector: {}
tolerations: []
-affinity:
+affinity: {}
+
+# If true, it will sets the anti-affinity of the Pod.
+podAntiAffinity:
enabled: false