apiVersion: v1
kind: Pod
metadata:
  name: oracleunittests
spec:
  restartPolicy: Never
  containers:
  - name: oracleunittests
    image: gitlab-registry.cern.ch/cta/ctageneric:78673git921a9300
    stdin: true
    env:
    - name: MY_CONTAINER
      value: "oracleunittests"
    - name: MY_NAME
      valueFrom:
        fieldRef:
          fieldPath: metadata.name
    - name: MY_NAMESPACE
      valueFrom:
        fieldRef:
          fieldPath: metadata.namespace
    - name: INSTANCE_NAME
      value: "$(MY_NAMESPACE)"
    - name: TERM
      value: "xterm"
    - name: driveslot
      value: "0"
    command: ['/opt/run/bin/oracleunittests.sh']
    args: ["none"]
    volumeMounts:
    - mountPath: /shared
      name: shared
    - mountPath: /etc/config/objectstore
      name: myobjectstore
    - mountPath: /etc/config/database
      name: mydatabase
    - mountPath: /etc/config/library
      name: mylibrary
    - mountPath: /mnt/logs
      name: logstorage
    securityContext:
      privileged: true

  volumes:
  - name: shared
    hostPath:
      path: /opt/cta
  - name: myobjectstore
    configMap:
      name: objectstore-config
  - name: mydatabase
    configMap:
      name: database-config
  - name: mylibrary
    configMap:
      name: library-config
  - name: logstorage
    persistentVolumeClaim:
      claimName: claimlogs

  imagePullSecrets:
  - name: ctaregsecret
