github.com/jenkins-x/jx/v2@v2.1.155/pkg/cmd/step/test_data/step_tag_project/charts/mydemo/templates/service.yaml (about)

     1  apiVersion: v1
     2  kind: Service
     3  metadata:
     4  {{- if .Values.service.name }}
     5    name: {{ .Values.service.name }}
     6  {{- else }}
     7    name: {{ template "fullname" . }}
     8  {{- end }}
     9    labels:
    10      chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    11  {{- if .Values.service.annotations }}
    12    annotations:
    13  {{ toYaml .Values.service.annotations | indent 4 }}
    14  {{- end }}
    15  spec:
    16    type: {{ .Values.service.type }}
    17    ports:
    18    - port: {{ .Values.service.externalPort }}
    19      targetPort: {{ .Values.service.internalPort }}
    20      protocol: TCP
    21      name: http
    22    selector:
    23      app: {{ template "fullname" . }}