github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/prometheus-pushgateway/templates/ingress.yaml (about) 1 {{- if .Values.ingress.enabled }} 2 {{- $serviceName := include "prometheus-pushgateway.fullname" . }} 3 {{- $servicePort := .Values.service.port }} 4 {{- $ingressPath := .Values.ingress.path }} 5 {{- $ingressClassName := .Values.ingress.className }} 6 {{- $ingressPathType := .Values.ingress.pathType }} 7 {{- $extraPaths := .Values.ingress.extraPaths }} 8 apiVersion: {{ include "prometheus-pushgateway.ingress.apiVersion" . }} 9 kind: Ingress 10 metadata: 11 {{- with .Values.ingress.annotations }} 12 annotations: 13 {{- toYaml . | nindent 4 }} 14 {{- end }} 15 labels: 16 {{- include "prometheus-pushgateway.defaultLabels" . | nindent 4 }} 17 name: {{ include "prometheus-pushgateway.fullname" . }} 18 namespace: {{ template "prometheus-pushgateway.namespace" . }} 19 spec: 20 {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} 21 ingressClassName: {{ $ingressClassName }} 22 {{- end }} 23 rules: 24 {{- range $host := .Values.ingress.hosts }} 25 - host: {{ $host }} 26 http: 27 paths: 28 {{- with $extraPaths }} 29 {{- toYaml . | nindent 10 }} 30 {{- end }} 31 - path: {{ $ingressPath }} 32 {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} 33 pathType: {{ $ingressPathType }} 34 {{- end }} 35 backend: 36 {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} 37 service: 38 name: {{ $serviceName }} 39 port: 40 number: {{ $servicePort }} 41 {{- else }} 42 serviceName: {{ $serviceName }} 43 servicePort: {{ $servicePort }} 44 {{- end }} 45 {{- end -}} 46 {{- with .Values.ingress.tls }} 47 tls: 48 {{- toYaml . | nindent 4 }} 49 {{- end }} 50 {{- end }}