apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: objectstore-manager
  name: objectstore-manager
  namespace: os4ml
spec:
  replicas: 1
  selector:
    matchLabels:
      app: objectstore-manager
  template:
    metadata:
      labels:
        app: objectstore-manager
    spec:
      containers:
        - name: objectstore-manager
          image: "gitlab-registry.wogra.com/developer/wogra/os4ml/os4ml-objectstore-manager:latest"
          ports:
            - containerPort: 8000
              name: http
          env:
            - name: OBJECTSTORECONFIG_URL
              valueFrom:
                configMapKeyRef:
                  name: os4ml-install-config
                  key: url
            - name: OBJECTSTORECONFIG_SECURE
              value: "false"
            - name: OBJECTSTORECONFIG_BUCKETNAME
              valueFrom:
                configMapKeyRef:
                  name: os4ml-install-config
                  key: bucketName
            - name: OBJECTSTORECONFIG_ACCESSKEY
              valueFrom:
                secretKeyRef:
                  name: os4ml-minio
                  key: accesskey
            - name: OBJECTSTORECONFIG_SECRETACCESSKEY
              valueFrom:
                secretKeyRef:
                  name: os4ml-minio
                  key: secretkey
          resources:
            requests:
              cpu: 250m
              memory: 500Mi
      serviceAccountName: service-account
      imagePullSecrets:
          - name: registry-credentials