github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/examples/helm-charts/chart/templates/service.yaml (about) 1 {{- if .Values.service.enabled -}} 2 apiVersion: v1 3 kind: Service 4 metadata: 5 name: {{ template "podinfo.fullname" . }} 6 labels: 7 {{- include "podinfo.labels" . | nindent 4 }} 8 {{- with .Values.service.annotations }} 9 annotations: 10 {{ toYaml . | indent 4 }} 11 {{- end }} 12 spec: 13 type: {{ .Values.service.type }} 14 ports: 15 - port: {{ .Values.service.externalPort }} 16 targetPort: http 17 protocol: TCP 18 name: http 19 {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} 20 nodePort: {{ .Values.service.nodePort }} 21 {{- end }} 22 {{- if .Values.tls.enabled }} 23 - port: {{ .Values.tls.port | default 9899 }} 24 targetPort: https 25 protocol: TCP 26 name: https 27 {{- end }} 28 {{- if .Values.service.grpcPort }} 29 - port: {{ .Values.service.grpcPort }} 30 targetPort: grpc 31 protocol: TCP 32 name: grpc 33 {{- end }} 34 selector: 35 {{- include "podinfo.selectorLabels" . | nindent 4 }} 36 {{- end }}