Skip to content

Commit 9317dcb

Browse files
committed
feat: support auto assign node port for dp-manager
Add nodeport configuration support for dp-manager service: - Add autoAssignNodePort option to automatically set nodePort to same value as port - Add manual nodePort/tlsNodePort options for custom nodePort values - Update chart version to 0.17.48 - Update README documentation Reference: PR #258
1 parent 800fe1d commit 9317dcb

4 files changed

Lines changed: 24 additions & 1 deletion

File tree

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.47
18+
version: 0.17.48
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,17 @@ A Helm chart for Kubernetes
208208
| dp_manager_configuration.server.tls.host | string | `"0.0.0.0"` | |
209209
| dp_manager_configuration.server.tls.port | int | `7943` | |
210210
| dp_manager_service.annotations | object | `{}` | |
211+
| dp_manager_service.autoAssignNodePort | bool | `false` | Whether to set nodePort to the same value as the HTTP/HTTPS port when dp_manager_service.type is NodePort, make sure the nodePort to be in the valid NodePort range of kubernetes service. |
211212
| dp_manager_service.ingress.annotations | object | `{}` | |
212213
| dp_manager_service.ingress.className | string | `""` | |
213214
| dp_manager_service.ingress.enabled | bool | `false` | |
214215
| dp_manager_service.ingress.hosts[0].host | string | `"dp-manager.local"` | |
215216
| dp_manager_service.ingress.hosts[0].paths[0].path | string | `"/"` | |
216217
| dp_manager_service.ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
217218
| dp_manager_service.ingress.tls | list | `[]` | |
219+
| dp_manager_service.nodePort | int | `nil` | The nodePort for HTTP service, only used if dp_manager_service.type is NodePort. If not set, a random port will be assigned by Kubernetes. |
218220
| dp_manager_service.port | int | `7900` | |
221+
| dp_manager_service.tlsNodePort | int | `nil` | The nodePort for HTTPS service, only used if dp_manager_service.type is NodePort. If not set, a random port will be assigned by Kubernetes. |
219222
| dp_manager_service.tlsPort | int | `7943` | |
220223
| dp_manager_service.type | string | `"ClusterIP"` | |
221224
| fullnameOverride | string | `""` | |

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,24 @@ spec:
1919
targetPort: http
2020
protocol: TCP
2121
name: http
22+
{{- if eq .Values.dp_manager_service.type "NodePort" }}
23+
{{- if .Values.dp_manager_service.autoAssignNodePort }}
24+
nodePort: {{ .Values.dp_manager_service.port }}
25+
{{- else if .Values.dp_manager_service.nodePort }}
26+
nodePort: {{ .Values.dp_manager_service.nodePort }}
27+
{{- end }}
28+
{{- end }}
2229
- port: {{ .Values.dp_manager_service.tlsPort }}
2330
targetPort: https
2431
protocol: TCP
2532
name: https
33+
{{- if eq .Values.dp_manager_service.type "NodePort" }}
34+
{{- if .Values.dp_manager_service.autoAssignNodePort }}
35+
nodePort: {{ .Values.dp_manager_service.tlsPort }}
36+
{{- else if .Values.dp_manager_service.tlsNodePort }}
37+
nodePort: {{ .Values.dp_manager_service.tlsNodePort }}
38+
{{- end }}
39+
{{- end }}
2640

2741
selector:
2842
{{- include "api7ee3.selectorLabels" . | nindent 4 }}

charts/api7/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ dp_manager_service:
171171
annotations: {}
172172
port: 7900
173173
tlsPort: 7943
174+
# -- Whether to set nodePort to the same value as the HTTP/HTTPS port when dp_manager_service.type is NodePort, make sure the nodePort to be in the valid NodePort range of kubernetes service.
175+
autoAssignNodePort: false
176+
# -- (int) The nodePort for HTTP service, only used if dp_manager_service.type is NodePort. If not set, a random port will be assigned by Kubernetes.
177+
nodePort: null
178+
# -- (int) The nodePort for HTTPS service, only used if dp_manager_service.type is NodePort. If not set, a random port will be assigned by Kubernetes.
179+
tlsNodePort: null
174180
ingress:
175181
enabled: false
176182
className: ""

0 commit comments

Comments
 (0)