mirror of
https://github.com/clearml/clearml-helm-charts
synced 2025-01-31 17:16:47 +00:00
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
{{- if .Values.ingress.app.enabled -}}
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
apiVersion: networking.k8s.io/v1
|
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
{{- else -}}
|
|
apiVersion: extensions/v1beta1
|
|
{{- end }}
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "clearml.fullname" . }}-app
|
|
labels:
|
|
{{- include "clearml.labels" . | nindent 4 }}
|
|
{{- $annotations := .Values.ingress.annotations }}
|
|
{{- if .Values.ingress.app.annotations }}
|
|
{{- $annotations = mergeOverwrite $annotations .Values.ingress.app.annotations }}
|
|
{{- end }}
|
|
annotations:
|
|
{{- toYaml $annotations | nindent 4 }}
|
|
spec:
|
|
{{- if .Values.ingress.app.tlsSecretName }}
|
|
tls:
|
|
- hosts:
|
|
- {{ .Values.ingress.app.hostName }}
|
|
secretName: {{ .Values.ingress.app.tlsSecretName }}
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ .Values.ingress.app.hostName }}
|
|
http:
|
|
paths:
|
|
- path: {{ .Values.ingress.app.path }}
|
|
{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "clearml.fullname" . }}-webserver
|
|
port:
|
|
number: {{ .Values.webserver.service.port }}
|
|
{{ else }}
|
|
backend:
|
|
serviceName: {{ include "clearml.fullname" . }}-webserver
|
|
servicePort: {{ .Values.webserver.service.port }}
|
|
{{ end }}
|
|
{{- end }}
|