helm-chart/templates/gitea/ssh-svc.yaml
onedr0p 5261fa8599 Let service.ssh.externalIPs and service.ssh.externalTrafficPolicy be configurable (#15)
remove Cluster from readme

externalTrafficPolicy and externalIPs example in values

document service.ssh.externalTrafficPolicy and service.ssh.externalIPs

bump chart version

externalIPs and externalTrafficPolicy

let service.ssh.externalIPs and service.ssh.externalTrafficPolicy be configurable

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/15
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-09-02 12:09:24 +00:00

34 lines
1.1 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ include "gitea.fullname" . }}-ssh
labels:
{{- include "gitea.labels" . | nindent 4 }}
annotations:
{{ toYaml .Values.service.ssh.annotations | indent 4 }}
spec:
type: {{ .Values.service.ssh.type }}
{{- if and .Values.service.ssh.loadBalancerIP (eq .Values.service.ssh.type "LoadBalancer") }}
loadBalancerIP: {{ .Values.service.ssh.loadBalancerIP }}
{{- end }}
{{- if ne .Values.service.ssh.type "LoadBalancer" }}
clusterIP: None
{{- end }}
{{- if .Values.service.ssh.externalIPs }}
externalIPs:
{{ toYaml .Values.service.ssh.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.service.ssh.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.ssh.externalTrafficPolicy }}
{{- end }}
ports:
- name: ssh
port: {{ .Values.service.ssh.port }}
targetPort: {{ .Values.gitea.config.server.SSH_LISTEN_PORT }}
protocol: TCP
{{- if .Values.service.ssh.nodePort }}
nodePort: {{ .Values.service.ssh.nodePort }}
{{- end }}
selector:
{{- include "gitea.selectorLabels" . | nindent 4 }}