k3s-configs/apps/mlflow/mlflow-deployment.yaml

49 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2023-12-11 22:46:18 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: mlflow
namespace: mlflow
spec:
replicas: 1
selector:
matchLabels:
app: mlflow
template:
metadata:
labels:
app: mlflow
spec:
imagePullSecrets:
- name: gitea-regcred
initContainers:
- name: init-s3-bucket
image: minio/mc
command: ["/bin/sh", "-c"]
args:
- until mc alias set mlflow-minio http://minio-svc.mlflow.svc.cluster.local:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD; do sleep 5; done;
mc admin user add mlflow-minio $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY;
mc admin policy attach mlflow-minio readwrite --user $AWS_ACCESS_KEY_ID;
mc mb mlflow-minio/mlflow;
exit 0;
envFrom:
- secretRef:
name: minio-admin-secret
- secretRef:
name: minio-user-secret
containers:
- name: mlflow
image: git.namesny.com/cluster/mlflow:2.9.1
imagePullPolicy: Always
args:
- --host=0.0.0.0
- --port=5000
envFrom:
- secretRef:
name: mlflow-secret
- secretRef:
name: minio-user-secret
ports:
- name: http
containerPort: 5000
protocol: TCP