---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio-toolbox
  labels:
    app: minio-toolbox
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: minio-toolbox
  template:
    metadata:
      labels:
        app: minio-toolbox
    spec:
      containers:
      - name: minio-toolbox
        image: yasuhiroabe/minio-toolbox:latest
        command: ["sh","-c", "tail -f /dev/null"]
        imagePullPolicy: "Always"
        env:
        - name: AWS_HOST
          valueFrom:
            secretKeyRef:
              key: aws-host
              name: objectstore
        - name: AWS_ENDPOINT
          value: sccp-minio-svc.minio.svc.cluster.local:9000
        - name: AWS_ACCESS_KEY_ID
          valueFrom:
            secretKeyRef:
              key: access-key
              name: objectstore
        - name: AWS_SECRET_ACCESS_KEY
          valueFrom:
            secretKeyRef:
              key: secret-access-key
              name: objectstore
        volumeMounts:
        - name: data
          mountPath: /root
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: data-pvc
