apiVersion: v1 kind: Service metadata: name: {{ include "gitea.fullname" . }}-http labels: {{- include "gitea.labels" . | nindent 4 }} spec: type: {{ .Values.service.http.type }} {{- if and .Values.service.http.loadBalancerIP (eq .Values.service.http.type "LoadBalancer") }} loadBalancerIP: {{ .Values.service.http.loadBalancerIP }} {{- end }} {{ if eq .Values.service.http.type "ClusterIP" }} clusterIP: None {{- end }} ports: - name: http port: {{ .Values.service.http.port }} {{- if .Values.service.http.nodePort }} nodePort: {{ .Values.service.http.nodePort }} {{- end }} targetPort: {{ .Values.gitea.config.server.HTTP_PORT }} selector: {{- include "gitea.selectorLabels" . | nindent 4 }}