2022-03-16 17:04:56 +00:00
|
|
|
{{- if .Values.ingress.api.enabled -}}
|
2021-09-14 13:43:10 +00:00
|
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
2021-07-07 07:04:15 +00:00
|
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
|
|
{{- else -}}
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
{{- end }}
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
2021-09-14 13:43:10 +00:00
|
|
|
name: {{ include "clearml.fullname" . }}-api
|
2021-07-07 07:04:15 +00:00
|
|
|
labels:
|
|
|
|
{{- include "clearml.labels" . | nindent 4 }}
|
2022-01-18 17:06:01 +00:00
|
|
|
{{- $annotations := .Values.ingress.annotations }}
|
|
|
|
{{- if .Values.ingress.api.annotations }}
|
|
|
|
{{- $annotations = mergeOverwrite $annotations .Values.ingress.api.annotations }}
|
2021-07-07 07:04:15 +00:00
|
|
|
{{- end }}
|
2022-01-18 17:06:01 +00:00
|
|
|
annotations:
|
|
|
|
{{- toYaml $annotations | nindent 4 }}
|
|
|
|
|
2021-07-07 07:04:15 +00:00
|
|
|
spec:
|
2021-09-16 06:51:07 +00:00
|
|
|
{{- if .Values.ingress.api.tlsSecretName }}
|
2021-07-07 07:04:15 +00:00
|
|
|
tls:
|
|
|
|
- hosts:
|
2021-09-16 06:51:07 +00:00
|
|
|
- {{ .Values.ingress.api.hostName }}
|
|
|
|
secretName: {{ .Values.ingress.api.tlsSecretName }}
|
2021-07-07 07:04:15 +00:00
|
|
|
{{- end }}
|
|
|
|
rules:
|
2021-09-16 08:54:25 +00:00
|
|
|
- host: {{ .Values.ingress.api.hostName }}
|
|
|
|
http:
|
|
|
|
paths:
|
2022-03-16 17:04:56 +00:00
|
|
|
- path: {{ .Values.ingress.api.path }}
|
2021-09-16 08:54:25 +00:00
|
|
|
{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
|
|
|
|
pathType: Prefix
|
|
|
|
backend:
|
|
|
|
service:
|
|
|
|
name: {{ include "clearml.fullname" . }}-apiserver
|
|
|
|
port:
|
|
|
|
number: {{ .Values.apiserver.service.port }}
|
|
|
|
{{ else }}
|
|
|
|
backend:
|
|
|
|
serviceName: {{ include "clearml.fullname" . }}-apiserver
|
|
|
|
servicePort: {{ .Values.apiserver.service.port }}
|
|
|
|
{{ end }}
|
2021-07-07 07:04:15 +00:00
|
|
|
{{- end }}
|