From 9c15a8a348898aed5504420778d0e815b41642e5 Mon Sep 17 00:00:00 2001 From: Niels ten Boom Date: Fri, 21 Jan 2022 16:15:09 +0100 Subject: [PATCH] fix: faulty service values references in k8s agent (#50) * add k8s glue deployment * more docs * bump * disabled by default * run helm-docs * fix service references * fix readme * add values file where k8sagent enabled * empty files * newline * fix linter Co-authored-by: Valeriano Manassero <14011549+valeriano-manassero@users.noreply.github.com> --- charts/clearml/Chart.yaml | 2 +- charts/clearml/README.md | 3 ++- charts/clearml/ci/README.md | 7 +++++++ charts/clearml/ci/default-values.yaml | 1 + charts/clearml/ci/k8sagent-values.yaml | 2 ++ charts/clearml/templates/configmap-agentk8s-template.yaml | 8 +++++--- charts/clearml/templates/deployment-agentk8s.yaml | 4 ++-- charts/clearml/values.yaml | 3 +++ 8 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 charts/clearml/ci/README.md create mode 100644 charts/clearml/ci/default-values.yaml create mode 100644 charts/clearml/ci/k8sagent-values.yaml diff --git a/charts/clearml/Chart.yaml b/charts/clearml/Chart.yaml index 5e12c9c..5edbe08 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: "3.4.0" +version: "3.4.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 0037722..361fd2b 100644 --- a/charts/clearml/README.md +++ b/charts/clearml/README.md @@ -1,6 +1,6 @@ # ClearML Ecosystem for Kubernetes -![Version: 3.4.0](https://img.shields.io/badge/Version-3.4.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: 3.4.1](https://img.shields.io/badge/Version-3.4.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 @@ -170,6 +170,7 @@ For detailed instructions, see the [Optional Configuration](https://github.com/a | agentk8sglue.image.tag | string | `"aws-latest-1.21"` | | | agentk8sglue.maxPods | int | `10` | | | agentk8sglue.podTemplate.nodeSelector | object | `{}` | | +| agentk8sglue.podTemplate.resources | object | `{}` | | | agentk8sglue.podTemplate.tolerations | object | `{}` | | | agentk8sglue.queue | string | `"aws-instances"` | | | agentservices.affinity | object | `{}` | | diff --git a/charts/clearml/ci/README.md b/charts/clearml/ci/README.md new file mode 100644 index 0000000..2c52030 --- /dev/null +++ b/charts/clearml/ci/README.md @@ -0,0 +1,7 @@ +Place values files with different values in this directory to ensure these cases are tested by the CI as well. + +https://github.com/helm/chart-testing/blob/main/doc/ct_install.md + +``` +"Charts may have multiple custom values files matching the glob pattern '*-values.yaml' in a directory named 'ci' in the root of the chart's directory. The chart is installed and tested for each of these files. If no custom values file is present, the chart is installed and tested with defaults." +``` \ No newline at end of file diff --git a/charts/clearml/ci/default-values.yaml b/charts/clearml/ci/default-values.yaml new file mode 100644 index 0000000..a2038cb --- /dev/null +++ b/charts/clearml/ci/default-values.yaml @@ -0,0 +1 @@ +# empty so default values.yaml gets tested diff --git a/charts/clearml/ci/k8sagent-values.yaml b/charts/clearml/ci/k8sagent-values.yaml new file mode 100644 index 0000000..42d3b12 --- /dev/null +++ b/charts/clearml/ci/k8sagent-values.yaml @@ -0,0 +1,2 @@ +agentk8sglue: + enabled: true diff --git a/charts/clearml/templates/configmap-agentk8s-template.yaml b/charts/clearml/templates/configmap-agentk8s-template.yaml index 7cccdeb..f287f4b 100644 --- a/charts/clearml/templates/configmap-agentk8s-template.yaml +++ b/charts/clearml/templates/configmap-agentk8s-template.yaml @@ -10,13 +10,15 @@ data: namespace: {{ .Release.namespace }} spec: containers: - - env: + - resources: + {{- toYaml .Values.agentk8sglue.podTemplate.resources | nindent 10 }} + env: - name: CLEARML_API_HOST - value: "http://{{ include "clearml.fullname" . }}-apiserver:{{ .Values.clearml.apiserver.service.port }}" + value: "http://{{ include "clearml.fullname" . }}-apiserver:{{ .Values.apiserver.service.port }}" - name: CLEARML_WEB_HOST value: "http://{{ include "clearml.fullname" . }}-webserver" - name: CLEARML_FILES_HOST - value: "http://{{ include "clearml.fullname" . }}-fileserver:{{ .Values.clearml.fileserver.service.port }}" + value: "http://{{ include "clearml.fullname" . }}-fileserver:{{ .Values.fileserver.service.port }}" - name: CLEARML_API_ACCESS_KEY valueFrom: secretKeyRef: diff --git a/charts/clearml/templates/deployment-agentk8s.yaml b/charts/clearml/templates/deployment-agentk8s.yaml index c65116b..d7ffde8 100644 --- a/charts/clearml/templates/deployment-agentk8s.yaml +++ b/charts/clearml/templates/deployment-agentk8s.yaml @@ -25,11 +25,11 @@ spec: mountPath: /root/template env: - name: CLEARML_API_HOST - value: "http://{{ include "clearml.fullname" . }}-apiserver:{{ .Values.clearml.apiserver.service.port }}" + value: "http://{{ include "clearml.fullname" . }}-apiserver:{{ .Values.apiserver.service.port }}" - name: CLEARML_WEB_HOST value: "http://{{ include "clearml.fullname" . }}-webserver" - name: CLEARML_FILES_HOST - value: "http://{{ include "clearml.fullname" . }}-fileserver:{{ .Values.clearml.fileserver.service.port }}" + value: "http://{{ include "clearml.fullname" . }}-fileserver:{{ .Values.fileserver.service.port }}" - name: K8S_GLUE_MAX_PODS value: "{{.Values.agentk8sglue.maxPods}}" - name: K8S_GLUE_QUEUE diff --git a/charts/clearml/values.yaml b/charts/clearml/values.yaml index d9544d1..28b6729 100644 --- a/charts/clearml/values.yaml +++ b/charts/clearml/values.yaml @@ -307,6 +307,9 @@ agentk8sglue: queue: aws-instances # create this queue manually in the UI first for it to work id: k8s-agent podTemplate: + resources: {} + # limits: + # nvidia.com/gpu: 1 tolerations: {} # - key: "nvidia.com/gpu" # operator: Exists