2020-08-23 12:56:55 -05:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: {{ include "gitea.fullname" . }}-ssh
|
|
|
|
labels:
|
|
|
|
{{- include "gitea.labels" . | nindent 4 }}
|
|
|
|
annotations:
|
2020-10-26 08:04:04 -05:00
|
|
|
{{- toYaml .Values.service.ssh.annotations | nindent 4 }}
|
2020-08-23 12:56:55 -05:00
|
|
|
spec:
|
|
|
|
type: {{ .Values.service.ssh.type }}
|
|
|
|
{{- if and .Values.service.ssh.loadBalancerIP (eq .Values.service.ssh.type "LoadBalancer") }}
|
|
|
|
loadBalancerIP: {{ .Values.service.ssh.loadBalancerIP }}
|
|
|
|
{{- end }}
|
2020-12-16 06:37:47 -06:00
|
|
|
{{- if and .Values.service.ssh.clusterIP (eq .Values.service.ssh.type "ClusterIP") }}
|
|
|
|
clusterIP: {{ .Values.service.ssh.clusterIP }}
|
2020-08-23 12:56:55 -05:00
|
|
|
{{- end }}
|
2020-09-02 07:09:24 -05:00
|
|
|
{{- if .Values.service.ssh.externalIPs }}
|
|
|
|
externalIPs:
|
2020-10-26 08:04:04 -05:00
|
|
|
{{- toYaml .Values.service.ssh.externalIPs | nindent 4 }}
|
2020-09-02 07:09:24 -05:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.service.ssh.externalTrafficPolicy }}
|
|
|
|
externalTrafficPolicy: {{ .Values.service.ssh.externalTrafficPolicy }}
|
|
|
|
{{- end }}
|
2020-08-23 12:56:55 -05:00
|
|
|
ports:
|
|
|
|
- name: ssh
|
|
|
|
port: {{ .Values.service.ssh.port }}
|
|
|
|
targetPort: {{ .Values.gitea.config.server.SSH_LISTEN_PORT }}
|
|
|
|
protocol: TCP
|
2020-09-02 07:09:24 -05:00
|
|
|
{{- if .Values.service.ssh.nodePort }}
|
2020-08-23 12:56:55 -05:00
|
|
|
nodePort: {{ .Values.service.ssh.nodePort }}
|
|
|
|
{{- end }}
|
|
|
|
selector:
|
|
|
|
{{- include "gitea.selectorLabels" . | nindent 4 }}
|