Allow configuration of ipFamilyPolicy and ipFamilies (#313)

To enable access to e.g. the SSH port by IPv6, the selection of ipFamilyPolicy and ipFamilies service attributes is necessary. Enable the possibility to configure these by helm values.

Co-authored-by: Sven Fischer <sven@leiderfischer.de>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/313
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io>
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Co-authored-by: svenihoney <svenihoney@noreply.gitea.io>
Co-committed-by: svenihoney <svenihoney@noreply.gitea.io>
This commit is contained in:
svenihoney 2022-04-25 19:56:25 +08:00 committed by luhahn
parent b06b3edf1d
commit 52ed32ae74
4 changed files with 26 additions and 0 deletions

View File

@ -776,9 +776,13 @@ gitea:
| `service.http.nodePort` | NodePort for http service | |
| `service.http.externalTrafficPolicy` | If `service.http.type` is `NodePort` or `LoadBalancer`, set this to `Local` to enable source IP preservation | |
| `service.http.externalIPs` | http service external IP addresses | |
| `service.http.ipFamilyPolicy` | http service dual-stack policy | |
| `service.http.ipFamilies` | http service dual-stack familiy selection | |
| `service.http.loadBalancerSourceRanges` | Source range filter for http loadbalancer | `[]` |
| `service.http.annotations` | http service annotations | |
For dual-stack parameters see official kubernetes [dual-stack concept documentation](https://kubernetes.io/docs/concepts/services-networking/dual-stack/).
#### SSH
| Parameter | Description | Default |
@ -790,9 +794,13 @@ gitea:
| `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.ipFamilyPolicy` | ssh service dual-stack policy | |
| `service.ssh.ipFamilies` | ssh service dual-stack familiy selection | |
| `service.ssh.loadBalancerSourceRanges` | Source range filter for ssh loadbalancer | `[]` |
| `service.ssh.annotations` | ssh service annotations | |
For dual-stack parameters see official kubernetes [dual-stack concept documentation](https://kubernetes.io/docs/concepts/services-networking/dual-stack/).
### Gitea Configuration
| Parameter | Description | Default |

View File

@ -21,6 +21,13 @@ spec:
externalIPs:
{{- toYaml .Values.service.http.externalIPs | nindent 4 }}
{{- end }}
{{- if .Values.service.http.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.service.http.ipFamilyPolicy }}
{{- end }}
{{- with .Values.service.http.ipFamilies }}
ipFamilies:
{{- toYaml . | nindent 4 }}
{{- end -}}
{{- if .Values.service.http.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.http.externalTrafficPolicy }}
{{- end }}

View File

@ -26,6 +26,13 @@ spec:
externalIPs:
{{- toYaml .Values.service.ssh.externalIPs | nindent 4 }}
{{- end }}
{{- if .Values.service.ssh.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.service.ssh.ipFamilyPolicy }}
{{- end }}
{{- with .Values.service.ssh.ipFamilies }}
ipFamilies:
{{- toYaml . | nindent 4 }}
{{- end -}}
{{- if .Values.service.ssh.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.ssh.externalTrafficPolicy }}
{{- end }}

View File

@ -51,6 +51,8 @@ service:
#nodePort:
#externalTrafficPolicy:
#externalIPs:
#ipFamilyPolicy:
#ipFamilies:
loadBalancerSourceRanges: []
annotations:
ssh:
@ -61,6 +63,8 @@ service:
#nodePort:
#externalTrafficPolicy:
#externalIPs:
#ipFamilyPolicy:
#ipFamilies:
#hostPort:
loadBalancerSourceRanges: []
annotations: