github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/clickhouse-cluster/templates/ingress.yaml (about) 1 {{- if .Values.ingress.enabled }} 2 apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }} 3 kind: Ingress 4 metadata: 5 name: {{ include "common.names.fullname" . }} 6 namespace: {{ .Release.Namespace | quote }} 7 labels: {{- include "common.labels.standard" . | nindent 4 }} 8 {{- if .Values.commonLabels }} 9 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} 10 {{- end }} 11 annotations: 12 {{- if .Values.ingress.annotations }} 13 {{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }} 14 {{- end }} 15 {{- if .Values.commonAnnotations }} 16 {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} 17 {{- end }} 18 spec: 19 {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} 20 ingressClassName: {{ .Values.ingress.ingressClassName | quote }} 21 {{- end }} 22 rules: 23 {{- if .Values.ingress.hostname }} 24 - host: {{ .Values.ingress.hostname | quote }} 25 http: 26 paths: 27 {{- if .Values.ingress.extraPaths }} 28 {{- toYaml .Values.ingress.extraPaths | nindent 10 }} 29 {{- end }} 30 - path: {{ .Values.ingress.path }} 31 {{- if eq "true" (include "common.ingress.supportsPathType" .) }} 32 pathType: {{ .Values.ingress.pathType }} 33 {{- end }} 34 backend: 35 service: 36 name: {{ .Release.Name }} 37 port: 38 name: http 39 {{- end }} 40 {{- range .Values.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" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }} 49 {{- end }} 50 {{- if .Values.ingress.extraRules }} 51 {{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }} 52 {{- end }} 53 {{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }} 54 tls: 55 {{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned) }} 56 - hosts: 57 - {{ .Values.ingress.hostname | quote }} 58 secretName: {{ printf "%s-tls" .Values.ingress.hostname }} 59 {{- end }} 60 {{- if .Values.ingress.extraTls }} 61 {{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }} 62 {{- end }} 63 {{- end }} 64 {{- end }}