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 - name: init-db-upgrade image: git.namesny.com/cluster/mlflow:latest@sha256:9d935268bc318d6cadbfe8d480744ce898cdfb906be5ba7125ab87c555894798 envFrom: - secretRef: name: mlflow-secret command: ["/bin/sh", "-c"] args: - mlflow db upgrade $MLFLOW_BACKEND_STORE_URI; exit 0; containers: - name: mlflow image: git.namesny.com/cluster/mlflow:latest@sha256:9d935268bc318d6cadbfe8d480744ce898cdfb906be5ba7125ab87c555894798 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