Skip to content

Commit b83733d

Browse files
committed
add examples directory to mlflow chart
1 parent c36cb69 commit b83733d

File tree

13 files changed

+289
-3
lines changed

13 files changed

+289
-3
lines changed

applications/mlflow/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ RUN curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | b
3434
&& curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
3535
&& chmod +x kubectl \
3636
&& mv kubectl /usr/local/bin/ \
37-
# Install Kind
38-
&& curl -Lo /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64 \
39-
&& chmod +x /usr/local/bin/kind \
4037
# Install yq
4138
&& wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq \
4239
&& chmod +x /usr/local/bin/yq \
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# MLflow Helm Chart Examples
2+
3+
This directory contains various example values files for deploying MLflow with different configurations, organized by category.
4+
5+
## Directory Structure
6+
7+
```
8+
examples/
9+
├── database/ # Database configuration examples
10+
│ ├── embedded/ # Embedded PostgreSQL examples
11+
│ └── external/ # External PostgreSQL examples
12+
├── network/ # Network configuration examples
13+
│ ├── ingress/ # Ingress configuration examples
14+
│ └── loadbalancer/ # LoadBalancer configuration examples
15+
└── object-storage/ # Object storage configuration examples
16+
├── embedded/ # Embedded MinIO examples
17+
└── external/ # External S3 storage examples
18+
```
19+
20+
## Available Examples
21+
22+
### Database Configurations
23+
- **Database Examples**: [database/README.md](./database/README.md)
24+
- **Embedded PostgreSQL**: [database/embedded/values.yaml](./database/embedded/values.yaml)
25+
- **External PostgreSQL (Direct Credentials)**: [database/external/direct-credentials.yaml](./database/external/direct-credentials.yaml)
26+
- **External PostgreSQL (Existing Secret)**: [database/external/existing-secret.yaml](./database/external/existing-secret.yaml)
27+
28+
### Network Configurations
29+
- **Network Examples**: [network/README.md](./network/README.md)
30+
- **Ingress**: [network/ingress/values.yaml](./network/ingress/values.yaml)
31+
- **LoadBalancer**: [network/loadbalancer/values.yaml](./network/loadbalancer/values.yaml)
32+
33+
### Object Storage Configurations
34+
- **Object Storage Examples**: [object-storage/README.md](./object-storage/README.md)
35+
- **Embedded MinIO**: [object-storage/embedded/values.yaml](./object-storage/embedded/values.yaml)
36+
- **External S3 (Direct Credentials)**: [object-storage/external/direct-credentials.yaml](./object-storage/external/direct-credentials.yaml)
37+
- **External S3 (Existing Secret)**: [object-storage/external/existing-secret.yaml](./object-storage/external/existing-secret.yaml)
38+
39+
## Usage
40+
41+
You can use these example values files as a starting point for your own deployment:
42+
43+
```bash
44+
helm install mlflow ./charts/mlflow -f ./charts/mlflow/examples/database/embedded/values.yaml
45+
```
46+
47+
Or combine multiple example files:
48+
49+
```bash
50+
helm install mlflow ./charts/mlflow \
51+
-f ./charts/mlflow/examples/database/embedded/values.yaml \
52+
-f ./charts/mlflow/examples/network/ingress/values.yaml
53+
```
54+
55+
## Customization
56+
57+
These examples provide basic configurations. For production deployments, make sure to:
58+
59+
1. Set secure passwords
60+
2. Configure proper TLS certificates
61+
3. Adjust resource requests and limits
62+
4. Review other settings in the main `values.yaml` file
63+
64+
Refer to the main [README.md](../README.md) for complete configuration options.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Database Configuration Examples
2+
3+
This directory contains examples for configuring the MLflow database backends.
4+
5+
## Embedded
6+
7+
The `embedded` directory contains examples for using the built-in PostgreSQL database provided by the CloudNativePG operator.
8+
9+
- [values.yaml](./embedded/values.yaml): Configuration for embedded PostgreSQL
10+
11+
## External
12+
13+
The `external` directory contains examples for connecting to an external PostgreSQL database:
14+
15+
- [direct-credentials.yaml](./external/direct-credentials.yaml): Configure access using credentials specified in the values file
16+
- [existing-secret.yaml](./external/existing-secret.yaml): Configure access using credentials stored in a Kubernetes secret
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# MLFlow with embedded PostgreSQL configuration
2+
3+
# PostgreSQL configuration
4+
postgres:
5+
auth:
6+
username: mlflow
7+
password: mlflow
8+
9+
embedded:
10+
enabled: true
11+
type: postgresql
12+
instances: 3
13+
initdb:
14+
database: mlflow
15+
owner: mlflow
16+
storage:
17+
size: 10Gi
18+
logLevel: "info"
19+
20+
# External PostgreSQL is disabled
21+
external:
22+
enabled: false
23+
24+
mlflow:
25+
backendStore:
26+
databaseUpgrade: true
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# MLFlow with external PostgreSQL configuration using direct credentials
2+
3+
# PostgreSQL configuration
4+
postgres:
5+
auth:
6+
username: mlflow
7+
password: mlflow
8+
9+
# Embedded PostgreSQL is disabled
10+
embedded:
11+
enabled: false
12+
13+
# External PostgreSQL is enabled
14+
external:
15+
enabled: true
16+
host: "your-postgres-host"
17+
port: 5432
18+
database: mlflow
19+
20+
mlflow:
21+
backendStore:
22+
# Database schema will be upgraded during deployment
23+
databaseUpgrade: true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# MLFlow with external PostgreSQL configuration using existing secret
2+
3+
# PostgreSQL configuration
4+
postgres:
5+
# Embedded PostgreSQL is disabled
6+
embedded:
7+
enabled: false
8+
9+
# External PostgreSQL is enabled
10+
external:
11+
enabled: true
12+
host: "your-postgres-host"
13+
port: 5432
14+
database: mlflow
15+
16+
mlflow:
17+
backendStore:
18+
# Use an existing secret containing the database connection string
19+
existingSecret: "mlflow-postgres-secret"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Network Configuration Examples
2+
3+
This directory contains examples for configuring the networking aspects of MLflow.
4+
5+
## Ingress
6+
7+
The `ingress` directory contains examples for exposing MLflow using Kubernetes Ingress:
8+
9+
- [values.yaml](./ingress/values.yaml): Configuration for exposing MLflow via an Ingress controller
10+
11+
## LoadBalancer
12+
13+
The `loadbalancer` directory contains examples for exposing MLflow using a LoadBalancer service:
14+
15+
- [values.yaml](./loadbalancer/values.yaml): Configuration for exposing MLflow via a LoadBalancer service
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# MLFlow with Ingress configuration
2+
3+
mlflow:
4+
# Configure Ingress
5+
ingress:
6+
enabled: true
7+
className: "nginx"
8+
pathType: ImplementationSpecific
9+
hostname: "mlflow.example.com"
10+
path: /
11+
annotations:
12+
kubernetes.io/ingress.class: nginx
13+
nginx.ingress.kubernetes.io/ssl-redirect: "false"
14+
tls:
15+
enabled: true
16+
genSelfSignedCert: true =
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# MLFlow with LoadBalancer service configuration
2+
3+
mlflow:
4+
# Configure LoadBalancer service
5+
service:
6+
type: LoadBalancer
7+
port: 5000
8+
# Optionally specify nodePort for specific port assignment
9+
# nodePort: 32000
10+
annotations:
11+
service.beta.kubernetes.io/aws-load-balancer-type: nlb
12+
# Add additional annotations as needed for your specific cloud provider
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Object Storage Configuration Examples
2+
3+
This directory contains examples for configuring the artifact object storage for MLflow.
4+
5+
## Embedded
6+
7+
The `embedded` directory contains examples for using the built-in MinIO object storage:
8+
9+
- [values.yaml](./embedded/values.yaml): Configuration for embedded MinIO as artifact storage
10+
11+
## External
12+
13+
The `external` directory contains examples for connecting to external S3-compatible storage:
14+
15+
- [direct-credentials.yaml](./external/direct-credentials.yaml): Configure access using credentials specified in the values file
16+
- [existing-secret.yaml](./external/existing-secret.yaml): Configure access using credentials stored in a Kubernetes secret

0 commit comments

Comments
 (0)