apiVersion: apps/v1
kind: Deployment
metadata:
  name: apiserver
  namespace: default
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  selector:
    matchLabels:
      app: apiserver
  template:
    metadata:
      labels:
        app: apiserver
    spec:
      automountServiceAccountToken: true
      containers:
        - args:
            - -dbConnection=postgresql://postgres:1234@10.20.0.95:5432/db-geocube
            - -pgqConnection=postgresql://postgres:1234@10.20.0.95:5432/db-geocube?binary_parameters=yes&sslmode=disable
            - -ingestionStorage=/tmp/inputs
            - -eventsQueue=events
            - -consolidationsQueue=consolidations
            - -maxConnectionAge=3600
            - -workers=1
            - -cancelledJobs=/work/OT/ai4geo/cnes/geocube/cancelled-jobs
          image: geocube-server:latest
          imagePullPolicy: IfNotPresent
          name: apiserver
          securityContext:
            runAsGroup: 9564
          ports:
            - containerPort: 8080
              protocol: TCP
          volumeMounts:
          - mountPath: /work
            name: nfs-vol
          resources: {}
      terminationGracePeriodSeconds: 120
      volumes:
        - name: nfs-vol
          nfs:
            server: 10.120.42.63
            path: /work/              
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
