mirror of https://git.rancher.io/charts
41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
{{- if not (.Capabilities.APIVersions.Has "route.openshift.io/v1") }}
|
|
{{- if .Values.deployment.ingress_enabled }}
|
|
---
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "kiali-server.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "kiali-server.labels" . | nindent 4 }}
|
|
annotations:
|
|
{{- if hasKey .Values.deployment.override_ingress_yaml.metadata "annotations" }}
|
|
{{- toYaml .Values.deployment.override_ingress_yaml.metadata.annotations | nindent 4 }}
|
|
{{- else }}
|
|
# For ingress-nginx versions older than 0.20.0 use secure-backends.
|
|
# (see: https://github.com/kubernetes/ingress-nginx/issues/3416#issuecomment-438247948)
|
|
# For ingress-nginx versions 0.20.0 and later use backend-protocol.
|
|
{{- if (include "kiali-server.identity.cert_file" .) }}
|
|
nginx.ingress.kubernetes.io/secure-backends: "true"
|
|
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
|
|
{{- else }}
|
|
nginx.ingress.kubernetes.io/secure-backends: "false"
|
|
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
|
{{- end }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if hasKey .Values.deployment.override_ingress_yaml "spec" }}
|
|
{{- toYaml .Values.deployment.override_ingress_yaml.spec | nindent 2 }}
|
|
{{- else }}
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- path: {{ include "kiali-server.server.web_root" . }}
|
|
backend:
|
|
serviceName: {{ include "kiali-server.fullname" . }}
|
|
servicePort: {{ .Values.server.port }}
|
|
{{- end }}
|
|
...
|
|
{{- end }}
|
|
{{- end }}
|