mirror of
https://github.com/bitnami/charts.git
synced 2026-03-15 14:57:16 +08:00
[bitnami/mlflow] feat: 🎉 Add chart (#20069)
### Description of the change <!-- Describe the scope of your change - i.e. what the change does. --> ### Benefits <!-- What benefits will be realized by the code change? --> ### Possible drawbacks This PR adds a helm chart for MLflow. Has the following features: - TLS support - Network policies - Prometheus metrics - HPA and VPA - Bitnami standards --------- Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com> Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> Co-authored-by: Fran Mulero <fmulero@vmware.com> Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
committed by
GitHub
parent
2c722eb810
commit
be9324e370
21
bitnami/mlflow/.helmignore
Normal file
21
bitnami/mlflow/.helmignore
Normal file
@@ -0,0 +1,21 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
12
bitnami/mlflow/Chart.lock
Normal file
12
bitnami/mlflow/Chart.lock
Normal file
@@ -0,0 +1,12 @@
|
||||
dependencies:
|
||||
- name: minio
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 12.8.11
|
||||
- name: postgresql
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 13.0.0
|
||||
- name: common
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 2.13.0
|
||||
digest: sha256:129dcf0d041e2b964c6656467de4cd8e754d85ddf5a0f315e9d0899ca5c90382
|
||||
generated: "2023-10-02T12:46:06.313201017+02:00"
|
||||
44
bitnami/mlflow/Chart.yaml
Normal file
44
bitnami/mlflow/Chart.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
# Copyright VMware, Inc.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
annotations:
|
||||
category: MachineLearning
|
||||
licenses: Apache-2.0
|
||||
images: |
|
||||
- name: mlflow
|
||||
image: docker.io/bitanmi/mlflow:2.7.1-debian-11-r0
|
||||
- name: os-shell
|
||||
image: docker.io/bitnami/os-shell:11-debian-11-r83
|
||||
apiVersion: v2
|
||||
appVersion: 2.7.1
|
||||
dependencies:
|
||||
- condition: minio.enabled
|
||||
name: minio
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 12.x.x
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
version: 13.x.x
|
||||
- name: common
|
||||
repository: oci://registry-1.docker.io/bitnamicharts
|
||||
tags:
|
||||
- bitnami-common
|
||||
version: 2.x.x
|
||||
description: MLflow is an open-source platform designed to manage the end-to-end machine learning lifecycle. It allows you to track experiments, package code into reproducible runs, and share and deploy models.
|
||||
home: https://bitnami.com
|
||||
icon: https://bitnami.com/assets/stacks/mlflow/img/mlflow-stack-220x234.png
|
||||
keywords:
|
||||
- mlflow
|
||||
- models
|
||||
- python
|
||||
- machine
|
||||
- learning
|
||||
maintainers:
|
||||
- name: VMware, Inc.
|
||||
url: https://github.com/bitnami/charts
|
||||
name: mlflow
|
||||
sources:
|
||||
- https://github.com/bitnami/containers/tree/main/bitnami/mlflow
|
||||
- https://github.com/mlflow/mlflow
|
||||
version: 0.1.0
|
||||
501
bitnami/mlflow/README.md
Normal file
501
bitnami/mlflow/README.md
Normal file
@@ -0,0 +1,501 @@
|
||||
<!--- app-name: MLflow -->
|
||||
|
||||
# MLflow packaged by Bitnami
|
||||
|
||||
MLflow is an open-source platform designed to manage the end-to-end machine learning lifecycle. It allows you to track experiments, package code into reproducible runs, and share and deploy models.
|
||||
|
||||
[Overview of MLflow](https://mlflow.org/)
|
||||
|
||||
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
|
||||
|
||||
## TL;DR
|
||||
|
||||
```console
|
||||
helm install my-release oci://registry-1.docker.io/bitnamicharts/mlflow
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a [MLflow](https://github.com/bitnami/containers/tree/main/bitnami/mlflow) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
Python is built for full integration into Python that enables you to use it with its libraries and main packages.
|
||||
|
||||
Bitnami charts can be used with [Kubeapps](https://kubeapps.dev/) for deployment and management of Helm Charts in clusters.
|
||||
|
||||
Looking to use MLflow in production? Try [VMware Application Catalog](https://bitnami.com/enterprise), the enterprise edition of Bitnami Application Catalog.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.19+
|
||||
- Helm 3.2.0+
|
||||
- PV provisioner support in the underlying infrastructure
|
||||
- ReadWriteMany volumes for deployment scaling
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
helm install my-release oci://registry-1.docker.io/bitnamicharts/mlflow
|
||||
```
|
||||
|
||||
The command deploys mlflow on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Parameters
|
||||
|
||||
### Global parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------- | ----------------------------------------------- | ----- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `""` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
|
||||
| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` |
|
||||
|
||||
### Common parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------ | --------------------------------------------------------------------------------------- | --------------- |
|
||||
| `kubeVersion` | Override Kubernetes version | `""` |
|
||||
| `nameOverride` | String to partially override common.names.name | `""` |
|
||||
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
|
||||
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
|
||||
| `commonLabels` | Labels to add to all deployed objects | `{}` |
|
||||
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
|
||||
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
|
||||
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
|
||||
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
|
||||
| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
|
||||
| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |
|
||||
|
||||
### MLflow common Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
|
||||
| `image.registry` | mlflow image registry | `docker.io` |
|
||||
| `image.repository` | mlflow image repository | `bitnami/mlflow` |
|
||||
| `image.tag` | mlflow image tag (immutable tags are recommended) | `2.7.1-debian-11-r0` |
|
||||
| `image.digest` | mlflow image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | `""` |
|
||||
| `image.pullPolicy` | mlflow image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | mlflow image pull secrets | `[]` |
|
||||
| `image.debug` | Enable mlflow image debug mode | `false` |
|
||||
| `gitImage.registry` | Git image registry | `docker.io` |
|
||||
| `gitImage.repository` | Git image repository | `bitnami/git` |
|
||||
| `gitImage.tag` | Git image tag (immutable tags are recommended) | `2.42.0-debian-11-r20` |
|
||||
| `gitImage.digest` | Git image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
|
||||
| `gitImage.pullPolicy` | Git image pull policy | `IfNotPresent` |
|
||||
| `gitImage.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
|
||||
|
||||
### MLflow Tracking parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
|
||||
| `tracking.enabled` | Enable Tracking server | `true` |
|
||||
| `tracking.replicaCount` | Number of mlflow replicas to deploy | `1` |
|
||||
| `tracking.containerPorts.http` | mlflow HTTP container port | `5000` |
|
||||
| `tracking.livenessProbe.enabled` | Enable livenessProbe on mlflow containers | `true` |
|
||||
| `tracking.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `5` |
|
||||
| `tracking.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
|
||||
| `tracking.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
|
||||
| `tracking.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` |
|
||||
| `tracking.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
|
||||
| `tracking.readinessProbe.enabled` | Enable readinessProbe on mlflow containers | `true` |
|
||||
| `tracking.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
|
||||
| `tracking.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
|
||||
| `tracking.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` |
|
||||
| `tracking.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` |
|
||||
| `tracking.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
|
||||
| `tracking.startupProbe.enabled` | Enable startupProbe on mlflow containers | `false` |
|
||||
| `tracking.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` |
|
||||
| `tracking.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
|
||||
| `tracking.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
|
||||
| `tracking.startupProbe.failureThreshold` | Failure threshold for startupProbe | `5` |
|
||||
| `tracking.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
|
||||
| `tracking.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
|
||||
| `tracking.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
|
||||
| `tracking.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
|
||||
| `tracking.resources.limits` | The resources limits for the mlflow containers | `{}` |
|
||||
| `tracking.resources.requests` | The requested resources for the mlflow containers | `{}` |
|
||||
| `tracking.podSecurityContext.enabled` | Enabled mlflow pods' Security Context | `true` |
|
||||
| `tracking.podSecurityContext.fsGroup` | Set mlflow pod's Security Context fsGroup | `1001` |
|
||||
| `tracking.podSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
|
||||
| `tracking.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
|
||||
| `tracking.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
|
||||
| `tracking.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
|
||||
| `tracking.containerSecurityContext.runAsNonRoot` | Set containers' Security Context runAsNonRoot | `true` |
|
||||
| `tracking.containerSecurityContext.readOnlyRootFilesystem` | Set containers' Security Context runAsNonRoot | `true` |
|
||||
| `tracking.containerSecurityContext.allowPrivilegeEscalation` | Set container's privilege escalation | `false` |
|
||||
| `tracking.containerSecurityContext.capabilities.drop` | Set container's Security Context runAsNonRoot | `["ALL"]` |
|
||||
| `tracking.auth.enabled` | Enable basic authentication | `true` |
|
||||
| `tracking.auth.username` | Admin username | `user` |
|
||||
| `tracking.auth.password` | Admin password | `""` |
|
||||
| `tracking.auth.existingSecret` | Name of a secret containing the admin password | `""` |
|
||||
| `tracking.auth.existingSecretUserKey` | Key inside the secret containing the admin password | `""` |
|
||||
| `tracking.auth.existingSecretPasswordKey` | Key inside the secret containing the admin password | `""` |
|
||||
| `tracking.auth.extraOverrides` | Add extra settings to the basic_auth.ini file | `{}` |
|
||||
| `tracking.auth.overridesConfigMap` | Name of a ConfigMap containing overrides to the basic_auth.ini file | `""` |
|
||||
| `tracking.tls.enabled` | Enable TLS traffic support | `false` |
|
||||
| `tracking.tls.autoGenerated` | Generate automatically self-signed TLS certificates | `false` |
|
||||
| `tracking.tls.certificatesSecret` | Name of an existing secret that contains the certificates | `""` |
|
||||
| `tracking.tls.certFilename` | Certificate filename | `""` |
|
||||
| `tracking.tls.certKeyFilename` | Certificate key filename | `""` |
|
||||
| `tracking.tls.certCAFilename` | CA Certificate filename | `""` |
|
||||
| `tracking.command` | Override default container command (useful when using custom images) | `[]` |
|
||||
| `tracking.args` | Override default container args (useful when using custom images) | `[]` |
|
||||
| `tracking.extraArgs` | Add extra arguments together with the default ones | `[]` |
|
||||
| `tracking.runUpgradeDB` | Add an init container to run mlflow db upgrade | `false` |
|
||||
| `tracking.hostAliases` | mlflow pods host aliases | `[]` |
|
||||
| `tracking.podLabels` | Extra labels for mlflow pods | `{}` |
|
||||
| `tracking.podAnnotations` | Annotations for mlflow pods | `{}` |
|
||||
| `tracking.podAffinityPreset` | Pod affinity preset. Ignored if `.affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `tracking.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
||||
| `tracking.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
|
||||
| `tracking.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
|
||||
| `tracking.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
|
||||
| `tracking.autoscaling.hpa.enabled` | Enable HPA | `false` |
|
||||
| `tracking.autoscaling.hpa.minReplicas` | Minimum number of replicas | `""` |
|
||||
| `tracking.autoscaling.hpa.maxReplicas` | Maximum number of replicas | `""` |
|
||||
| `tracking.autoscaling.hpa.targetCPU` | Target CPU utilization percentage | `""` |
|
||||
| `tracking.autoscaling.hpa.targetMemory` | Target Memory utilization percentage | `""` |
|
||||
| `tracking.autoscaling.vpa.enabled` | Enable VPA | `false` |
|
||||
| `tracking.autoscaling.vpa.annotations` | Annotations for VPA resource | `{}` |
|
||||
| `tracking.autoscaling.vpa.controlledResources` | VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory | `[]` |
|
||||
| `tracking.autoscaling.vpa.maxAllowed` | VPA Max allowed resources for the pod | `{}` |
|
||||
| `tracking.autoscaling.vpa.minAllowed` | VPA Min allowed resources for the pod | `{}` |
|
||||
| `tracking.autoscaling.vpa.updatePolicy.updateMode` | Autoscaling update policy Specifies whether recommended updates are applied when a Pod is started and whether recommended updates are applied during the life of a Pod | `Auto` |
|
||||
| `tracking.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `.affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `tracking.nodeAffinityPreset.key` | Node label key to match. Ignored if `.affinity` is set | `""` |
|
||||
| `tracking.nodeAffinityPreset.values` | Node label values to match. Ignored if `.affinity` is set | `[]` |
|
||||
| `tracking.affinity` | Affinity for mlflow pods assignment | `{}` |
|
||||
| `tracking.nodeSelector` | Node labels for mlflow pods assignment | `{}` |
|
||||
| `tracking.tolerations` | Tolerations for mlflow pods assignment | `[]` |
|
||||
| `tracking.updateStrategy.type` | mlflow statefulset strategy type | `RollingUpdate` |
|
||||
| `tracking.priorityClassName` | mlflow pods' priorityClassName | `""` |
|
||||
| `tracking.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
|
||||
| `tracking.schedulerName` | Name of the k8s scheduler (other than default) for mlflow pods | `""` |
|
||||
| `tracking.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` |
|
||||
| `tracking.lifecycleHooks` | for the mlflow container(s) to automate configuration before or after startup | `{}` |
|
||||
| `tracking.extraEnvVars` | Array with extra environment variables to add to mlflow nodes | `[]` |
|
||||
| `tracking.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for mlflow nodes | `""` |
|
||||
| `tracking.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for mlflow nodes | `""` |
|
||||
| `tracking.extraVolumes` | Optionally specify extra list of additional volumes for the mlflow pod(s) | `[]` |
|
||||
| `tracking.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the mlflow container(s) | `[]` |
|
||||
| `tracking.sidecars` | Add additional sidecar containers to the mlflow pod(s) | `[]` |
|
||||
| `tracking.enableDefaultInitContainers` | Add default init containers to the deployment | `true` |
|
||||
| `tracking.initContainers` | Add additional init containers to the mlflow pod(s) | `[]` |
|
||||
|
||||
### MLflow Tracking Traffic Exposure Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
|
||||
| `tracking.service.type` | mlflow service type | `LoadBalancer` |
|
||||
| `tracking.service.ports.http` | mlflow service HTTP port | `80` |
|
||||
| `tracking.service.ports.https` | mlflow service HTTPS port | `443` |
|
||||
| `tracking.service.nodePorts.http` | Node port for HTTP | `""` |
|
||||
| `tracking.service.nodePorts.https` | Node port for HTTPS | `""` |
|
||||
| `tracking.service.clusterIP` | mlflow service Cluster IP | `""` |
|
||||
| `tracking.service.loadBalancerIP` | mlflow service Load Balancer IP | `""` |
|
||||
| `tracking.service.loadBalancerSourceRanges` | mlflow service Load Balancer sources | `[]` |
|
||||
| `tracking.service.labels` | Add labels to the service object | `{}` |
|
||||
| `tracking.service.externalTrafficPolicy` | mlflow service external traffic policy | `Cluster` |
|
||||
| `tracking.service.annotations` | Additional custom annotations for mlflow service | `{}` |
|
||||
| `tracking.service.extraPorts` | Extra ports to expose in mlflow service (normally used with the `sidecars` value) | `[]` |
|
||||
| `tracking.service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
|
||||
| `tracking.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
|
||||
| `tracking.ingress.enabled` | Enable ingress record generation for mlflow | `false` |
|
||||
| `tracking.ingress.pathType` | Ingress path type | `ImplementationSpecific` |
|
||||
| `tracking.ingress.hostname` | Default host for the ingress record | `mlflow.local` |
|
||||
| `tracking.ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
|
||||
| `tracking.ingress.path` | Default path for the ingress record | `/` |
|
||||
| `tracking.ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
|
||||
| `tracking.ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
|
||||
| `tracking.ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
|
||||
| `tracking.ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
|
||||
| `tracking.ingress.extraPaths` | An array with additional arbitrary paths that may need to be added to the ingress under the main host | `[]` |
|
||||
| `tracking.ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
|
||||
| `tracking.ingress.secrets` | Custom TLS certificates as secrets | `[]` |
|
||||
| `tracking.ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
|
||||
| `tracking.networkPolicy.enabled` | Enable creation of NetworkPolicy resources | `false` |
|
||||
| `tracking.networkPolicy.allowExternal` | The Policy model to apply | `true` |
|
||||
| `tracking.networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
|
||||
| `tracking.networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` |
|
||||
| `tracking.networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
|
||||
| `tracking.networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
|
||||
|
||||
### MLflow Tracking Persistence Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------ | ------------------------------------------------------------------------------------------------------- | ------------------- |
|
||||
| `tracking.persistence.enabled` | Enable persistence using Persistent Volume Claims | `true` |
|
||||
| `tracking.persistence.mountPath` | Path to mount the volume at. | `/bitnami/mlflow` |
|
||||
| `tracking.persistence.subPath` | The subdirectory of the volume to mount to, useful in dev environments and one PV for multiple services | `""` |
|
||||
| `tracking.persistence.storageClass` | Storage class of backing PVC | `""` |
|
||||
| `tracking.persistence.labels` | Persistent Volume labels | `{}` |
|
||||
| `tracking.persistence.annotations` | Persistent Volume Claim annotations | `{}` |
|
||||
| `tracking.persistence.accessModes` | Persistent Volume Access Modes | `["ReadWriteOnce"]` |
|
||||
| `tracking.persistence.size` | Size of data volume | `8Gi` |
|
||||
| `tracking.persistence.existingClaim` | The name of an existing PVC to use for persistence | `""` |
|
||||
| `tracking.persistence.selector` | Selector to match an existing Persistent Volume for WordPress data PVC | `{}` |
|
||||
| `tracking.persistence.dataSource` | Custom PVC data source | `{}` |
|
||||
|
||||
### MLflow Tracking Other Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------ | ---------------------------------------------------------------- | ------- |
|
||||
| `tracking.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
|
||||
| `tracking.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
|
||||
| `tracking.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
|
||||
| `tracking.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` |
|
||||
|
||||
### MLflow Tracking Metrics Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
|
||||
| `tracking.metrics.enabled` | Enable the export of Prometheus metrics | `false` |
|
||||
| `tracking.metrics.annotations` | Annotations for the tracking service in order to scrape metrics | `{}` |
|
||||
| `tracking.metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
|
||||
| `tracking.metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `""` |
|
||||
| `tracking.metrics.serviceMonitor.annotations` | Additional custom annotations for the ServiceMonitor | `{}` |
|
||||
| `tracking.metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
|
||||
| `tracking.metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
|
||||
| `tracking.metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
|
||||
| `tracking.metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` |
|
||||
| `tracking.metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
|
||||
| `tracking.metrics.serviceMonitor.metricRelabelings` | Specify additional relabeling of metrics | `[]` |
|
||||
| `tracking.metrics.serviceMonitor.relabelings` | Specify general relabeling | `[]` |
|
||||
| `tracking.metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
|
||||
|
||||
### MLflow Run Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------- |
|
||||
| `run.enabled` | Enable Run deployment | `true` |
|
||||
| `run.useJob` | Deploy as job | `false` |
|
||||
| `run.backoffLimit` | set backoff limit of the job | `10` |
|
||||
| `run.restartPolicy` | set restart policy of the job | `OnFailure` |
|
||||
| `run.extraEnvVars` | Array with extra environment variables to add to run nodes | `[]` |
|
||||
| `run.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for run nodes | `""` |
|
||||
| `run.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for run nodes | `""` |
|
||||
| `run.annotations` | Annotations for the run deployment | `{}` |
|
||||
| `run.command` | Override default container command (useful when using custom images) | `[]` |
|
||||
| `run.args` | Override default container args (useful when using custom images) | `[]` |
|
||||
| `run.terminationGracePeriodSeconds` | Run termination grace period (in seconds) | `""` |
|
||||
| `run.livenessProbe.enabled` | Enable livenessProbe on Run nodes | `true` |
|
||||
| `run.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `5` |
|
||||
| `run.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` |
|
||||
| `run.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `20` |
|
||||
| `run.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` |
|
||||
| `run.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
|
||||
| `run.readinessProbe.enabled` | Enable readinessProbe on Run nodes | `true` |
|
||||
| `run.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
|
||||
| `run.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` |
|
||||
| `run.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `20` |
|
||||
| `run.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` |
|
||||
| `run.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
|
||||
| `run.startupProbe.enabled` | Enable startupProbe on Run containers | `false` |
|
||||
| `run.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` |
|
||||
| `run.startupProbe.periodSeconds` | Period seconds for startupProbe | `30` |
|
||||
| `run.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
|
||||
| `run.startupProbe.failureThreshold` | Failure threshold for startupProbe | `5` |
|
||||
| `run.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
|
||||
| `run.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
|
||||
| `run.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
|
||||
| `run.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
|
||||
| `run.resources.limits` | The resources limits for the run containers | `{}` |
|
||||
| `run.resources.requests` | The requested resources for the run containers | `{}` |
|
||||
| `run.podSecurityContext.enabled` | Enabled Run pods' Security Context | `true` |
|
||||
| `run.podSecurityContext.fsGroup` | Set Run pod's Security Context fsGroup | `1001` |
|
||||
| `run.podSecurityContext.seccompProfile.type` | Set Run container's Security Context seccomp profile | `RuntimeDefault` |
|
||||
| `run.containerSecurityContext.enabled` | Enabled Run containers' Security Context | `true` |
|
||||
| `run.containerSecurityContext.runAsUser` | Set Run containers' Security Context runAsUser | `1001` |
|
||||
| `run.containerSecurityContext.runAsGroup` | Set Run containers' Security Context runAsGroup | `1001` |
|
||||
| `run.containerSecurityContext.runAsNonRoot` | Set Run containers' Security Context runAsNonRoot | `true` |
|
||||
| `run.containerSecurityContext.readOnlyRootFilesystem` | Set Run containers' Security Context runAsNonRoot | `true` |
|
||||
| `run.containerSecurityContext.allowPrivilegeEscalation` | Set Run container's privilege escalation | `false` |
|
||||
| `run.containerSecurityContext.capabilities.drop` | Set Run container's Security Context runAsNonRoot | `["ALL"]` |
|
||||
| `run.lifecycleHooks` | for the run container(s) to automate configuration before or after startup | `{}` |
|
||||
| `run.runtimeClassName` | Name of the runtime class to be used by pod(s) | `""` |
|
||||
| `run.hostAliases` | run pods host aliases | `[]` |
|
||||
| `run.labels` | Extra labels for the run deployment | `{}` |
|
||||
| `run.podLabels` | Extra labels for run pods | `{}` |
|
||||
| `run.podAnnotations` | Annotations for run pods | `{}` |
|
||||
| `run.podAffinityPreset` | Pod affinity preset. Ignored if `run.affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `run.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `run.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
||||
| `run.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `run.affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `run.nodeAffinityPreset.key` | Node label key to match. Ignored if `run.affinity` is set | `""` |
|
||||
| `run.nodeAffinityPreset.values` | Node label values to match. Ignored if `run.affinity` is set | `[]` |
|
||||
| `run.affinity` | Affinity for Run pods assignment | `{}` |
|
||||
| `run.nodeSelector` | Node labels for Run pods assignment | `{}` |
|
||||
| `run.tolerations` | Tolerations for Run pods assignment | `[]` |
|
||||
| `run.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains | `[]` |
|
||||
| `run.priorityClassName` | Run pods' priorityClassName | `""` |
|
||||
| `run.schedulerName` | Kubernetes pod scheduler registry | `""` |
|
||||
| `run.updateStrategy.type` | Run statefulset strategy type | `RollingUpdate` |
|
||||
| `run.updateStrategy.rollingUpdate` | Run statefulset rolling update configuration parameters | `{}` |
|
||||
| `run.extraVolumes` | Optionally specify extra list of additional volumes for the Run pod(s) | `[]` |
|
||||
| `run.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Run container(s) | `[]` |
|
||||
| `run.sidecars` | Add additional sidecar containers to the Run pod(s) | `[]` |
|
||||
| `run.enableDefaultInitContainers` | Deploy default init containers | `true` |
|
||||
| `run.initContainers` | Add additional init containers to the Run pod(s) | `[]` |
|
||||
| `run.source.type` | Where the source comes from: Possible values: configmap, git, custom | `configmap` |
|
||||
| `run.source.launchCommand` | deepspeed command to run over the project | `""` |
|
||||
| `run.source.configMap` | List of files of the project | `{}` |
|
||||
| `run.source.existingConfigMap` | Name of a configmap containing the files of the project | `""` |
|
||||
| `run.source.git.repository` | Repository that holds the files | `""` |
|
||||
| `run.source.git.revision` | Revision from the repository to checkout | `""` |
|
||||
| `run.source.git.extraVolumeMounts` | Add extra volume mounts for the Git container | `[]` |
|
||||
| `run.serviceAccount.create` | Enable creation of ServiceAccount for Run pods | `false` |
|
||||
| `run.serviceAccount.name` | The name of the ServiceAccount to use | `""` |
|
||||
| `run.serviceAccount.automountServiceAccountToken` | Allows auto mount of ServiceAccountToken on the serviceAccount created | `false` |
|
||||
| `run.serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
|
||||
|
||||
### Mlflow Run persistence paramaters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------- | -------------------------------------------------------------------- | ---------------------- |
|
||||
| `run.persistence.enabled` | Use a PVC to persist data | `false` |
|
||||
| `run.persistence.storageClass` | discourse & sidekiq data Persistent Volume Storage Class | `""` |
|
||||
| `run.persistence.existingClaim` | Use a existing PVC which must be created manually before bound | `""` |
|
||||
| `run.persistence.mountPath` | Path to mount the volume at | `/bitnami/mlflow/data` |
|
||||
| `run.persistence.subPath` | subPath to use for mounting the volume | `""` |
|
||||
| `run.persistence.accessModes` | Persistent Volume Access Mode | `["ReadWriteOnce"]` |
|
||||
| `run.persistence.dataSource` | Custom PVC data source | `{}` |
|
||||
| `run.persistence.selector` | Selector to match an existing Persistent Volume for the run data PVC | `{}` |
|
||||
| `run.persistence.size` | Size of data volume | `8Gi` |
|
||||
| `run.persistence.labels` | Persistent Volume labels | `{}` |
|
||||
| `run.persistence.annotations` | Persistent Volume annotations | `{}` |
|
||||
|
||||
### Init Container Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||
| `volumePermissions.enabled` | Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup` | `false` |
|
||||
| `volumePermissions.image.registry` | OS Shell + Utility image registry | `docker.io` |
|
||||
| `volumePermissions.image.repository` | OS Shell + Utility image repository | `bitnami/os-shell` |
|
||||
| `volumePermissions.image.tag` | OS Shell + Utility image tag (immutable tags are recommended) | `11-debian-11-r81` |
|
||||
| `volumePermissions.image.pullPolicy` | OS Shell + Utility image pull policy | `IfNotPresent` |
|
||||
| `volumePermissions.image.pullSecrets` | OS Shell + Utility image pull secrets | `[]` |
|
||||
| `volumePermissions.resources.limits` | The resources limits for the init container | `{}` |
|
||||
| `volumePermissions.resources.requests` | The requested resources for the init container | `{}` |
|
||||
| `volumePermissions.containerSecurityContext.enabled` | Set container security context settings | `true` |
|
||||
| `volumePermissions.containerSecurityContext.runAsUser` | Set init container's Security Context runAsUser | `0` |
|
||||
| `waitContainer.image.registry` | Init container wait-container image registry | `docker.io` |
|
||||
| `waitContainer.image.repository` | Init container wait-container image name | `bitnami/os-shell` |
|
||||
| `waitContainer.image.tag` | Init container wait-container image tag | `11-debian-11-r83` |
|
||||
| `waitContainer.image.digest` | Init container wait-container image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
|
||||
| `waitContainer.image.pullPolicy` | Init container wait-container image pull policy | `IfNotPresent` |
|
||||
| `waitContainer.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
|
||||
| `waitContainer.containerSecurityContext.enabled` | Enabled APISIX containers' Security Context | `true` |
|
||||
| `waitContainer.containerSecurityContext.runAsUser` | Set APISIX containers' Security Context runAsUser | `1001` |
|
||||
| `waitContainer.containerSecurityContext.runAsNonRoot` | Set APISIX containers' Security Context runAsNonRoot | `true` |
|
||||
| `waitContainer.containerSecurityContext.readOnlyRootFilesystem` | Set APISIX containers' Security Context runAsNonRoot | `true` |
|
||||
| `waitContainer.containerSecurityContext.allowPrivilegeEscalation` | Set APISIX container's privilege escalation | `false` |
|
||||
| `waitContainer.containerSecurityContext.capabilities.drop` | Set APISIX container's Security Context runAsNonRoot | `["ALL"]` |
|
||||
|
||||
### PostgreSQL chart configuration
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------- | --------------------------------------------------------- | ---------------- |
|
||||
| `postgresql.enabled` | Switch to enable or disable the PostgreSQL helm chart | `true` |
|
||||
| `postgresql.auth.username` | Name for a custom user to create | `bn_mlflow` |
|
||||
| `postgresql.auth.password` | Password for the custom user to create | `""` |
|
||||
| `postgresql.auth.database` | Name for a custom database to create | `bitnami_mlflow` |
|
||||
| `postgresql.auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials | `""` |
|
||||
| `postgresql.architecture` | PostgreSQL architecture (`standalone` or `replication`) | `standalone` |
|
||||
| `postgresql.primary.service.ports.postgresql` | PostgreSQL service port | `5432` |
|
||||
| `postgresql.primary.initdb.scripts` | Map with init scripts for the PostgreSQL database | `{}` |
|
||||
|
||||
### External PostgreSQL configuration
|
||||
|
||||
| Name | Description | Value |
|
||||
| -------------------------------------------- | ----------------------------------------------------------------------- | ------------- |
|
||||
| `externalDatabase.host` | Database host | `""` |
|
||||
| `externalDatabase.port` | Database port number | `5432` |
|
||||
| `externalDatabase.user` | Non-root username | `postgres` |
|
||||
| `externalDatabase.password` | Password for the non-root username | `""` |
|
||||
| `externalDatabase.database` | Database name | `mlflow` |
|
||||
| `externalDatabase.authDatabase` | Database name for the auth module (only if tracking.auth.enabled=true) | `mlflow_auth` |
|
||||
| `externalDatabase.existingSecret` | Name of an existing secret resource containing the database credentials | `""` |
|
||||
| `externalDatabase.existingSecretPasswordKey` | Name of an existing secret key containing the database credentials | `db-password` |
|
||||
|
||||
### MinIO® chart parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
||||
| `minio` | For full list of MinIO® values configurations please refere [here](https://github.com/bitnami/charts/tree/main/bitnami/minio) | |
|
||||
| `minio.enabled` | Enable/disable MinIO® chart installation | `true` |
|
||||
| `minio.auth.rootUser` | MinIO® root username | `admin` |
|
||||
| `minio.auth.rootPassword` | Password for MinIO® root user | `""` |
|
||||
| `minio.auth.existingSecret` | Name of an existing secret containing the MinIO® credentials | `""` |
|
||||
| `minio.defaultBuckets` | Comma, semi-colon or space separated list of MinIO® buckets to create | `mlflow` |
|
||||
| `minio.provisioning.enabled` | Enable/disable MinIO® provisioning job | `true` |
|
||||
| `minio.provisioning.extraCommands` | Extra commands to run on MinIO® provisioning job | `["mc anonymous set download provisioning/mlflow"]` |
|
||||
| `minio.tls.enabled` | Enable/disable MinIO® TLS support | `false` |
|
||||
| `minio.service.type` | MinIO® service type | `ClusterIP` |
|
||||
| `minio.service.loadBalancerIP` | MinIO® service LoadBalancer IP | `""` |
|
||||
| `minio.service.ports.api` | MinIO® service port | `80` |
|
||||
|
||||
### External S3 parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------------------------------- | ------------------------------------------------------------------ | --------------- |
|
||||
| `externalS3.host` | External S3 host | `""` |
|
||||
| `externalS3.port` | External S3 port number | `443` |
|
||||
| `externalS3.accessKeyID` | External S3 access key ID | `""` |
|
||||
| `externalS3.accessKeySecret` | External S3 access key secret | `""` |
|
||||
| `externalS3.existingSecret` | Name of an existing secret resource containing the S3 credentials | `""` |
|
||||
| `externalS3.existingSecretAccessKeyIDKey` | Name of an existing secret key containing the S3 access key ID | `root-user` |
|
||||
| `externalS3.existingSecretKeySecretKey` | Name of an existing secret key containing the S3 access key secret | `root-password` |
|
||||
| `externalS3.protocol` | External S3 protocol | `https` |
|
||||
| `externalS3.bucket` | External S3 bucket | `mlflow` |
|
||||
|
||||
The MLflow chart supports three different ways to load your files in the `run` deployment. In order of priority, they are:
|
||||
|
||||
1. Existing config map
|
||||
2. Add files in the values.yaml
|
||||
3. Cloning a git repository
|
||||
|
||||
This means that if you specify a config map with your files, it won't check the files defined in `values.yaml` directory nor the git repository.
|
||||
|
||||
In order to use an existing config map, set the `run.source.existingConfigMap=my-config-map` parameter.
|
||||
|
||||
To add your files in the values.yaml file, set the `run.source.configmap` object with the files.
|
||||
|
||||
Finally, if you want to clone a git repository you can use those parameters:
|
||||
|
||||
```console
|
||||
run.source.type=git
|
||||
run.source.git.repository=https://github.com/my-user/my-project
|
||||
run.source.git.revision=master
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2023 VMware, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
<http://www.apache.org/licenses/LICENSE-2.0>
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
103
bitnami/mlflow/templates/NOTES.txt
Normal file
103
bitnami/mlflow/templates/NOTES.txt
Normal file
@@ -0,0 +1,103 @@
|
||||
CHART NAME: {{ .Chart.Name }}
|
||||
CHART VERSION: {{ .Chart.Version }}
|
||||
APP VERSION: {{ .Chart.AppVersion }}
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
|
||||
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
|
||||
|
||||
Get the list of pods by executing:
|
||||
|
||||
kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}
|
||||
|
||||
Access the pod you want to debug by executing
|
||||
|
||||
kubectl exec --namespace {{ include "common.names.namespace" . | quote }} -ti <NAME OF THE POD> -- bash
|
||||
|
||||
{{- else }}
|
||||
|
||||
{{- if .Values.run.enabled }}
|
||||
{{- if .Values.run.source.launchCommand }}
|
||||
The following command will be executed:
|
||||
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.source.launchCommand "context" $) | nindent 2 }}
|
||||
|
||||
You can see the logs of each running node with:
|
||||
kubectl logs [POD_NAME]
|
||||
|
||||
and the list of pods:
|
||||
kubectl get pods --namespace {{ include "common.names.namespace" . }} -l "app.kubernetes.io/name={{ include "common.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
||||
{{- else }}
|
||||
You didn't specify any entrypoint to your code.
|
||||
To run it, you can either deploy again using the `source.launchCommand` option to specify your entrypoint, or execute it manually by jumping into the pods:
|
||||
|
||||
1. Get the running pods
|
||||
kubectl get pods --namespace {{ include "common.names.namespace" . }} -l "app.kubernetes.io/name={{ include "common.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
||||
|
||||
2. Get into a pod
|
||||
kubectl exec -ti [POD_NAME] bash
|
||||
|
||||
3. Execute your script as you would normally do.
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.tracking.enabled }}
|
||||
MLflow Tracking Server can be accessed through the following DNS name from within your cluster:
|
||||
|
||||
{{ include "mlflow.v0.tracking.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} (port {{ include "mlflow.v0.tracking.port" . }})
|
||||
|
||||
To access your MLflow site from outside the cluster follow the steps below:
|
||||
|
||||
{{- if .Values.tracking.ingress.enabled }}
|
||||
|
||||
1. Get the MLflow URL and associate MLflow hostname to your cluster external IP:
|
||||
|
||||
export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
|
||||
echo "MLflow URL: http{{ if .Values.tracking.ingress.tls }}s{{ end }}://{{ .Values.tracking.ingress.hostname }}/"
|
||||
echo "$CLUSTER_IP {{ .Values.tracking.ingress.hostname }}" | sudo tee -a /etc/hosts
|
||||
|
||||
{{- else }}
|
||||
{{- $port := include "mlflow.v0.tracking.port" . | toString }}
|
||||
|
||||
1. Get the MLflow URL by running these commands:
|
||||
|
||||
{{- if contains "NodePort" .Values.tracking.service.type }}
|
||||
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "mlflow.v0.tracking.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo "MLflow URL: {{ include "mlflow.v0.tracking.protocol" . }}://$NODE_IP:$NODE_PORT/"
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.tracking.service.type }}
|
||||
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "mlflow.v0.tracking.fullname" . }}'
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "mlflow.v0.tracking.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
|
||||
echo "MLflow URL: {{ include "mlflow.v0.tracking.protocol" . }}://$SERVICE_IP{{- if ne $port "80" }}:{{ include "mlflow.v0.tracking.port" . }}{{ end }}/"
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.tracking.service.type }}
|
||||
|
||||
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "mlflow.v0.tracking.fullname" . }} {{ include "mlflow.v0.tracking.port" . }}:{{ include "mlflow.v0.tracking.port" . }} &
|
||||
echo "MLflow URL: {{ include "mlflow.v0.tracking.protocol" . }}://127.0.0.1{{- if ne $port "80" }}:{{ include "mlflow.v0.tracking.port" . }}{{ end }}//"
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
2. Open a browser and access MLflow using the obtained URL.
|
||||
|
||||
{{- if .Values.tracking.enabled }}
|
||||
3. Login with the following credentials below to see your blog:
|
||||
|
||||
echo Username: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "mlflow.v0.tracking.fullname" . }} -o jsonpath="{ .data.{{ include "mlflow.v0.tracking.userKey" . }} }" | base64 -d)
|
||||
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "mlflow.v0.tracking.fullname" . }} -o jsonpath="{.data.{{ include "mlflow.v0.tracking.passwordKey" . }} }" | base64 -d)
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- include "common.warnings.rollingTag" .Values.image }}
|
||||
{{- include "mlflow.v0.validateValues" . }}
|
||||
756
bitnami/mlflow/templates/_helpers.tpl
Normal file
756
bitnami/mlflow/templates/_helpers.tpl
Normal file
@@ -0,0 +1,756 @@
|
||||
{{/*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name
|
||||
*/}}
|
||||
{{- define "mlflow.v0.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the init container volume-permissions image)
|
||||
*/}}
|
||||
{{- define "mlflow.v0.volumePermissions.image" -}}
|
||||
{{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissions.image "global" .Values.global ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the init container wait-permissions image)
|
||||
*/}}
|
||||
{{- define "mlflow.v0.waitContainer.image" -}}
|
||||
{{- include "common.images.image" ( dict "imageRoot" .Values.waitContainer.image "global" .Values.global ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "mlflow.v0.imagePullSecrets" -}}
|
||||
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.waitContainer.image .Values.volumePermissions.image) "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Fullname of the tracking service
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.fullname" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) "tracking" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.serviceAccountName" -}}
|
||||
{{- if .Values.tracking.serviceAccount.create -}}
|
||||
{{ default (include "mlflow.v0.tracking.fullname" .) .Values.tracking.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.tracking.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MLflow Tracking Secret Name
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.secretName" -}}
|
||||
{{- if .Values.tracking.auth.existingSecret -}}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.auth.existingSecret "context" $) -}}
|
||||
{{- else -}}
|
||||
{{- include "mlflow.v0.tracking.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MLflow Tracking Secret key for the password
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.passwordKey" -}}
|
||||
{{- coalesce .Values.tracking.auth.existingSecretPasswordKey "admin-password" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MLflow Tracking Secret key for the user
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.userKey" -}}
|
||||
{{- coalesce .Values.tracking.auth.existingSecretUserKey "admin-user" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MLFlow Trakcing Port
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.port" -}}
|
||||
{{ ternary .Values.tracking.service.ports.https .Values.tracking.service.ports.http .Values.tracking.tls.enabled }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MLFlow Trakcing Protocol
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.protocol" -}}
|
||||
{{- ternary "https" "http" .Values.tracking.tls.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MLFlow Trakcing URI
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.uri" -}}
|
||||
{{ printf "%s://%s:%v" (include "mlflow.v0.tracking.protocol" .) (include "mlflow.v0.tracking.fullname" .) (include "mlflow.v0.tracking.port" .) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the source configmap.
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.auth.overridesConfigMapName" -}}
|
||||
{{- if .Values.tracking.auth.overridesConfigMap -}}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.auth.overridesConfigMap "context" $) -}}
|
||||
{{- else }}
|
||||
{{- printf "%s-auth-overrides" (include "mlflow.v0.tracking.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Init container definition for copying the certificates
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.copyCertsInitContainer" -}}
|
||||
- name: copy-certs
|
||||
image: {{ include "mlflow.v0.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.tracking.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.tracking.containerSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
- |
|
||||
#!/bin/bash
|
||||
cp -L /tmp/certs/* /bitnami/mlflow/certs
|
||||
chmod 600 {{ include "mlflow.v0.tracking.tlsCertKey" . }}
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
- name: raw-certificates
|
||||
mountPath: /tmp/certs
|
||||
- name: mlflow-certificates
|
||||
mountPath: /bitnami/mlflow/certs
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Init container definition for waiting for the database to be ready
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.renderAuthConfInitContainer" -}}
|
||||
- name: get-default-auth-conf
|
||||
image: {{ include "mlflow.v0.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.tracking.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.tracking.containerSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
- |
|
||||
#!/bin/bash
|
||||
cp /bitnami/mlflow-basic-auth/basic_auth.ini /bitnami/rendered-basic-auth/basic_auth.ini
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
- name: rendered-basic-auth
|
||||
mountPath: /bitnami/rendered-basic-auth
|
||||
- name: render-auth-conf
|
||||
image: {{ include "mlflow.v0.waitContainer.image" . }}
|
||||
imagePullPolicy: {{ .Values.waitContainer.image.pullPolicy }}
|
||||
{{- if .Values.tracking.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.tracking.containerSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
- |
|
||||
#!/bin/bash
|
||||
# First render the overrides
|
||||
render-template /bitnami/basic-auth-overrides/*.ini > /tmp/rendered-overrides.ini
|
||||
# Loop through the ini overrides and apply it to the final basic_auth.ini
|
||||
# read the file line by line
|
||||
while IFS='=' read -r key value
|
||||
do
|
||||
# remove leading and trailing spaces from key and value
|
||||
key="$(echo $key | tr -d " ")"
|
||||
value="$(echo $value | tr -d " ")"
|
||||
|
||||
ini-file set -s mlflow -k "$key" -v "$value" /bitnami/rendered-basic-auth/basic_auth.ini
|
||||
done < "/tmp/rendered-overrides.ini"
|
||||
# Remove temporary files
|
||||
rm /tmp/rendered-overrides.ini
|
||||
env:
|
||||
{{- if (include "mlflow.v0.database.enabled" .) }}
|
||||
- name: MLFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.database.secretName" . }}
|
||||
key: {{ include "mlflow.v0.database.passwordKey" . | quote }}
|
||||
- name: MLFLOW_DATABASE_AUTH_URI
|
||||
value: {{ include "mlflow.v0.database-auth.uri" . | quote }}
|
||||
{{- end }}
|
||||
- name: MLFLOW_TRACKING_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.tracking.secretName" . }}
|
||||
key: {{ include "mlflow.v0.tracking.userKey" . | quote }}
|
||||
- name: MLFLOW_TRACKING_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.tracking.secretName" . }}
|
||||
key: {{ include "mlflow.v0.tracking.passwordKey" . | quote }}
|
||||
{{- if .Values.tracking.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.extraEnvVars "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.tracking.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.tracking.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.tracking.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
- name: basic-auth-overrides
|
||||
mountPath: /bitnami/basic-auth-overrides
|
||||
- name: rendered-basic-auth
|
||||
mountPath: /bitnami/rendered-basic-auth
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Init container definition for upgrading the database
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.upgradeDBInitContainer" -}}
|
||||
- name: upgrade-db
|
||||
image: {{ include "mlflow.v0.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.tracking.containerSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- mlflow
|
||||
args:
|
||||
- db
|
||||
- upgrade
|
||||
- {{ include "mlflow.v0.database.uri" . }}
|
||||
env:
|
||||
- name: MLFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.database.secretName" . }}
|
||||
key: {{ include "mlflow.v0.database.passwordKey" . | quote }}
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Init container definition for upgrading the database
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.upgradeDBAuthInitContainer" -}}
|
||||
- name: upgrade-db-auth
|
||||
image: {{ include "mlflow.v0.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.tracking.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.tracking.containerSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- python
|
||||
args:
|
||||
- -m
|
||||
- mlflow.server.auth
|
||||
- db
|
||||
- upgrade
|
||||
- --url
|
||||
- {{ include "mlflow.v0.database-auth.uri" . }}
|
||||
env:
|
||||
- name: MLFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.database.secretName" . }}
|
||||
key: {{ include "mlflow.v0.database.passwordKey" . | quote }}
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if a TLS credentials secret object should be created
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.createTlsSecret" -}}
|
||||
{{- if and .Values.tracking.tls.autoGenerated (not .Values.tracking.tls.certificatesSecret) }}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the CA cert file.
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.tlsSecretName" -}}
|
||||
{{- if .Values.tracking.tls.autoGenerated }}
|
||||
{{- printf "%s-crt" (include "mlflow.v0.tracking.fullname" .) -}}
|
||||
{{- else -}}
|
||||
{{ required "A secret containing TLS certificates is required when TLS is enabled" .Values.tracking.tls.certificatesSecret }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the cert file.
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.tlsCert" -}}
|
||||
{{- if .Values.tracking.tls.autoGenerated }}
|
||||
{{- printf "/bitnami/mlflow/certs/tls.crt" -}}
|
||||
{{- else -}}
|
||||
{{- required "Certificate filename is required when TLS in enabled" .Values.tracking.tls.certFilename | printf "/bitnami/mlflow/certs/%s" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the cert key file.
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.tlsCertKey" -}}
|
||||
{{- if .Values.tracking.tls.autoGenerated }}
|
||||
{{- printf "/bitnami/mlflow/certs/tls.key" -}}
|
||||
{{- else -}}
|
||||
{{- required "Certificate Key filename is required when TLS in enabled" .Values.tracking.tls.certKeyFilename | printf "/bitnami/mlflow/certs/%s" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the CA cert file.
|
||||
*/}}
|
||||
{{- define "mlflow.v0.tracking.tlsCACert" -}}
|
||||
{{- if .Values.tracking.tls.autoGenerated }}
|
||||
{{- printf "/bitnami/mlflow/certs/ca.crt" -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.tracking.tls.certCAFilename -}}
|
||||
{{- printf "/bitnami/mlflow/certs/%s" .Values.tracking.tls.certCAFilename -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Fullname of the run service
|
||||
*/}}
|
||||
{{- define "mlflow.v0.run.fullname" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) "run" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use (run deployment)
|
||||
*/}}
|
||||
{{- define "mlflow.v0.run.serviceAccountName" -}}
|
||||
{{- if .Values.run.serviceAccount.create -}}
|
||||
{{ default (include "mlflow.v0.run.fullname" .) .Values.run.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.run.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if the source configmap should be created
|
||||
*/}}
|
||||
{{- define "mlflow.v0.run.source.createConfigMap" -}}
|
||||
{{- if and (eq .Values.run.source.type "configmap") .Values.run.source.configMap (not .Values.run.source.existingConfigMap) -}}
|
||||
{{- true -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the source configmap.
|
||||
*/}}
|
||||
{{- define "mlflow.v0.run.source.configMapName" -}}
|
||||
{{- if .Values.run.source.existingConfigMap -}}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.source.existingConfigMap "context" $) -}}
|
||||
{{- else }}
|
||||
{{- printf "%s-source" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL fullname
|
||||
*/}}
|
||||
{{- define "mlflow.v0.postgresql.fullname" -}}
|
||||
{{- include "common.names.dependency.fullname" (dict "chartName" "postgresql" "chartValues" .Values.postgresql "context" $) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the PostgreSQL Hostname
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database.enabled" -}}
|
||||
{{- if or .Values.postgresql.enabled .Values.externalDatabase.host -}}
|
||||
{{- true }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the PostgreSQL Hostname
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database.host" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- if eq .Values.postgresql.architecture "replication" -}}
|
||||
{{- printf "%s-%s" (include "mlflow.v0.postgresql.fullname" .) "primary" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- print (include "mlflow.v0.postgresql.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalDatabase.host -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the PostgreSQL Port
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database.port" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- printf "%d" (.Values.postgresql.primary.service.ports.postgresql | int) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%d" (.Values.externalDatabase.port | int) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the PostgreSQL User
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database.user" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- print .Values.postgresql.auth.username -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalDatabase.user -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL database name
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database.name" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- print .Values.postgresql.auth.database -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalDatabase.database -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return PostgreSQL auth database name
|
||||
NOTE: This macro is run in both the parent chart and the PostgreSQL
|
||||
subchart (as it is used in the init scripts), so we need to control the
|
||||
scope
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database-auth.name" -}}
|
||||
{{- if .Values.postgresql -}}
|
||||
{{/* Inside parent chart */}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- printf "%s_auth" .Values.postgresql.auth.database -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalDatabase.authDatabase -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{/* Inside postgresql sub-chart, therefore postgresql.enabled=true */}}
|
||||
{{- printf "%s_auth" .Values.auth.database -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the PostgreSQL Secret Name
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database.secretName" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- if .Values.postgresql.auth.existingSecret -}}
|
||||
{{- print .Values.postgresql.auth.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- print (include "mlflow.v0.postgresql.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- else if .Values.externalDatabase.existingSecret -}}
|
||||
{{- print .Values.externalDatabase.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) "externaldb" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve key of the PostgreSQL secret
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database.passwordKey" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- print "password" -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalDatabase.existingSecretPasswordKey -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve the URI of the database
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database.uri" -}}
|
||||
{{- printf "postgresql://%s:$(MLFLOW_DATABASE_PASSWORD)@%s:%v/%s" (include "mlflow.v0.database.user" .) (include "mlflow.v0.database.host" .) (include "mlflow.v0.database.port" .) (include "mlflow.v0.database.name" .) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve the URI of the auth database
|
||||
*/}}
|
||||
{{- define "mlflow.v0.database-auth.uri" -}}
|
||||
{{- printf "postgresql://%s:$(MLFLOW_DATABASE_PASSWORD)@%s:%v/%s" (include "mlflow.v0.database.user" .) (include "mlflow.v0.database.host" .) (include "mlflow.v0.database.port" .) (include "mlflow.v0.database-auth.name" .) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the volume-permissions init container
|
||||
*/}}
|
||||
{{- define "mlflow.v0.volumePermissionsInitContainer" -}}
|
||||
- name: volume-permissions
|
||||
image: {{ include "mlflow.v0.volumePermissions.image" }}
|
||||
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
args:
|
||||
- -ec
|
||||
- |
|
||||
#!/bin/bash
|
||||
mkdir -p {{ .Values.persistence.mountPath }}
|
||||
chown {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} {{ .Values.persistence.mountPath }}
|
||||
find {{ .Values.persistence.mountPath }} -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }}
|
||||
{{- if .Values.volumePermissions.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.volumePermissions.resources }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: {{ .Values.persistence.mountPath }}
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return MinIO(TM) fullname
|
||||
*/}}
|
||||
{{- define "mlflow.v0.minio.fullname" -}}
|
||||
{{- include "common.names.dependency.fullname" (dict "chartName" "minio" "chartValues" .Values.minio "context" $) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the PostgreSQL Hostname
|
||||
*/}}
|
||||
{{- define "mlflow.v0.s3.enabled" -}}
|
||||
{{- if or .Values.minio.enabled .Values.externalS3.host -}}
|
||||
{{- true }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the S3 backend host
|
||||
*/}}
|
||||
{{- define "mlflow.v0.s3.host" -}}
|
||||
{{- if .Values.minio.enabled -}}
|
||||
{{- include "mlflow.v0.minio.fullname" . -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalS3.host -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the S3 port
|
||||
*/}}
|
||||
{{- define "mlflow.v0.s3.port" -}}
|
||||
{{- ternary .Values.minio.service.ports.api .Values.externalS3.port .Values.minio.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the S3 bucket
|
||||
*/}}
|
||||
{{- define "mlflow.v0.s3.bucket" -}}
|
||||
{{- if .Values.minio.enabled -}}
|
||||
{{- print .Values.minio.defaultBuckets -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalS3.bucket -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the S3 protocol
|
||||
*/}}
|
||||
{{- define "mlflow.v0.s3.protocol" -}}
|
||||
{{- if .Values.minio.enabled -}}
|
||||
{{- ternary "https" "http" .Values.minio.tls.enabled -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalS3.protocol -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the S3 credentials secret name
|
||||
*/}}
|
||||
{{- define "mlflow.v0.s3.secretName" -}}
|
||||
{{- if .Values.minio.enabled -}}
|
||||
{{- if .Values.minio.auth.existingSecret -}}
|
||||
{{- print .Values.minio.auth.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- print (include "mlflow.v0.minio.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- else if .Values.externalS3.existingSecret -}}
|
||||
{{- print .Values.externalS3.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) "externals3" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the S3 access key id inside the secret
|
||||
*/}}
|
||||
{{- define "mlflow.v0.s3.accessKeyIDKey" -}}
|
||||
{{- if .Values.minio.enabled -}}
|
||||
{{- print "root-user" -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalS3.existingSecretAccessKeyIDKey -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the S3 secret access key inside the secret
|
||||
*/}}
|
||||
{{- define "mlflow.v0.s3.secretAccessKeyKey" -}}
|
||||
{{- if .Values.minio.enabled -}}
|
||||
{{- print "root-password" -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalS3.existingSecretKeySecretKey -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Return the proper git image name
|
||||
*/}}
|
||||
{{- define "mlflow.v0.git.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.gitImage "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the definition of the git clone init container
|
||||
*/}}
|
||||
{{- define "mlflow.v0.git.cloneInitContainer" -}}
|
||||
- name: git-clone-repository
|
||||
image: {{ include "mlflow.v0.git.image" . }}
|
||||
imagePullPolicy: {{ .Values.gitImage.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
args:
|
||||
- -ec
|
||||
- |
|
||||
#!/bin/bash
|
||||
rm -rf /app/*
|
||||
[[ -f "/opt/bitnami/scripts/git/entrypoint.sh" ]] && source "/opt/bitnami/scripts/git/entrypoint.sh"
|
||||
git clone {{ .Values.run.source.git.repository }} {{ if .Values.run.source.git.revision }}--branch {{ .Values.run.source.git.revision }}{{ end }} /app
|
||||
{{- if .Values.run.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.run.containerSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: source
|
||||
mountPath: /app
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
# It creates at startup ssh in case it performs ssh-based git clone
|
||||
- name: tmp
|
||||
mountPath: /etc/ssh
|
||||
{{- if .Values.run.source.git.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.source.git.extraVolumeMounts "context" .) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Init container definition for waiting for the database to be ready
|
||||
*/}}
|
||||
{{- define "mlflow.v0.waitForServiceInitContainer" -}}
|
||||
- name: {{ printf "wait-for-%s" .target }}
|
||||
image: {{ include "mlflow.v0.waitContainer.image" .context }}
|
||||
imagePullPolicy: {{ .context.Values.waitContainer.image.pullPolicy }}
|
||||
{{- if .context.Values.waitContainer.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .context.Values.waitContainer.containerSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
- |
|
||||
#!/bin/bash
|
||||
retry_while() {
|
||||
local -r cmd="${1:?cmd is missing}"
|
||||
local -r retries="${2:-12}"
|
||||
local -r sleep_time="${3:-5}"
|
||||
local return_value=1
|
||||
|
||||
read -r -a command <<< "$cmd"
|
||||
for ((i = 1 ; i <= retries ; i+=1 )); do
|
||||
"${command[@]}" && return_value=0 && break
|
||||
sleep "$sleep_time"
|
||||
done
|
||||
return $return_value
|
||||
}
|
||||
|
||||
check_host() {
|
||||
local -r host="${1:-?missing host}"
|
||||
local -r port="${2:-?missing port}"
|
||||
if wait-for-port --timeout=5 --host=${host} --state=inuse $port ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Checking connection to {{ .host }}:{{ .port }}"
|
||||
if ! retry_while "check_host {{ .host }} {{ .port }}"; then
|
||||
echo "Connection error"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Connection success"
|
||||
exit 0
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Compile all warnings into a single message.
|
||||
*/}}
|
||||
{{- define "mlflow.v0.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "mlflow.v0.validateValues.job" .) -}}
|
||||
{{- $messages := append $messages (include "mlflow.v0.validateValues.auth" .) -}}
|
||||
{{- $messages := append $messages (include "mlflow.v0.validateValues.deploy" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
{{- if $message -}}
|
||||
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Check that a command has been defined when using a job */}}
|
||||
{{- define "mlflow.v0.validateValues.job" -}}
|
||||
{{- if and .Values.run.useJob (not .Values.run.source.launchCommand) (not .Values.run.args) }}
|
||||
mlflow: no-job-command
|
||||
|
||||
You defined MLflow to be launched as a job but specified no command. Use the run.source.launchCommand value
|
||||
to specify a command.
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Check that the database is deployed when enabling authorization */}}
|
||||
{{- define "mlflow.v0.validateValues.auth" -}}
|
||||
{{- if and .Values.tracking.auth.enabled (not (include "mlflow.v0.database.enabled" .)) -}}
|
||||
mlflow: auth-requires-db
|
||||
|
||||
You enabled basic authentication but did not configure a database. Please set postgresql.enabled=true or configure the externalDatabase section.
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Check that one of the deployments is enabled */}}
|
||||
{{- define "mlflow.v0.validateValues.deploy" -}}
|
||||
{{- if and (not .Values.tracking.enabled) (not .Values.run.enabled) -}}
|
||||
mlflow: no-deploy
|
||||
|
||||
You did not deploy either a MLflow job or the tracking server. Please set one of the two: tracking.enabled=true or run.enabled=true
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
9
bitnami/mlflow/templates/extra-list.yaml
Normal file
9
bitnami/mlflow/templates/extra-list.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
|
||||
{{- end }}
|
||||
255
bitnami/mlflow/templates/run/dep-job.yaml
Normal file
255
bitnami/mlflow/templates/run/dep-job.yaml
Normal file
@@ -0,0 +1,255 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.run.enabled }}
|
||||
apiVersion: {{ ternary "batch/v1" "apps/v1" .Values.run.useJob }}
|
||||
kind: {{ ternary "Job" "Deployment" .Values.run.useJob }}
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.run.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.run.labels .Values.commonLabels ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: run
|
||||
{{- if or .Values.run.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.run.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.run.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
{{- if not .Values.run.useJob }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: run
|
||||
{{- end }}
|
||||
{{- if .Values.run.useJob }}
|
||||
backoffLimit: {{ .Values.run.backoffLimit }}
|
||||
{{- else }}
|
||||
{{- if .Values.run.updateStrategy }}
|
||||
strategy: {{- toYaml .Values.run.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/source: {{ include (print $.Template.BasePath "/run/source-configmap.yaml") . | sha256sum }}
|
||||
{{- if or .Values.run.podAnnotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.run.podAnnotations .Values.commonAnnotations ) "context" . ) }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: run
|
||||
spec:
|
||||
{{- include "mlflow.v0.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccountName: {{ template "mlflow.v0.run.serviceAccountName" . }}
|
||||
{{- if .Values.run.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.run.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.useJob }}
|
||||
restartPolicy: {{ .Values.run.restartPolicy }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.run.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.run.podAffinityPreset "component" "run" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.run.podAntiAffinityPreset "component" "run" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.run.nodeAffinityPreset.type "key" .Values.run.nodeAffinityPreset.key "values" .Values.run.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.run.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.runtimeClassName }}
|
||||
runtimeClassName: {{ .Values.run.runtimeClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.run.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.run.tolerations "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.priorityClassName }}
|
||||
priorityClassName: {{ .Values.run.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.schedulerName }}
|
||||
schedulerName: {{ .Values.run.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.run.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.run.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
{{- if .Values.run.enableDefaultInitContainers }}
|
||||
{{- if eq .Values.run.source.type "git" }}
|
||||
# Clone git repository
|
||||
{{- include "mlflow.v0.git.cloneInitContainer" (dict "component" "run" "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.run.persistence.enabled }}
|
||||
# Adjust volume permissions
|
||||
{{- include "mlflow.v0.volumePermissionsInitContainer" (dict "component" "run" "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.tracking.auth.enabled }}
|
||||
# Wait for tracking service
|
||||
{{- include "mlflow.v0.waitForServiceInitContainer" (dict "target" "tracking" "host" (include "mlflow.v0.tracking.fullname" .) "port" (include "mlflow.v0.tracking.port" .) "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "values" .Values.run.initContainers "context" $) | nindent 8}}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: mlflow
|
||||
image: {{ include "mlflow.v0.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.run.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.run.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.run.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.run.command "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
command:
|
||||
- bash
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.run.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.run.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- -ec
|
||||
- |
|
||||
#!/bin/bash
|
||||
{{- if .Values.run.source.launchCommand }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.source.launchCommand "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.run.useJob }}
|
||||
sleep infinity
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
|
||||
{{- if .Values.tracking.enabled }}
|
||||
- name: MLFLOW_TRACKING_URI
|
||||
value: {{ include "mlflow.v0.tracking.uri" . | quote }}
|
||||
{{- if and .Values.tracking.tls.enabled .Values.tracking.tls.autoGenerated }}
|
||||
- name: MLFLOW_TRACKING_INSECURE_TLS
|
||||
value: "true"
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
- name: MLFLOW_TRACKING_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.tracking.secretName" . }}
|
||||
key: {{ include "mlflow.v0.tracking.userKey" . | quote }}
|
||||
- name: MLFLOW_TRACKING_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.tracking.secretName" . }}
|
||||
key: {{ include "mlflow.v0.tracking.passwordKey" . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.run.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.run.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.run.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.resources }}
|
||||
resources: {{- toYaml .Values.run.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.run.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.run.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.run.livenessProbe.enabled }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.run.livenessProbe "enabled") "context" $) | nindent 12 }}
|
||||
exec:
|
||||
command:
|
||||
- python
|
||||
- -c
|
||||
- import mlflow; mlflow.__version__
|
||||
{{- end }}
|
||||
{{- if .Values.run.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.run.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.run.readinessProbe.enabled }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.run.readinessProbe "enabled") "context" $) | nindent 12 }}
|
||||
exec:
|
||||
command:
|
||||
- python
|
||||
- -c
|
||||
- import mlflow; mlflow.__version__
|
||||
{{- end }}
|
||||
{{- if .Values.run.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.run.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.run.startupProbe.enabled }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.run.startupProbe "enabled") "context" $) | nindent 12 }}
|
||||
exec:
|
||||
command:
|
||||
- python
|
||||
- -c
|
||||
- import mlflow; mlflow.__version__
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.run.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: source
|
||||
mountPath: /app
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
- name: mlruns
|
||||
mountPath: /app/mlruns
|
||||
- name: mlartifacts
|
||||
mountPath: /app/mlartifacts
|
||||
{{- if .Values.run.persistence.enabled }}
|
||||
- name: data
|
||||
mountPath: {{ .Values.run.persistence.mountPath }}
|
||||
{{- if .Values.run.persistence.subPath }}
|
||||
subPath: {{ .Values.run.persistence.subPath }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.run.sidecars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
- name: mlruns
|
||||
emptyDir: {}
|
||||
- name: mlartifacts
|
||||
emptyDir: {}
|
||||
- name: source
|
||||
{{- if or (.Values.run.source.existingConfigMap) (include "mlflow.v0.run.source.createConfigMap" .) }}
|
||||
configMap:
|
||||
name: {{ include "mlflow.v0.run.source.configMapName" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: data
|
||||
{{- if .Values.run.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.run.persistence.existingClaim | default (include "mlflow.v0.run.fullname" .) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.run.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
39
bitnami/mlflow/templates/run/pvc.yaml
Normal file
39
bitnami/mlflow/templates/run/pvc.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.run.enabled .Values.run.persistence.enabled (not .Values.run.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.run.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.run.persistence.labels .Values.commonLabels ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: run
|
||||
{{- if or .Values.run.persistence.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.run.persistence.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- if not (empty .Values.run.persistence.accessModes) }}
|
||||
{{- range .Values.run.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- {{ .Values.run.persistence.accessMode | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.run.persistence.size | quote }}
|
||||
{{- if .Values.run.persistence.selector }}
|
||||
selector: {{- include "common.tplvalues.render" (dict "value" .Values.run.persistence.selector "context" $) | nindent 4 }}
|
||||
{{- end -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.run.persistence "global" .Values.global) | nindent 2 }}
|
||||
{{- if .Values.run.persistence.dataSource }}
|
||||
dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.run.persistence.dataSource "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
20
bitnami/mlflow/templates/run/service-account.yaml
Normal file
20
bitnami/mlflow/templates/run/service-account.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.run.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.run.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: run
|
||||
{{- if or .Values.run.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.run.serviceAccount.annotations .Values.commonAnnotations "context" .) | fromYaml }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.run.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
18
bitnami/mlflow/templates/run/source-configmap.yaml
Normal file
18
bitnami/mlflow/templates/run/source-configmap.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if (include "mlflow.v0.run.source.createConfigMap" .) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.run.source.configMapName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.run.source.configMap "context" $) | nindent 2 }}
|
||||
{{- end }}
|
||||
22
bitnami/mlflow/templates/tracking/auth-secret.yaml
Normal file
22
bitnami/mlflow/templates/tracking/auth-secret.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.enabled .Values.tracking.auth.enabled (not .Values.tracking.auth.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
# We need to ad the username as it is required by the ServiceMonitor object
|
||||
admin-user: {{ include "common.secrets.passwords.manage" (dict "secret" (include "mlflow.v0.tracking.fullname" .) "key" "admin-user" "providedValues" (list "tracking.auth.username") "context" $) }}
|
||||
admin-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "mlflow.v0.tracking.fullname" .) "key" "admin-password" "providedValues" (list "tracking.auth.password") "context" $) }}
|
||||
{{- end }}
|
||||
25
bitnami/mlflow/templates/tracking/configmap-overrides.yaml
Normal file
25
bitnami/mlflow/templates/tracking/configmap-overrides.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.enabled .Values.tracking.auth.enabled (not .Values.tracking.auth.overridesConfigMap) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ printf "%s-auth-overrides" (include "mlflow.v0.tracking.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
# Use render-template to substitute with environment variables
|
||||
basic_auth_overrides.ini: |
|
||||
database_uri = {{ print "{{ MLFLOW_DATABASE_AUTH_URI }}" }}
|
||||
admin_username = {{ print "{{ MLFLOW_TRACKING_USERNAME }}" }}
|
||||
admin_password = {{ print "{{ MLFLOW_TRACKING_PASSWORD }}" }}
|
||||
{{- range $key, $value := .Values.tracking.auth.extraOverrides }}
|
||||
{{ $key }} = {{ include "common.tplvalues.render" (dict "value" $value "context" $) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
304
bitnami/mlflow/templates/tracking/deployment.yaml
Normal file
304
bitnami/mlflow/templates/tracking/deployment.yaml
Normal file
@@ -0,0 +1,304 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.tracking.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if not .Values.tracking.autoscaling.hpa.enabled }}
|
||||
replicas: {{ .Values.tracking.replicaCount }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.updateStrategy }}
|
||||
strategy: {{- toYaml .Values.tracking.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" (dict "values" .Values.tracking.podLabels .Values.commonLabels "context" .) | fromYaml }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
template:
|
||||
metadata:
|
||||
{{- if or .Values.tracking.podAnnotations .Values.tracking.auth.enabled }}
|
||||
annotations:
|
||||
{{- if .Values.tracking.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
checksum/auth: {{ include (print $.Template.BasePath "/tracking/configmap-overrides.yaml") . | sha256sum }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
spec:
|
||||
serviceAccountName: {{ include "mlflow.v0.tracking.serviceAccountName" . }}
|
||||
{{- include "mlflow.v0.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.tracking.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.tracking.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.tracking.podAffinityPreset "component" "mlflow" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.tracking.podAntiAffinityPreset "component" "mlflow" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.tracking.nodeAffinityPreset.type "key" .Values.tracking.nodeAffinityPreset.key "values" .Values.tracking.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.tracking.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.tolerations "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.priorityClassName }}
|
||||
priorityClassName: {{ .Values.tracking.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.schedulerName }}
|
||||
schedulerName: {{ .Values.tracking.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.tracking.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.tracking.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
{{- if .Values.tracking.enableDefaultInitContainers }}
|
||||
{{- if .Values.tracking.tls.enabled }}
|
||||
{{- include "mlflow.v0.tracking.copyCertsInitContainer" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and (include "mlflow.v0.database.enabled" .) }}
|
||||
# Init container for PostgreSQL
|
||||
{{- include "mlflow.v0.waitForServiceInitContainer" (dict "target" "database" "host" (include "mlflow.v0.database.host" .) "port" (include "mlflow.v0.database.port" .) "context" $) | nindent 8 }}
|
||||
{{- if .Values.tracking.runUpgradeDB }}
|
||||
# Perform upgrade of the Database
|
||||
{{- include "mlflow.v0.tracking.upgradeDBInitContainer" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
# Render basic auth configuration
|
||||
{{- include "mlflow.v0.tracking.renderAuthConfInitContainer" . | nindent 8 }}
|
||||
# Perform upgrade of the Auth Database
|
||||
{{- include "mlflow.v0.tracking.upgradeDBAuthInitContainer" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if (include "mlflow.v0.s3.enabled" .) }}
|
||||
# Wait for S3 backend to be ready
|
||||
{{- include "mlflow.v0.waitForServiceInitContainer" (dict "target" "s3" "host" (include "mlflow.v0.s3.host" .) "port" (include "mlflow.v0.s3.port" .) "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.tracking.persistence.enabled }}
|
||||
# Adjust volume permissions
|
||||
{{- include "mlflow.v0.volumePermissionsInitContainer" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: mlflow
|
||||
image: {{ include "mlflow.v0.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.tracking.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.tracking.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.tracking.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.command "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
command:
|
||||
- mlflow
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.tracking.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- server
|
||||
{{- if .Values.tracking.tls.enabled }}
|
||||
- --gunicorn-opts
|
||||
- --certfile {{ include "mlflow.v0.tracking.tlsCert" . }} --keyfile {{ include "mlflow.v0.tracking.tlsCertKey" . }} {{- if (include "mlflow.v0.tracking.tlsCACert" .)}} --ca-certs {{ include "mlflow.v0.tracking.tlsCACert" . }}{{- end }}
|
||||
{{- end }}
|
||||
{{- if (include "mlflow.v0.database.enabled" .) }}
|
||||
- --backend-store-uri={{ include "mlflow.v0.database.uri" . }}
|
||||
{{- else }}
|
||||
- --backend-store-uri={{ .Values.tracking.persistence.mountPath }}/mlruns
|
||||
{{- end }}
|
||||
{{- if (include "mlflow.v0.s3.enabled" .) }}
|
||||
- --artifacts-destination=s3://{{ include "mlflow.v0.s3.bucket" . }}
|
||||
{{- else }}
|
||||
- --artifacts-destination={{ .Values.tracking.persistence.mountPath }}/mlartifacts
|
||||
{{- end }}
|
||||
- --serve-artifacts
|
||||
- --host=0.0.0.0
|
||||
- --port={{ .Values.tracking.containerPorts.http }}
|
||||
{{- if .Values.tracking.metrics.enabled }}
|
||||
- --expose-prometheus={{ .Values.tracking.persistence.mountPath }}/metrics
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
- --app-name=basic-auth
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.extraArgs }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.extraArgs "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
|
||||
{{- if (include "mlflow.v0.database.enabled" .) }}
|
||||
- name: MLFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.database.secretName" . }}
|
||||
key: {{ include "mlflow.v0.database.passwordKey" . | quote }}
|
||||
{{- end }}
|
||||
{{- if (include "mlflow.v0.s3.enabled" .) }}
|
||||
- name: AWS_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.s3.secretName" . }}
|
||||
key: {{ include "mlflow.v0.s3.accessKeyIDKey" . | quote }}
|
||||
- name: AWS_SECRET_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "mlflow.v0.s3.secretName" . }}
|
||||
key: {{ include "mlflow.v0.s3.secretAccessKeyKey" . | quote }}
|
||||
- name: MLFLOW_S3_ENDPOINT_URL
|
||||
value: {{ printf "%s://%s:%v" (include "mlflow.v0.s3.protocol" .) (include "mlflow.v0.s3.host" .) (include "mlflow.v0.s3.port" .) | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.tracking.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.tracking.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.tracking.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.resources }}
|
||||
resources: {{- toYaml .Values.tracking.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: {{ include "mlflow.v0.tracking.protocol" . }}
|
||||
containerPort: {{ .Values.tracking.containerPorts.http }}
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.tracking.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.tracking.livenessProbe.enabled }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.tracking.livenessProbe "enabled") "context" $) | nindent 12 }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
tcpSocket:
|
||||
port: {{ include "mlflow.v0.tracking.protocol" . }}
|
||||
{{- else }}
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ include "mlflow.v0.tracking.protocol" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.tracking.readinessProbe.enabled }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.tracking.readinessProbe "enabled") "context" $) | nindent 12 }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
tcpSocket:
|
||||
port: {{ include "mlflow.v0.tracking.protocol" . }}
|
||||
{{- else }}
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ include "mlflow.v0.tracking.protocol" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.tracking.startupProbe.enabled }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.tracking.startupProbe "enabled") "context" $) | nindent 12 }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
tcpSocket:
|
||||
port: {{ include "mlflow.v0.tracking.protocol" . }}
|
||||
{{- else }}
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ include "mlflow.v0.tracking.protocol" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
- name: mlruns
|
||||
mountPath: /app/mlruns
|
||||
- name: mlartifacts
|
||||
mountPath: /app/mlartifacts
|
||||
{{- if .Values.tracking.tls.enabled }}
|
||||
- name: mlflow-certificates
|
||||
mountPath: /bitnami/mlflow/certs
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
- name: rendered-basic-auth
|
||||
mountPath: /bitnami/mlflow-basic-auth/basic_auth.ini
|
||||
subPath: basic_auth.ini
|
||||
{{- end }}
|
||||
- name: data
|
||||
mountPath: {{ .Values.tracking.persistence.mountPath }}
|
||||
{{- if .Values.tracking.persistence.subPath }}
|
||||
subPath: {{ .Values.tracking.persistence.subPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.tracking.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
- name: mlruns
|
||||
emptyDir: {}
|
||||
- name: mlartifacts
|
||||
emptyDir: {}
|
||||
{{- if .Values.tracking.tls.enabled }}
|
||||
- name: raw-certificates
|
||||
secret:
|
||||
secretName: {{ include "mlflow.v0.tracking.tlsSecretName" . }}
|
||||
- name: mlflow-certificates
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
- name: basic-auth-overrides
|
||||
configMap:
|
||||
name: {{ include "mlflow.v0.tracking.auth.overridesConfigMapName" . }}
|
||||
- name: rendered-basic-auth
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: data
|
||||
{{- if .Values.tracking.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.tracking.persistence.existingClaim | default (include "mlflow.v0.tracking.fullname" .) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
21
bitnami/mlflow/templates/tracking/externaldb-secret.yaml
Normal file
21
bitnami/mlflow/templates/tracking/externaldb-secret.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.enabled (not .Values.postgresql.enabled) (not .Values.externalDatabase.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-externaldb" (include "mlflow.v0.tracking.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
db-password: {{ .Values.externalDatabase.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
22
bitnami/mlflow/templates/tracking/externals3-secret.yaml
Normal file
22
bitnami/mlflow/templates/tracking/externals3-secret.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.enabled (not .Values.minio.enabled) (not .Values.externalS3.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-externals3" (include "mlflow.v0.tracking.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{ .Values.externalS3.existingSecretAccessKeyIDKey }}: {{ .Values.externalS3.accessKeyID | b64enc | quote }}
|
||||
{{ .Values.externalS3.existingSecretKeySecretKey }}: {{ .Values.externalS3.accessKeySecret | b64enc | quote }}
|
||||
{{- end }}
|
||||
50
bitnami/mlflow/templates/tracking/hpa.yaml
Normal file
50
bitnami/mlflow/templates/tracking/hpa.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.enabled .Values.tracking.autoscaling.hpa.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.hpa.apiVersion" . }}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
name: {{ include "mlflow.v0.tracking.fullname" . }}
|
||||
minReplicas: {{ .Values.tracking.autoscaling.hpa.minReplicas }}
|
||||
maxReplicas: {{ .Values.tracking.autoscaling.hpa.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.tracking.autoscaling.hpa.targetMemory }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
|
||||
targetAverageUtilization: {{ .Values.tracking.autoscaling.hpa.targetMemory }}
|
||||
{{- else }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.tracking.autoscaling.hpa.targetMemory }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.autoscaling.hpa.targetCPU }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
|
||||
targetAverageUtilization: {{ .Values.tracking.autoscaling.hpa.targetCPU }}
|
||||
{{- else }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.tracking.autoscaling.hpa.targetCPU }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
48
bitnami/mlflow/templates/tracking/ingress-tls-secrets.yaml
Normal file
48
bitnami/mlflow/templates/tracking/ingress-tls-secrets.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.tracking.ingress.enabled }}
|
||||
{{- if .Values.tracking.ingress.secrets }}
|
||||
{{- range .Values.tracking.ingress.secrets }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
namespace: {{ include "common.names.namespace" $ | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if $.Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ .certificate | b64enc }}
|
||||
tls.key: {{ .key | b64enc }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.tracking.ingress.tls .Values.tracking.ingress.selfSigned }}
|
||||
{{- $secretName := printf "%s-tls" .Values.tracking.ingress.hostname }}
|
||||
{{- $ca := genCA "mlflow-ca" 365 }}
|
||||
{{- $cert := genSignedCert .Values.tracking.ingress.hostname nil (list .Values.tracking.ingress.hostname) 365 $ca }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $secretName }}
|
||||
namespace: {{ include "common.names.namespace" $ | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
|
||||
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
|
||||
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
61
bitnami/mlflow/templates/tracking/ingress.yaml
Normal file
61
bitnami/mlflow/templates/tracking/ingress.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.enabled .Values.tracking.ingress.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if or .Values.tracking.ingress.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.tracking.ingress.annotations .Values.commonAnnotations "context" .) | fromYaml }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.tracking.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
|
||||
ingressClassName: {{ .Values.tracking.ingress.ingressClassName | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.tracking.ingress.hostname }}
|
||||
- host: {{ .Values.tracking.ingress.hostname }}
|
||||
http:
|
||||
paths:
|
||||
{{- if .Values.tracking.ingress.extraPaths }}
|
||||
{{- toYaml .Values.tracking.ingress.extraPaths | nindent 10 }}
|
||||
{{- end }}
|
||||
- path: {{ .Values.tracking.ingress.path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
||||
pathType: {{ .Values.tracking.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "mlflow.v0.tracking.fullname" .) "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- range .Values.tracking.ingress.extraHosts }}
|
||||
- host: {{ .name | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "mlflow.v0.tracking.fullname" $) "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.ingress.extraRules }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.ingress.extraRules "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (and .Values.tracking.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.tracking.ingress.annotations )) .Values.tracking.ingress.selfSigned)) .Values.tracking.ingress.extraTls }}
|
||||
tls:
|
||||
{{- if and .Values.tracking.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.tracking.ingress.annotations )) .Values.tracking.ingress.selfSigned) }}
|
||||
- hosts:
|
||||
- {{ .Values.tracking.ingress.hostname | quote }}
|
||||
secretName: {{ printf "%s-tls" .Values.tracking.ingress.hostname }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.ingress.extraTls }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.ingress.extraTls "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
75
bitnami/mlflow/templates/tracking/networkpolicy.yaml
Normal file
75
bitnami/mlflow/templates/tracking/networkpolicy.yaml
Normal file
@@ -0,0 +1,75 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.enabled .Values.tracking.networkPolicy.enabled }}
|
||||
kind: NetworkPolicy
|
||||
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ template "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.tracking.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
podSelector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
egress:
|
||||
# Allow dns resolution
|
||||
- ports:
|
||||
- port: 53
|
||||
protocol: UDP
|
||||
- port: 53
|
||||
protocol: TCP
|
||||
# Allow outbound connections to other pods
|
||||
- ports:
|
||||
- port: {{ .Values.tracking.containerPorts.http }}
|
||||
- port: {{ include "mlflow.v0.tracking.port" . }}
|
||||
- port: {{ include "mlflow.v0.database.port" . }}
|
||||
- port: {{ include "mlflow.v0.s3.port" . }}
|
||||
to:
|
||||
- podSelector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.tracking.networkPolicy.extraEgress }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.networkPolicy.extraEgress "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
ingress:
|
||||
- ports:
|
||||
- port: {{ .Values.tracking.containerPorts.http }}
|
||||
- port: {{ include "mlflow.v0.tracking.port" . }}
|
||||
from:
|
||||
{{- if not .Values.tracking.networkPolicy.allowExternal }}
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
{{ template "common.names.fullname" . }}-client: "true"
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.networkPolicy.ingressNSMatchLabels }}
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
{{- range $key, $value := .Values.tracking.networkPolicy.ingressNSMatchLabels }}
|
||||
{{ $key | quote }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.networkPolicy.ingressNSPodMatchLabels }}
|
||||
podSelector:
|
||||
matchLabels:
|
||||
{{- range $key, $value := .Values.tracking.networkPolicy.ingressNSPodMatchLabels }}
|
||||
{{ $key | quote }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.networkPolicy.extraIngress }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.networkPolicy.extraIngress "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
31
bitnami/mlflow/templates/tracking/pdb.yaml
Normal file
31
bitnami/mlflow/templates/tracking/pdb.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- $replicaCount := int .Values.tracking.replicaCount }}
|
||||
{{- if and .Values.tracking.enabled .Values.tracking.pdb.create (or (gt $replicaCount 1) .Values.tracking.autoscaling.hpa.enabled) }}
|
||||
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.tracking.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.tracking.pdb.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.tracking.pdb.maxUnavailable }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" (dict "values" .Values.tracking.podLabels .Values.commonLabels "context" .) | fromYaml }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- end }}
|
||||
39
bitnami/mlflow/templates/tracking/pvc.yaml
Normal file
39
bitnami/mlflow/templates/tracking/pvc.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.enabled .Values.tracking.persistence.enabled (not .Values.tracking.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.tracking.persistence.labels .Values.commonLabels ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if or .Values.tracking.persistence.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.tracking.persistence.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- if not (empty .Values.tracking.persistence.accessModes) }}
|
||||
{{- range .Values.tracking.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- {{ .Values.tracking.persistence.accessMode | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.tracking.persistence.size | quote }}
|
||||
{{- if .Values.tracking.persistence.selector }}
|
||||
selector: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.persistence.selector "context" $) | nindent 4 }}
|
||||
{{- end -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.tracking.persistence "global" .Values.global) | nindent 2 }}
|
||||
{{- if .Values.tracking.persistence.dataSource }}
|
||||
dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.persistence.dataSource "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
20
bitnami/mlflow/templates/tracking/service-account.yaml
Normal file
20
bitnami/mlflow/templates/tracking/service-account.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.tracking.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.tracking.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if or .Values.tracking.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.tracking.serviceAccount.annotations .Values.commonAnnotations "context" .) | fromYaml }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.tracking.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
71
bitnami/mlflow/templates/tracking/service.yaml
Normal file
71
bitnami/mlflow/templates/tracking/service.yaml
Normal file
@@ -0,0 +1,71 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.tracking.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.tracking.service.labels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.tracking.service.labels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.tracking.service.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" (dict "values" .Values.tracking.service.annotations .Values.commonAnnotations "context" .) | fromYaml }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.tracking.service.type }}
|
||||
{{- if and .Values.tracking.service.clusterIP (eq .Values.tracking.service.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.tracking.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.tracking.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (eq .Values.tracking.service.type "LoadBalancer") (eq .Values.tracking.service.type "NodePort") }}
|
||||
externalTrafficPolicy: {{ .Values.tracking.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.tracking.service.type "LoadBalancer") (not (empty .Values.tracking.service.loadBalancerSourceRanges)) }}
|
||||
loadBalancerSourceRanges: {{ .Values.tracking.service.loadBalancerSourceRanges }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.tracking.service.type "LoadBalancer") (not (empty .Values.tracking.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.tracking.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- if .Values.tracking.tls.enabled }}
|
||||
- name: https
|
||||
port: {{ .Values.tracking.service.ports.https }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.tracking.service.type "NodePort") (eq .Values.tracking.service.type "LoadBalancer")) (not (empty .Values.tracking.service.nodePorts.https)) }}
|
||||
nodePort: {{ .Values.tracking.service.nodePorts.https }}
|
||||
{{- else if eq .Values.tracking.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
targetPort: https
|
||||
{{- else }}
|
||||
- name: http
|
||||
port: {{ .Values.tracking.service.ports.http }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.tracking.service.type "NodePort") (eq .Values.tracking.service.type "LoadBalancer")) (not (empty .Values.tracking.service.nodePorts.http)) }}
|
||||
nodePort: {{ .Values.tracking.service.nodePorts.http }}
|
||||
{{- else if eq .Values.tracking.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
targetPort: http
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" (dict "values" .Values.tracking.podLabels .Values.commonLabels "context" .) | fromYaml }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- end }}
|
||||
59
bitnami/mlflow/templates/tracking/servicemonitor.yaml
Normal file
59
bitnami/mlflow/templates/tracking/servicemonitor.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.tracking.metrics.enabled .Values.tracking.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ default (include "common.names.namespace" .) .Values.tracking.metrics.serviceMonitor.namespace | quote }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.tracking.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if or .Values.tracking.metrics.serviceMonitor.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.tracking.metrics.serviceMonitor.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Values.tracking.metrics.serviceMonitor.jobLabel | quote }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.tracking.metrics.serviceMonitor.selector }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
|
||||
{{- end }}
|
||||
endpoints:
|
||||
- port: {{ include "mlflow.v0.tracking.port" . }}
|
||||
{{- if .Values.tracking.auth.enabled }}
|
||||
basicAuth:
|
||||
password:
|
||||
key: {{ include "mlflow.v0.tracking.passwordKey" . }}
|
||||
name: {{ include "mlflow.v0.tracking.secretName" . }}
|
||||
username:
|
||||
key: {{ include "mlflow.v0.tracking.userKey" . }}
|
||||
name: {{ include "mlflow.v0.tracking.secretName" . }}
|
||||
{{- end }}
|
||||
path: "/metrics"
|
||||
{{- if .Values.tracking.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.tracking.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.tracking.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.metrics.serviceMonitor.honorLabels }}
|
||||
honorLabels: {{ .Values.tracking.metrics.serviceMonitor.honorLabels }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.tracking.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tracking.metrics.serviceMonitor.relabelings }}
|
||||
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.tracking.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
30
bitnami/mlflow/templates/tracking/tls-secret.yaml
Normal file
30
bitnami/mlflow/templates/tracking/tls-secret.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if (include "mlflow.v0.tracking.createTlsSecret" . ) }}
|
||||
{{- $secretName := printf "%s-crt" (include "mlflow.v0.tracking.fullname" .) }}
|
||||
{{- $ca := genCA "mlflow-ca" 365 }}
|
||||
{{- $fullname := include "mlflow.v0.tracking.fullname" . }}
|
||||
{{- $releaseNamespace := include "common.names.namespace" . }}
|
||||
{{- $clusterDomain := .Values.clusterDomain }}
|
||||
{{- $altNames := list (printf "*.%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain) "127.0.0.1" $fullname }}
|
||||
{{- $cert := genSignedCert $fullname nil $altNames 365 $ca }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $secretName }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
|
||||
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
|
||||
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
||||
{{- end }}
|
||||
47
bitnami/mlflow/templates/tracking/vpa.yaml
Normal file
47
bitnami/mlflow/templates/tracking/vpa.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.tracking.autoscaling.vpa.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.vpa.apiVersion" . }}
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "mlflow.v0.tracking.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: mlflow
|
||||
app.kubernetes.io/component: tracking
|
||||
{{- if or .Values.tracking.autoscaling.vpa.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.tracking.autoscaling.vpa.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: mlflow
|
||||
{{- with .Values.tracking.autoscaling.vpa.controlledResources }}
|
||||
controlledResources:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tracking.autoscaling.vpa.maxAllowed }}
|
||||
maxAllowed:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tracking.autoscaling.vpa.minAllowed }}
|
||||
minAllowed:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
targetRef:
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
name: {{ include "mlflow.v0.tracking.fullname" . }}
|
||||
{{- if .Values.tracking.autoscaling.vpa.updatePolicy }}
|
||||
updatePolicy:
|
||||
{{- with .Values.tracking.autoscaling.vpa.updatePolicy.updateMode }}
|
||||
updateMode: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
2098
bitnami/mlflow/values.schema.json
Normal file
2098
bitnami/mlflow/values.schema.json
Normal file
File diff suppressed because it is too large
Load Diff
1353
bitnami/mlflow/values.yaml
Normal file
1353
bitnami/mlflow/values.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user