apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio
  labels:
    app: minio
spec:
  selector:
    matchLabels:
      app: minio
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: minio
    spec:
      serviceAccountName: kubeflow-pipelines-minio-gcs-gateway
      containers:
        - name: minio
          image: gcr.io/ml-pipeline/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance
          args:
            - gateway
            - gcs
            - $(GCP_PROJECT_ID)
          env:            
            - name: GCP_PROJECT_ID
              valueFrom:
                configMapKeyRef:
                  name: pipeline-install-config
                  key: gcsProjectId
            - name: MINIO_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: mlpipeline-minio-artifact
                  key: accesskey
            - name: MINIO_SECRET_KEY
              valueFrom:
                secretKeyRef:
                  name: mlpipeline-minio-artifact
                  key: secretkey
          ports:
            - containerPort: 9000
