mirror of
https://github.com/clearml/clearml-helm-charts
synced 2025-01-31 17:16:47 +00:00
979e73fe3d
* fix ingress compatibility with different k8s version * bump up version
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
{{- if .Values.ingress.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" . }}-files
|
|
labels:
|
|
{{- include "clearml.labels" . | nindent 4 }}
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.ingress.files.tlsSecretName }}
|
|
tls:
|
|
- hosts:
|
|
- {{ .Values.ingress.files.hostName }}
|
|
secretName: {{ .Values.ingress.files.tlsSecretName }}
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ .Values.ingress.files.hostName }}
|
|
http:
|
|
paths:
|
|
- path: "/"
|
|
{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "clearml.fullname" . }}-fileserver
|
|
port:
|
|
number: {{ .Values.fileserver.service.port }}
|
|
{{ else }}
|
|
backend:
|
|
serviceName: {{ include "clearml.fullname" . }}-fileserver
|
|
servicePort: {{ .Values.fileserver.service.port }}
|
|
{{ end }}
|
|
{{- end }}
|