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

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