github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/thanos/templates/receive/ingress.yaml (about)

     1  {{- if and .Values.receive.enabled .Values.receive.ingress.enabled -}}
     2  apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
     3  kind: Ingress
     4  metadata:
     5    name: {{ include "common.names.fullname" . }}-receive
     6    namespace: {{ .Release.Namespace | quote }}
     7    labels: {{- include "common.labels.standard" . | nindent 4 }}
     8      app.kubernetes.io/component: receive
     9      {{- if .Values.commonLabels }}
    10      {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
    11      {{- end }}
    12    annotations:
    13      {{- if .Values.commonAnnotations }}
    14      {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
    15      {{- end }}
    16      {{- if .Values.receive.ingress.annotations }}
    17      {{- include "common.tplvalues.render" ( dict "value" .Values.receive.ingress.annotations "context" $ ) | nindent 4 }}
    18      {{- end }}
    19  spec:
    20    {{- if and .Values.receive.ingress.ingressClassName (include "common.ingress.supportsIngressClassname" .) }}
    21    ingressClassName: {{ .Values.receive.ingress.ingressClassName | quote }}
    22    {{- end }}
    23    rules:
    24      {{- if .Values.receive.ingress.hostname }}
    25      - host: {{ .Values.receive.ingress.hostname }}
    26        http:
    27          paths:
    28            - path: /api/v1/receive
    29              {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
    30              pathType: {{ .Values.receive.ingress.pathType }}
    31              {{- end }}
    32              backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-%s"  (include "common.names.fullname" .) "receive") "servicePort" "remote" "context" $)  | nindent 14 }}
    33  
    34            - path: {{ .Values.receive.ingress.path }}
    35              {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
    36              pathType: {{ .Values.receive.ingress.pathType }}
    37              {{- end }}
    38              backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-%s"  (include "common.names.fullname" .) "receive") "servicePort" "http" "context" $)  | nindent 14 }}
    39      {{- end }}
    40      {{- range .Values.receive.ingress.extraHosts }}
    41      - host: {{ .name | quote }}
    42        http:
    43          paths:
    44            - path: {{ default "/" .path }}
    45              {{- if eq "true" (include "common.ingress.supportsPathType" $) }}
    46              pathType: {{ default "ImplementationSpecific" .pathType }}
    47              {{- end }}
    48              backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-%s"  (include "common.names.fullname" $) "receive") "servicePort" "http" "context" $) | nindent 14 }}
    49      {{- end }}
    50      {{- if .Values.receive.ingress.extraRules }}
    51      {{- include "common.tplvalues.render" (dict "value" .Values.receive.ingress.extraRules "context" $) | nindent 4 }}
    52      {{- end }}
    53    {{- if or (and .Values.receive.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.receive.ingress.annotations )) .Values.receive.ingress.selfSigned)) .Values.receive.ingress.extraTls }}
    54    tls:
    55      {{- if and .Values.receive.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.receive.ingress.annotations )) .Values.receive.ingress.selfSigned) }}
    56      - hosts:
    57          - {{ .Values.receive.ingress.hostname }}
    58          {{- range .Values.receive.ingress.extraHosts }}
    59          - {{ .name | quote }}
    60          {{- end }}
    61        secretName: {{ printf "%s-tls" .Values.receive.ingress.hostname }}
    62      {{- end }}
    63      {{- if .Values.receive.ingress.extraTls }}
    64      {{- toYaml .Values.receive.ingress.extraTls | nindent 4 }}
    65      {{- end }}
    66    {{- end }}
    67  {{- end }}