sigs.k8s.io/cluster-api-provider-azure@v1.14.3/hack/observability/opentelemetry/chart/templates/ingress.yaml (about)

     1  {{- if and .Values.standaloneCollector.enabled .Values.ingress.enabled -}}
     2  {{- $ingressApiIsStable := eq (include "ingress.isStable" .) "true" -}}
     3  {{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}}
     4  apiVersion: {{ include "ingress.apiVersion" . }}
     5  kind: Ingress
     6  metadata:
     7    name: {{ include "opentelemetry-collector.fullname" . }}
     8    labels:
     9      {{- include "opentelemetry-collector.labels" . | nindent 4 }}
    10      component: standalone-collector
    11    {{- if .Values.ingress.annotations }}
    12    annotations:
    13      {{ toYaml .Values.ingress.annotations | nindent 4 }}
    14    {{- end }}
    15  spec:
    16    {{- if .Values.ingress.ingressClassName }}
    17    ingressClassName: {{ .Values.ingress.ingressClassName }}
    18    {{- end -}}
    19    {{- if .Values.ingress.tls }}
    20    tls:
    21      {{- range .Values.ingress.tls }}
    22      - hosts:
    23          {{- range .hosts }}
    24          - {{ . | quote }}
    25          {{- end }}
    26        {{- with .secretName }}
    27        secretName: {{ . }}
    28        {{- end }}
    29      {{- end }}
    30    {{- end }}
    31    rules:
    32      {{- range .Values.ingress.hosts }}
    33      - host: {{ .host | quote }}
    34        http:
    35          paths:
    36            {{- range .paths }}
    37            - path: {{ .path }}
    38              {{- if $ingressSupportsPathType }}
    39              pathType: {{ .pathType }}
    40              {{- end }}
    41              backend:
    42                {{- if $ingressApiIsStable }}
    43                service:
    44                  name: {{ include "opentelemetry-collector.fullname" $ }}
    45                  port:
    46                    number: {{ .port }}
    47                {{- else }}
    48                serviceName: {{ include "opentelemetry-collector.fullname" $ }}
    49                servicePort: {{ .port }}
    50                {{- end }}
    51            {{- end }}
    52      {{- end }}
    53  {{- end }}