clearml-helm-charts/charts/clearml-serving/templates/clearml-serving-triton-ingress.yaml
Valeriano Manassero 65671a35b2
225 clear ml serving ingress doesnt work (#235)
* Changed: removed deprecated network policy

* Changed: bump up

* Changed: bump up

* Fixed: missing ingress names

* Changed: changelog update
2023-06-19 17:00:46 +02:00

46 lines
1.6 KiB
YAML

{{- if .Values.clearml_serving_triton.enabled -}}
{{- if .Values.clearml_serving_triton.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 "clearmlServing.fullname" . }}-triton
labels:
clearml.serving.service: {{ include "clearmlServing.fullname" . }}-triton
annotations:
{{- toYaml .Values.clearml_serving_triton.ingress.annotations | nindent 4 }}
spec:
{{- if .Values.clearml_serving_triton.ingress.ingressClassName }}
ingressClassName: {{ .Values.clearml_serving_triton.ingress.ingressClassName }}
{{- end }}
{{- if .Values.clearml_serving_triton.ingress.tlsSecretName }}
tls:
- hosts:
- {{ .Values.clearml_serving_triton.ingress.hostName }}
secretName: {{ .Values.clearml_serving_triton.ingress.tlsSecretName }}
{{- end }}
rules:
- host: {{ .Values.clearml_serving_triton.ingress.hostName }}
http:
paths:
- path: {{ .Values.clearml_serving_triton.ingress.path }}
{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
backend:
service:
name: {{ include "clearmlServing.fullname" . }}-triton
port:
number: 8001
{{ else }}
backend:
servicename: {{ include "clearmlServing.fullname" . }}-triton
servicePort: 8001
{{ end }}
{{- end }}
{{- end }}