apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio
  namespace: open-cluster-management-observability
  labels:
    app.kubernetes.io/name: minio
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: minio
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: minio
    spec:
      containers:
      - command:
        - /bin/sh
        - -c
        - mkdir -p /storage/thanos && /usr/bin/minio server --certs-dir /etc/minio/certs /storage
        env:
        - name: MINIO_ACCESS_KEY
          value: minio
        - name: MINIO_SECRET_KEY
          value: minio123
        image:  quay.io/minio/minio:RELEASE.2021-08-25T00-41-18Z
        name: minio
        ports:
        - containerPort: 9000
          protocol: TCP
        volumeMounts:
        - mountPath: /storage
          name: storage
        - mountPath: /etc/minio/certs
          name: tls-certs
      volumes:
      - name: storage
        persistentVolumeClaim:
          claimName: minio
      - name: tls-certs
        secret:
          items:
          - key: ca.crt
            path: CAs/ca.crt
          - key: public.crt
            path: public.crt
          - key: private.key
            path: private.key
          secretName: minio-tls-secret
