Skip to content

Commit 298ef0a

Browse files
authored
feat: configure different topologySpreadConstraints for componenets in api7 (#221)
Signed-off-by: Nic <[email protected]>
1 parent c6da8a2 commit 298ef0a

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
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.29
18+
version: 0.17.30
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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# api7ee3
22

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)
3+
![Version: 0.17.30](https://img.shields.io/badge/Version-0.17.30-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

@@ -39,6 +39,7 @@ A Helm chart for Kubernetes
3939
| dashboard.readinessProbe.initialDelaySeconds | int | `10` | |
4040
| dashboard.readinessProbe.periodSeconds | int | `3` | |
4141
| dashboard.replicaCount | int | `1` | |
42+
| dashboard.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 |
4243
| dashboard_configuration.audit.retention_days | int | `60` | |
4344
| dashboard_configuration.console.addr | string | `"http://127.0.0.1:3000"` | |
4445
| dashboard_configuration.consumer_proxy.cache_failure_count | int | `512` | |
@@ -114,6 +115,7 @@ A Helm chart for Kubernetes
114115
| developer_portal.readinessProbe.initialDelaySeconds | int | `10` | |
115116
| developer_portal.readinessProbe.periodSeconds | int | `3` | |
116117
| developer_portal.replicaCount | int | `1` | |
118+
| developer_portal.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 |
117119
| developer_portal_configuration.database.dsn | string | `"postgres://api7ee:changeme@api7-postgresql:5432/api7ee"` | |
118120
| developer_portal_configuration.database.max_idle_time | string | `"30s"` | |
119121
| developer_portal_configuration.database.max_open_conns | int | `30` | |
@@ -152,6 +154,7 @@ A Helm chart for Kubernetes
152154
| dp_manager.readinessProbe.initialDelaySeconds | int | `10` | |
153155
| dp_manager.readinessProbe.periodSeconds | int | `3` | |
154156
| dp_manager.replicaCount | int | `1` | |
157+
| dp_manager.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 |
155158
| dp_manager_configuration.consumer_cache.evict_interval | string | `"5s"` | |
156159
| dp_manager_configuration.consumer_cache.max_ttl | string | `"2h"` | |
157160
| dp_manager_configuration.consumer_cache.size | int | `50000` | |

charts/api7/templates/dashboard-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ spec:
136136
tolerations:
137137
{{- toYaml . | nindent 8 }}
138138
{{- end }}
139-
{{- with .Values.topologySpreadConstraints }}
139+
{{- with or .Values.dashboard.topologySpreadConstraints .Values.topologySpreadConstraints }}
140140
topologySpreadConstraints:
141141
{{- tpl (. | toYaml) $ | nindent 8 }}
142142
{{- end }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ spec:
110110
tolerations:
111111
{{- toYaml . | nindent 8 }}
112112
{{- end }}
113-
{{- with .Values.topologySpreadConstraints }}
113+
{{- with or .Values.developer_portal.topologySpreadConstraints .Values.topologySpreadConstraints }}
114114
topologySpreadConstraints:
115115
{{- tpl (. | toYaml) $ | nindent 8 }}
116116
{{- end }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ spec:
121121
tolerations:
122122
{{- toYaml . | nindent 8 }}
123123
{{- end }}
124-
{{- with .Values.topologySpreadConstraints }}
124+
{{- with or .Values.dp_manager.topologySpreadConstraints .Values.topologySpreadConstraints }}
125125
topologySpreadConstraints:
126126
{{- tpl (. | toYaml) $ | nindent 8 }}
127127
{{- end }}

charts/api7/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ dashboard:
3535
extraVolumes: []
3636
extraVolumeMounts: []
3737
podLabels: {}
38+
# -- Topology Spread Constraints for pod assignment
39+
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
40+
# The value is evaluated as a template
41+
topologySpreadConstraints: []
3842
livenessProbe:
3943
initialDelaySeconds: 180
4044
periodSeconds: 10
@@ -67,6 +71,10 @@ dp_manager:
6771
extraVolumes: []
6872
extraVolumeMounts: []
6973
podLabels: {}
74+
# -- Topology Spread Constraints for pod assignment
75+
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
76+
# The value is evaluated as a template
77+
topologySpreadConstraints: []
7078
livenessProbe:
7179
initialDelaySeconds: 60
7280
periodSeconds: 3
@@ -90,6 +98,10 @@ developer_portal:
9098
extraVolumes: []
9199
extraVolumeMounts: []
92100
podLabels: {}
101+
# -- Topology Spread Constraints for pod assignment
102+
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
103+
# The value is evaluated as a template
104+
topologySpreadConstraints: []
93105
livenessProbe:
94106
initialDelaySeconds: 60
95107
periodSeconds: 3

0 commit comments

Comments
 (0)