apiVersion: apps/v1
kind: Deployment
metadata:
  name: rendezvous-object-store-deployment
  labels:
    app: rendezvous-object-store
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rendezvous-object-store
  template:
    metadata:
      labels:
        app: rendezvous-object-store
    spec:
      volumes:
        - name: datadir
          hostPath:
            path: /home/rendezvous/object-store/data
      containers:
        - name: object-store
          image: ilinaraducristian/rendezvous-object-store:0.0.1
          imagePullPolicy: Always
          env:
            - name: MINIO_ROOT_USER
              valueFrom:
                secretKeyRef:
                  name: minio-secret
                  key: access_key
            - name: MINIO_ROOT_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: minio-secret
                  key: secret_key
          ports:
            - containerPort: 9000
              name: port1
            - containerPort: 9001
              name: port2
          volumeMounts:
            - name: datadir
              mountPath: /data