---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: s3
spec:
  replicas: 1
  selector:
    matchLabels:
      name: s3
  template:
    metadata:
      labels:
        name: s3
      annotations:
        prometheus.io.scrape: "false"
    spec:
      containers:
      - name: minio
        image: minio/minio
        # Create the "cortex" bucket before starting minio server.
        command: [ "sh", "-c", "mkdir /storage/cortex && minio server /storage"]
        env:
        - name: MINIO_ACCESS_KEY
          value: "cortex"
        - name: MINIO_SECRET_KEY
          value: "supersecret"
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 9000
        volumeMounts:
        - name: storage
          mountPath: "/storage"
      volumes:
      - name: storage
        emptyDir: {}
