apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio
spec:
  replicas: 1
  selector: 
    matchLabels:
      stack: todo
      app: minio
  template:
    metadata:
      name: minio
      labels:
        stack: todo
        app: minio
    spec:
      volumes:
        - name: minio-storage
          persistentVolumeClaim:
            claimName: minio
      containers:
        - name: minio
          image: veronezi/sample-minio:0.0.1-b21
          ports:
            - containerPort: 9000
          env:
            - name: MINIO_ACCESS_KEY
              value: TESTINGACCESS123
            - name: MINIO_SECRET_KEY
              valueFrom:
                secretKeyRef:
                  name: miniopass
                  key: MINIO_SECRET
          volumeMounts:
            - name: minio-storage
              mountPath: /opt/volume/
              subPath: minioVolume
