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
{{- if .Values.service.ssh.externalIPs }}
externalIPs:
{{ toYaml .Values.service.ssh.externalIPs | indent 4 }}
{{- if .Values.service.ssh.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.ssh.externalTrafficPolicy }}
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 }}
selector:
{{- include "gitea.selectorLabels" . | nindent 4 }}