feature: ability to add volume and volumeMounts to deployments (#296)

This commit is contained in:
Daglar Berk Erdem 2024-06-04 12:34:41 +03:00 committed by GitHub
parent 312813cc34
commit ac96346607
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 70 additions and 12 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: clearml
description: MLOps platform
type: application
version: "7.9.0"
version: "7.10.0"
appVersion: "1.15"
kubeVersion: ">= 1.21.0-0 < 1.31.0-0"
home: https://clear.ml
@ -33,4 +33,4 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: added
description: Ability to add annotations to Deployments
description: Ability to add volumes and volumeMounts to Deployments

View File

@ -1,6 +1,6 @@
# ClearML Ecosystem for Kubernetes
![Version: 7.9.0](https://img.shields.io/badge/Version-7.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.15](https://img.shields.io/badge/AppVersion-1.15-informational?style=flat-square)
![Version: 7.10.0](https://img.shields.io/badge/Version-7.10.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.15](https://img.shields.io/badge/AppVersion-1.15-informational?style=flat-square)
MLOps platform
@ -145,8 +145,10 @@ Kubernetes: `>= 1.21.0-0 < 1.31.0-0`
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| apiserver | object | `{"additionalConfigs":{},"affinity":{},"containerSecurityContext":{},"deploymentAnnotations":null,"enabled":true,"existingAdditionalConfigsConfigMap":"","existingAdditionalConfigsSecret":"","extraEnvs":[],"image":{"pullPolicy":"IfNotPresent","registry":"","repository":"allegroai/clearml","tag":"1.15.1-478"},"ingress":{"annotations":{},"enabled":false,"hostName":"api.clearml.127-0-0-1.nip.io","ingressClassName":"","path":"/","tlsSecretName":""},"initContainers":{"resources":{"limits":{"cpu":"10m","memory":"64Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"prepopulateEnabled":true,"processes":{"count":8,"maxRequests":1000,"maxRequestsJitter":300,"timeout":24000},"replicaCount":1,"resources":{"limits":{"cpu":"2000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"service":{"annotations":{},"nodePort":30008,"port":8008,"type":"NodePort"},"serviceAccountName":"clearml","tolerations":[]}` | Api Server configurations |
| apiserver | object | `{"additionalConfigs":{},"additionalVolumeMounts":{},"additionalVolumes":{},"affinity":{},"containerSecurityContext":{},"deploymentAnnotations":null,"enabled":true,"existingAdditionalConfigsConfigMap":"","existingAdditionalConfigsSecret":"","extraEnvs":[],"image":{"pullPolicy":"IfNotPresent","registry":"","repository":"allegroai/clearml","tag":"1.15.1-478"},"ingress":{"annotations":{},"enabled":false,"hostName":"api.clearml.127-0-0-1.nip.io","ingressClassName":"","path":"/","tlsSecretName":""},"initContainers":{"resources":{"limits":{"cpu":"10m","memory":"64Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"prepopulateEnabled":true,"processes":{"count":8,"maxRequests":1000,"maxRequestsJitter":300,"timeout":24000},"replicaCount":1,"resources":{"limits":{"cpu":"2000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"service":{"annotations":{},"nodePort":30008,"port":8008,"type":"NodePort"},"serviceAccountName":"clearml","tolerations":[]}` | Api Server configurations |
| apiserver.additionalConfigs | object | `{}` | files declared in this parameter will be mounted and read by apiserver (examples in values.yaml) if not overridden by existingAdditionalConfigsSecret |
| apiserver.additionalVolumeMounts | object | `{}` | Specifies where and how the volumes defined in additionalVolumes. |
| apiserver.additionalVolumes | object | `{}` | # Defines extra Kubernetes volumes to be attached to the pod. |
| apiserver.affinity | object | `{}` | Api Server affinity setup |
| apiserver.containerSecurityContext | object | `{}` | Api Server containers security context |
| apiserver.deploymentAnnotations | string | `nil` | Add the provided map to the annotations for the Deployment resource created by this chart. |
@ -202,7 +204,9 @@ Kubernetes: `>= 1.21.0-0 < 1.31.0-0`
| externalServices.mongodbConnectionStringBackend | string | `"mongodb://mongodb_hostnamehostname:27017/backend"` | Existing MongoDB connection string for AUTH to use if mongodb.enabled is false (example in values.yaml) |
| externalServices.redisHost | string | `"redis_hostname"` | Existing Redis Hostname to use if redis.enabled is false (example in values.yaml) |
| externalServices.redisPort | int | `6379` | Existing Redis Port to use if redis.enabled is false |
| fileserver | object | `{"affinity":{},"containerSecurityContext":{},"deploymentAnnotations":{},"enabled":true,"extraEnvs":[],"image":{"pullPolicy":"IfNotPresent","registry":"","repository":"allegroai/clearml","tag":"1.15.1-478"},"ingress":{"annotations":{},"enabled":false,"hostName":"files.clearml.127-0-0-1.nip.io","ingressClassName":"","path":"/","tlsSecretName":""},"initContainers":{"resources":{"limits":{"cpu":"10m","memory":"64Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"cpu":"2000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"service":{"annotations":{},"nodePort":30081,"port":8081,"type":"NodePort"},"serviceAccountName":"clearml","storage":{"data":{"accessMode":"ReadWriteOnce","class":"","existingPVC":"","size":"50Gi"},"enabled":true},"tolerations":[]}` | File Server configurations |
| fileserver | object | `{"additionalVolumeMounts":{},"additionalVolumes":{},"affinity":{},"containerSecurityContext":{},"deploymentAnnotations":{},"enabled":true,"extraEnvs":[],"image":{"pullPolicy":"IfNotPresent","registry":"","repository":"allegroai/clearml","tag":"1.15.1-478"},"ingress":{"annotations":{},"enabled":false,"hostName":"files.clearml.127-0-0-1.nip.io","ingressClassName":"","path":"/","tlsSecretName":""},"initContainers":{"resources":{"limits":{"cpu":"10m","memory":"64Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"cpu":"2000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"service":{"annotations":{},"nodePort":30081,"port":8081,"type":"NodePort"},"serviceAccountName":"clearml","storage":{"data":{"accessMode":"ReadWriteOnce","class":"","existingPVC":"","size":"50Gi"},"enabled":true},"tolerations":[]}` | File Server configurations |
| fileserver.additionalVolumeMounts | object | `{}` | Specifies where and how the volumes defined in additionalVolumes. |
| fileserver.additionalVolumes | object | `{}` | # Defines extra Kubernetes volumes to be attached to the pod. |
| fileserver.affinity | object | `{}` | File Server affinity setup |
| fileserver.containerSecurityContext | object | `{}` | File Server containers security context |
| fileserver.deploymentAnnotations | object | `{}` | Add the provided map to the annotations for the Deployment resource created by this chart. |
@ -243,8 +247,10 @@ Kubernetes: `>= 1.21.0-0 < 1.31.0-0`
| imageCredentials.username | string | `"someone"` | Registry username |
| mongodb | object | `{"architecture":"standalone","auth":{"enabled":false},"enabled":true,"persistence":{"accessModes":["ReadWriteOnce"],"enabled":true,"size":"50Gi","storageClass":null},"replicaCount":1}` | Configuration from https://github.com/bitnami/charts/blob/master/bitnami/mongodb/values.yaml |
| redis | object | `{"architecture":"standalone","auth":{"enabled":false},"databaseNumber":0,"enabled":true,"master":{"name":"{{ .Release.Name }}-redis-master","persistence":{"accessModes":["ReadWriteOnce"],"enabled":true,"size":"5Gi","storageClass":null},"port":6379}}` | Configuration from https://github.com/bitnami/charts/blob/master/bitnami/redis/values.yaml |
| webserver | object | `{"additionalConfigs":{},"affinity":{},"containerSecurityContext":{},"deploymentAnnotations":{},"enabled":true,"extraEnvs":[],"image":{"pullPolicy":"IfNotPresent","registry":"","repository":"allegroai/clearml","tag":"1.15.1-478"},"ingress":{"annotations":{},"enabled":false,"hostName":"app.clearml.127-0-0-1.nip.io","ingressClassName":"","path":"/","tlsSecretName":""},"initContainers":{"resources":{"limits":{"cpu":"10m","memory":"64Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"cpu":"2000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"service":{"annotations":{},"nodePort":30080,"port":8080,"type":"NodePort"},"serviceAccountName":"clearml","tolerations":[]}` | Web Server configurations |
| webserver | object | `{"additionalConfigs":{},"additionalVolumeMounts":{},"additionalVolumes":{},"affinity":{},"containerSecurityContext":{},"deploymentAnnotations":{},"enabled":true,"extraEnvs":[],"image":{"pullPolicy":"IfNotPresent","registry":"","repository":"allegroai/clearml","tag":"1.15.1-478"},"ingress":{"annotations":{},"enabled":false,"hostName":"app.clearml.127-0-0-1.nip.io","ingressClassName":"","path":"/","tlsSecretName":""},"initContainers":{"resources":{"limits":{"cpu":"10m","memory":"64Mi"},"requests":{"cpu":"10m","memory":"64Mi"}}},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"cpu":"2000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"service":{"annotations":{},"nodePort":30080,"port":8080,"type":"NodePort"},"serviceAccountName":"clearml","tolerations":[]}` | Web Server configurations |
| webserver.additionalConfigs | object | `{}` | Additional specific webserver configurations |
| webserver.additionalVolumeMounts | object | `{}` | Specifies where and how the volumes defined in additionalVolumes. |
| webserver.additionalVolumes | object | `{}` | # Defines extra Kubernetes volumes to be attached to the pod. |
| webserver.affinity | object | `{}` | Web Server affinity setup |
| webserver.containerSecurityContext | object | `{}` | Web Server containers security context |
| webserver.deploymentAnnotations | object | `{}` | Add the provided map to the annotations for the Deployment resource created by this chart. |

View File

@ -32,19 +32,24 @@ spec:
- name: clearml-registry-key
{{- end }}
{{- end }}
{{- if or .Values.apiserver.additionalConfigs .Values.apiserver.existingAdditionalConfigsConfigMap .Values.apiserver.existingAdditionalConfigsSecret }}
{{- if or .Values.apiserver.additionalConfigs .Values.apiserver.existingAdditionalConfigsConfigMap .Values.apiserver.existingAdditionalConfigsSecret .Values.apiserver.additionalVolumes }}
volumes:
{{- if .Values.apiserver.existingAdditionalConfigsConfigMap }}
- name: apiserver-config
{{- if or .Values.apiserver.existingAdditionalConfigsConfigMap }}
configMap:
name: {{ .Values.apiserver.existingAdditionalConfigsConfigMap }}
{{- else if or .Values.apiserver.existingAdditionalConfigsSecret }}
{{- else if .Values.apiserver.existingAdditionalConfigsSecret }}
- name: apiserver-config
secret:
secretName: {{ .Values.apiserver.existingAdditionalConfigsSecret }}
{{- else if or .Values.apiserver.additionalConfigs }}
{{- else if .Values.apiserver.additionalConfigs }}
- name: apiserver-config
configMap:
name: "{{ include "apiserver.referenceName" . }}-configmap"
{{- end }}
{{- end }}
{{- if .Values.apiserver.additionalVolumes }}
{{- toYaml .Values.apiserver.additionalVolumes | nindent 8 }}
{{- end }}
{{- end }}
securityContext:
{{ toYaml .Values.apiserver.podSecurityContext | nindent 8 }}
@ -170,10 +175,15 @@ spec:
httpHeaders:
- name: Authorization
value: Basic {{ include "readinessProbeAuth" . }}
{{- if or .Values.apiserver.additionalConfigs .Values.apiserver.existingAdditionalConfigsConfigMap .Values.apiserver.existingAdditionalConfigsSecret }}
{{- if or .Values.apiserver.additionalConfigs .Values.apiserver.existingAdditionalConfigsConfigMap .Values.apiserver.existingAdditionalConfigsSecret .Values.apiserver.additionalVolumeMounts }}
volumeMounts:
{{- if or .Values.apiserver.additionalConfigs .Values.apiserver.existingAdditionalConfigsConfigMap .Values.apiserver.existingAdditionalConfigsSecret }}
- name: apiserver-config
mountPath: /opt/clearml/config
{{- end }}
{{- if .Values.apiserver.additionalVolumeMounts }}
{{- toYaml .Values.apiserver.additionalVolumeMounts | nindent 8 }}
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.apiserver.resources | nindent 12 }}

View File

@ -47,6 +47,9 @@ spec:
- name: fileserver-data
emptyDir: {}
{{- end }}
{{- if .Values.fileserver.additionalVolumes }}
{{- toYaml .Values.fileserver.additionalVolumes | nindent 8 }}
{{- end }}
securityContext:
{{ toYaml .Values.fileserver.podSecurityContext | nindent 8 }}
initContainers:
@ -114,6 +117,9 @@ spec:
volumeMounts:
- name: fileserver-data
mountPath: /mnt/fileserver
{{- if .Values.fileserver.additionalVolumeMounts }}
{{- toYaml .Values.fileserver.additionalVolumeMounts | nindent 8 }}
{{- end }}
resources:
{{- toYaml .Values.fileserver.resources | nindent 12 }}
securityContext:

View File

@ -36,6 +36,9 @@ spec:
- name: webserver-config
configMap:
name: "{{ include "webserver.referenceName" . }}-configmap"
{{- if .Values.webserver.additionalVolumes }}
{{- toYaml .Values.webserver.additionalVolumes | nindent 8 }}
{{- end }}
securityContext:
{{ toYaml .Values.webserver.podSecurityContext | nindent 8 }}
initContainers:
@ -91,6 +94,9 @@ spec:
volumeMounts:
- name: webserver-config
mountPath: /mnt/external_files/configs
{{- if .Values.webserver.additionalVolumeMounts }}
{{- toYaml .Values.webserver.additionalVolumeMounts | nindent 8 }}
{{- end }}
resources:
{{- toYaml .Values.webserver.resources | nindent 12 }}
securityContext:

View File

@ -171,6 +171,16 @@ apiserver:
# ]
# }
# }
# -- # Defines extra Kubernetes volumes to be attached to the pod.
additionalVolumes: {}
# - name: ramdisk
# emptyDir:
# medium: Memory
# sizeLimit: 32Gi
# -- Specifies where and how the volumes defined in additionalVolumes.
additionalVolumeMounts: {}
# - mountPath: /dev/shm
# name: ramdisk
# -- File Server configurations
fileserver:
@ -257,6 +267,16 @@ fileserver:
# -- Access mode (must be ReadWriteMany if fileserver replica > 1)
accessMode: ReadWriteOnce
size: 50Gi
# -- # Defines extra Kubernetes volumes to be attached to the pod.
additionalVolumes: {}
# - name: ramdisk
# emptyDir:
# medium: Memory
# sizeLimit: 32Gi
# -- Specifies where and how the volumes defined in additionalVolumes.
additionalVolumeMounts: {}
# - mountPath: /dev/shm
# name: ramdisk
# -- Web Server configurations
webserver:
@ -333,6 +353,16 @@ webserver:
# fsGroup: 1001
# -- Additional specific webserver configurations
additionalConfigs: {}
# -- # Defines extra Kubernetes volumes to be attached to the pod.
additionalVolumes: {}
# - name: ramdisk
# emptyDir:
# medium: Memory
# sizeLimit: 32Gi
# -- Specifies where and how the volumes defined in additionalVolumes.
additionalVolumeMounts: {}
# - mountPath: /dev/shm
# name: ramdisk
# -- Definition of external services to use if not enabled as dependency charts here
externalServices: