apiVersion: apps/v1
kind: Deployment
metadata:
  name: ml-pipeline-ui
spec:
  template:
    metadata:
      labels:
        app: ml-pipeline-ui
    spec:
      volumes:
        - name: config-volume
          configMap:
            name: ml-pipeline-ui-configmap
      containers:
        - name: ml-pipeline-ui
          env:
            - name: AWS_ACCESS_KEY_ID
              valueFrom:
                secretKeyRef:
                  name: mlpipeline-minio-artifact
                  key: accesskey
            - name: AWS_SECRET_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: mlpipeline-minio-artifact
                  key: secretkey

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ml-pipeline
spec:
  template:
    metadata:
      labels:
        app: ml-pipeline
    spec:
      containers:
        - env:
            - name: OBJECTSTORECONFIG_SECURE
              value: "true"
            - name: OBJECTSTORECONFIG_BUCKETNAME
              valueFrom:
                configMapKeyRef:
                  name: pipeline-install-config
                  key: bucketName
            - name: OBJECTSTORECONFIG_HOST
              valueFrom:
                configMapKeyRef:
                  name: pipeline-install-config
                  key: minioServiceHost
            - name: OBJECTSTORECONFIG_REGION
              valueFrom:
                configMapKeyRef:
                  name: pipeline-install-config
                  key: minioServiceRegion
            - name: OBJECTSTORECONFIG_PORT
              value: ""
          name: ml-pipeline-api-server