added hostPort support for ssh (#276)

This fixes my feature request (#275) to support hostPort to expose the ssh port.

Co-authored-by: alex <alex@zengers.de>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/276
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io>
Co-authored-by: a-zen <a-zen@noreply.gitea.io>
Co-committed-by: a-zen <a-zen@noreply.gitea.io>
This commit is contained in:
a-zen 2022-02-25 17:18:57 +08:00 committed by luhahn
parent 7bdf742e81
commit 6896c7caae
3 changed files with 5 additions and 0 deletions

View File

@ -752,6 +752,7 @@ gitea:
| `service.ssh.port` | Port for ssh traffic | `22` |
| `service.ssh.loadBalancerIP` | LoadBalancer Ip setting | |
| `service.ssh.nodePort` | NodePort for ssh service | |
| `service.ssh.hostPort` | HostPort for ssh service | |
| `service.ssh.externalTrafficPolicy` | If `service.ssh.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable source IP preservation | |
| `service.ssh.externalIPs` | ssh service external IP addresses | |
| `service.ssh.loadBalancerSourceRanges` | Source range filter for ssh loadbalancer | `[]` |

View File

@ -228,6 +228,9 @@ spec:
ports:
- name: ssh
containerPort: {{ .Values.gitea.config.server.SSH_LISTEN_PORT }}
{{- if .Values.service.ssh.hostPort }}
hostPort: {{ .Values.service.ssh.hostPort }}
{{- end }}
- name: http
containerPort: {{ .Values.gitea.config.server.HTTP_PORT }}
{{- if .Values.gitea.config.server.ENABLE_PPROF }}

View File

@ -60,6 +60,7 @@ service:
#nodePort:
#externalTrafficPolicy:
#externalIPs:
#hostPort:
loadBalancerSourceRanges: []
annotations: