From e2d60312d3495eaa218c5236fcc28b2142e63337 Mon Sep 17 00:00:00 2001 From: Valeriano Manassero <14011549+valeriano-manassero@users.noreply.github.com> Date: Tue, 24 Jan 2023 13:24:15 +0100 Subject: [PATCH] Fix enterprise apps deployment (#137) * Fixed: apps deployment * Changed: version bump --- charts/clearml/Chart.yaml | 6 ++-- charts/clearml/README.md | 2 +- charts/clearml/templates/apps-configmap.yaml | 32 +++++++++++++++++++ charts/clearml/templates/apps-deployment.yaml | 14 +++++--- 4 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 charts/clearml/templates/apps-configmap.yaml diff --git a/charts/clearml/Chart.yaml b/charts/clearml/Chart.yaml index f67b2d5..6da5aa7 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: "5.4.0" +version: "5.4.1" appVersion: "1.9.2" kubeVersion: ">= 1.21.0-0 < 1.26.0-0" home: https://clear.ml @@ -32,5 +32,5 @@ dependencies: condition: elasticsearch.enabled annotations: artifacthub.io/changes: | - - kind: changed - description: external mongodb improved connection string + - kind: fixed + description: enterprise apps deployment not working diff --git a/charts/clearml/README.md b/charts/clearml/README.md index 27d0787..51c5e09 100644 --- a/charts/clearml/README.md +++ b/charts/clearml/README.md @@ -1,6 +1,6 @@ # ClearML Ecosystem for Kubernetes -![Version: 5.4.0](https://img.shields.io/badge/Version-5.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.9.2](https://img.shields.io/badge/AppVersion-1.9.2-informational?style=flat-square) +![Version: 5.4.1](https://img.shields.io/badge/Version-5.4.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.9.2](https://img.shields.io/badge/AppVersion-1.9.2-informational?style=flat-square) MLOps platform diff --git a/charts/clearml/templates/apps-configmap.yaml b/charts/clearml/templates/apps-configmap.yaml new file mode 100644 index 0000000..89d19ba --- /dev/null +++ b/charts/clearml/templates/apps-configmap.yaml @@ -0,0 +1,32 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "clearml.name" . }}-apps-pt +data: + template.yaml: | + apps_queue: + apiVersion: v1 + metadata: + namespace: {{ $.Release.Namespace }} + spec: + {{- if $.Values.imageCredentials.enabled }} + imagePullSecrets: + {{- if $.Values.imageCredentials.existingSecret }} + - name: $.Values.imageCredentials.existingSecret + {{- else }} + - name: clearml-registry-key + {{- end }} + {{- end }} + serviceAccountName: "clearml-apps-sa" + containers: + - resources: + ports: + - containerPort: 10022 + volumeMounts: + env: + - name: CLEARML_API_HOST + value: "http://{{ include "apiserver.referenceName" . }}:{{ .Values.apiserver.service.port }}" + - name: CLEARML_FILES_HOST + value: "http://{{ include "fileserver.referenceName" . }}:{{ .Values.fileserver.service.port }}" + - name: CLEARML_WEB_HOST + value: "http://{{ include "webserver.referenceName" . }}:{{ .Values.webserver.service.port }}" diff --git a/charts/clearml/templates/apps-deployment.yaml b/charts/clearml/templates/apps-deployment.yaml index 62e703a..781f5b4 100644 --- a/charts/clearml/templates/apps-deployment.yaml +++ b/charts/clearml/templates/apps-deployment.yaml @@ -28,8 +28,11 @@ spec: - name: clearml-registry-key {{- end }} {{- end }} + volumes: + - name: {{ include "clearml.name" . }}-apps-pt + configMap: + name: {{ include "clearml.name" . }}-apps-pt {{- if .Values.enterpriseFeatures.clearmlApplications.additionalConfigs }} - volumes: - name: apps-config configMap: name: "{{ include "clearmlApplications.referenceName" . }}-configmap" @@ -68,8 +71,9 @@ spec: value: "apps-agent-1" - name: CLEARML_NO_DEFAULT_SERVER value: "true" - - name: CLEARML_AGENT_DAEMON_OPTIONS - value: "--foreground --create-queue --use-owner-token --child-report-tags application --services-mode=5" + - name: K8S_GLUE_EXTRA_ARGS + value: "--namespace {{ .Release.Namespace }} --template-yaml /root/template/template.yaml \ + --child-report-tags application --max-pods 5 --use-owner-token" - name: K8S_GLUE_QUEUE value: "apps_queue" - name: CLEARML_AGENT_DISABLE_SSH_MOUNT @@ -97,8 +101,10 @@ spec: {{- if .Values.enterpriseFeatures.clearmlApplications.extraEnvs }} {{ toYaml .Values.enterpriseFeatures.clearmlApplications.extraEnvs | nindent 10 }} {{- end }} + volumeMounts: + - name: {{ include "clearml.name" . }}-apps-pt + mountPath: /root/template {{- if .Values.enterpriseFeatures.clearmlApplications.additionalConfigs }} - volumeMounts: - name: apps-config mountPath: /opt/clearml/config/default {{- end }}