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