From 3f215d2d905cb69e9f27b42f50c17692275d495c Mon Sep 17 00:00:00 2001 From: Valeriano Manassero <14011549+valeriano-manassero@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:49:43 +0200 Subject: [PATCH] Use many ingresses (#20) * use many ingresses * bump up version --- charts/clearml/Chart.yaml | 2 +- charts/clearml/README.md | 2 +- charts/clearml/templates/ingress-api.yaml | 33 +++++++++++++++++++ charts/clearml/templates/ingress-app.yaml | 33 +++++++++++++++++++ .../{ingress.yaml => ingress-files.yaml} | 20 +---------- 5 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 charts/clearml/templates/ingress-api.yaml create mode 100644 charts/clearml/templates/ingress-app.yaml rename charts/clearml/templates/{ingress.yaml => ingress-files.yaml} (55%) diff --git a/charts/clearml/Chart.yaml b/charts/clearml/Chart.yaml index aa68b62..84093c2 100644 --- a/charts/clearml/Chart.yaml +++ b/charts/clearml/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: clearml description: MLOps platform type: application -version: "2.2.0" +version: "2.2.1" appVersion: "1.1.1" home: https://clear.ml icon: https://raw.githubusercontent.com/allegroai/clearml/master/docs/clearml-logo.svg diff --git a/charts/clearml/README.md b/charts/clearml/README.md index 33c21db..11ef291 100644 --- a/charts/clearml/README.md +++ b/charts/clearml/README.md @@ -1,6 +1,6 @@ # ClearML Ecosystem for Kubernetes -![Version: 2.2.0](https://img.shields.io/badge/Version-2.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.1](https://img.shields.io/badge/AppVersion-1.1.1-informational?style=flat-square) +![Version: 2.2.1](https://img.shields.io/badge/Version-2.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.1](https://img.shields.io/badge/AppVersion-1.1.1-informational?style=flat-square) MLOps platform diff --git a/charts/clearml/templates/ingress-api.yaml b/charts/clearml/templates/ingress-api.yaml new file mode 100644 index 0000000..5fbb9f4 --- /dev/null +++ b/charts/clearml/templates/ingress-api.yaml @@ -0,0 +1,33 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "clearml.fullname" . -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }}-api + labels: + {{- include "clearml.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.tls.secretName }} + tls: + - hosts: + - "{{ .Values.ingress.hostPrefixApi }}{{ .Values.ingress.host }}" + secretName: {{ .Values.ingress.tls.secretName }} + {{- end }} + rules: + - host: "{{ .Values.ingress.hostPrefixApi }}{{ .Values.ingress.host }}" + http: + paths: + - path: "/" + pathType: Prefix + backend: + serviceName: {{ include "clearml.fullname" . }}-apiserver + servicePort: {{ .Values.apiserver.service.port }} +{{- end }} diff --git a/charts/clearml/templates/ingress-app.yaml b/charts/clearml/templates/ingress-app.yaml new file mode 100644 index 0000000..e9dc9c8 --- /dev/null +++ b/charts/clearml/templates/ingress-app.yaml @@ -0,0 +1,33 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "clearml.fullname" . -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }}-app + labels: + {{- include "clearml.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.tls.secretName }} + tls: + - hosts: + - "{{ .Values.ingress.hostPrefixApp }}{{ .Values.ingress.host }}" + secretName: {{ .Values.ingress.tls.secretName }} + {{- end }} + rules: + - host: "{{ .Values.ingress.hostPrefixApp }}{{ .Values.ingress.host }}" + http: + paths: + - path: "/" + pathType: Prefix + backend: + serviceName: {{ include "clearml.fullname" . }}-webserver + servicePort: {{ .Values.webserver.service.port }} +{{- end }} diff --git a/charts/clearml/templates/ingress.yaml b/charts/clearml/templates/ingress-files.yaml similarity index 55% rename from charts/clearml/templates/ingress.yaml rename to charts/clearml/templates/ingress-files.yaml index c2b0a0b..5ee1b75 100644 --- a/charts/clearml/templates/ingress.yaml +++ b/charts/clearml/templates/ingress-files.yaml @@ -7,7 +7,7 @@ apiVersion: extensions/v1beta1 {{- end }} kind: Ingress metadata: - name: {{ $fullName }} + name: {{ $fullName }}-files labels: {{- include "clearml.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} @@ -18,28 +18,10 @@ spec: {{- if .Values.ingress.tls.secretName }} tls: - hosts: - - "{{ .Values.ingress.hostPrefixAp }}{{ .Values.ingress.host }}" - "{{ .Values.ingress.hostPrefixFiles }}{{ .Values.ingress.host }}" - - "{{ .Values.ingress.hostPrefixApi }}{{ .Values.ingress.host }}" secretName: {{ .Values.ingress.tls.secretName }} {{- end }} rules: - - host: "{{ .Values.ingress.hostPrefixApp }}{{ .Values.ingress.host }}" - http: - paths: - - path: "/" - pathType: Prefix - backend: - serviceName: {{ include "clearml.fullname" . }}-webserver - servicePort: {{ .Values.webserver.service.port }} - - host: "{{ .Values.ingress.hostPrefixApi }}{{ .Values.ingress.host }}" - http: - paths: - - path: "/" - pathType: Prefix - backend: - serviceName: {{ include "clearml.fullname" . }}-apiserver - servicePort: {{ .Values.apiserver.service.port }} - host: "{{ .Values.ingress.hostPrefixFiles }}{{ .Values.ingress.host }}" http: paths: