Skip to content

Commit c6da8a2

Browse files
authored
feat: support topologySpreadConstraints for gateway and api7 chart (#220)
Signed-off-by: Nic <[email protected]>
1 parent 6b1cde9 commit c6da8a2

File tree

10 files changed

+31
-3
lines changed

10 files changed

+31
-3
lines changed

charts/api7/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.17.28
18+
version: 0.17.29
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/api7/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# api7ee3
22

3-
![Version: 0.17.28](https://img.shields.io/badge/Version-0.17.28-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.8.16](https://img.shields.io/badge/AppVersion-3.8.16-informational?style=flat-square)
3+
![Version: 0.17.29](https://img.shields.io/badge/Version-0.17.29-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.8.16](https://img.shields.io/badge/AppVersion-3.8.16-informational?style=flat-square)
44

55
A Helm chart for Kubernetes
66

@@ -236,4 +236,5 @@ A Helm chart for Kubernetes
236236
| serviceAccount.create | bool | `true` | |
237237
| serviceAccount.name | string | `""` | |
238238
| tolerations | list | `[]` | |
239+
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pod assignment https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ The value is evaluated as a template |
239240

charts/api7/templates/dashboard-deploy.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,7 @@ spec:
136136
tolerations:
137137
{{- toYaml . | nindent 8 }}
138138
{{- end }}
139+
{{- with .Values.topologySpreadConstraints }}
140+
topologySpreadConstraints:
141+
{{- tpl (. | toYaml) $ | nindent 8 }}
142+
{{- end }}

charts/api7/templates/developer-portal-deploy.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,8 @@ spec:
110110
tolerations:
111111
{{- toYaml . | nindent 8 }}
112112
{{- end }}
113+
{{- with .Values.topologySpreadConstraints }}
114+
topologySpreadConstraints:
115+
{{- tpl (. | toYaml) $ | nindent 8 }}
116+
{{- end }}
113117
{{- end }}

charts/api7/templates/dp-manager-deploy.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,7 @@ spec:
121121
tolerations:
122122
{{- toYaml . | nindent 8 }}
123123
{{- end }}
124+
{{- with .Values.topologySpreadConstraints }}
125+
topologySpreadConstraints:
126+
{{- tpl (. | toYaml) $ | nindent 8 }}
127+
{{- end }}

charts/api7/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ tolerations: []
221221

222222
affinity: {}
223223

224+
# -- Topology Spread Constraints for pod assignment
225+
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
226+
# The value is evaluated as a template
227+
topologySpreadConstraints: []
228+
224229
busybox:
225230
image:
226231
repository: docker.io/busybox

charts/gateway/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type: application
1414
# This is the chart version. This version number should be incremented each time you make changes
1515
# to the chart and its templates, including the app version.
1616
# Versions are expected to follow Semantic Versioning (https://semver.org/)
17-
version: 0.2.32
17+
version: 0.2.33
1818

1919
# This is the version number of the application being deployed. This version number should be
2020
# incremented each time you make changes to the application. Versions are not expected to

charts/gateway/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ The command removes all the Kubernetes components associated with the chart and
130130
| apisix.stream.luaSharedDict.worker-events-stream | string | `"10m"` | |
131131
| apisix.timezone | string | `""` | timezone is the timezone where apisix uses. For example: "UTC" or "Asia/Shanghai" This value will be set on apisix container's environment variable TZ. You may need to set the timezone to be consistent with your local time zone, otherwise the apisix's logs may used to retrieve event maybe in wrong timezone. |
132132
| apisix.tolerations | list | `[]` | List of node taints to tolerate |
133+
| apisix.topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pod assignment https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ The value is evaluated as a template |
133134
| autoscaling.enabled | bool | `false` | |
134135
| autoscaling.maxReplicas | int | `100` | |
135136
| autoscaling.minReplicas | int | `1` | |

charts/gateway/templates/_pod.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,8 @@ spec:
254254
tolerations:
255255
{{- toYaml . | nindent 4 }}
256256
{{- end }}
257+
{{- with .Values.apisix.topologySpreadConstraints }}
258+
topologySpreadConstraints:
259+
{{- tpl (. | toYaml) $ | nindent 4 }}
260+
{{- end }}
257261
{{- end -}}

charts/gateway/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ apisix:
171171
# -- Set the maxUnavailable of podDisruptionBudget
172172
maxUnavailable: 1
173173

174+
# -- Topology Spread Constraints for pod assignment
175+
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
176+
# The value is evaluated as a template
177+
topologySpreadConstraints: []
178+
174179
# -- Set pod resource requests & limits
175180
resources: {}
176181
# -- Use the host's network namespace

0 commit comments

Comments
 (0)