github.com/zsuzhengdu/helm@v3.0.0-beta.3+incompatible/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml (about)

     1  {{- define "common.ingress.tpl" -}}
     2  apiVersion: extensions/v1beta1
     3  kind: Ingress
     4  {{ template "common.metadata" . }}
     5    {{- if .Values.ingress.annotations }}
     6    annotations:
     7      {{ include "common.annote" .Values.ingress.annotations | indent 4 }}
     8    {{- end }}
     9  spec:
    10    rules:
    11    {{- range $host := .Values.ingress.hosts }}
    12    - host: {{ $host }}
    13      http:
    14        paths:
    15        - path: /
    16          backend:
    17            serviceName: {{ template "common.fullname" $ }}
    18            servicePort: 80
    19    {{- end }}
    20    {{- if .Values.ingress.tls }}
    21    tls:
    22  {{ toYaml .Values.ingress.tls | indent 4 }}
    23    {{- end -}}
    24  {{- end -}}
    25  {{- define "common.ingress" -}}
    26  {{- template "common.util.merge" (append . "common.ingress.tpl") -}}
    27  {{- end -}}