apiVersion: v1
kind: Pod
metadata:
  name: dbupdatetest
  labels:
    k8s-app: dbupdatetest
spec:
  restartPolicy: Never
  containers:
  - name: dbupdatetest
    image: gitlab-registry.cern.ch/cta/eoscta-operations/registry/container_registry/cta-catalogue-updater@sha256:072fbb587e7b8a5ab4f0b8e889bcf30e5d1a9bb057cdb876c4e67c2213acc064
    stdin: true
    env:
    - name: MY_NAME
      valueFrom:
        fieldRef:
          fieldPath: metadata.name
    - name: MY_NAMESPACE
      valueFrom:
        fieldRef:
          fieldPath: metadata.namespace
    - name: INSTANCE_NAME
      value: "$(MY_NAMESPACE)"
    - name: CATALOGUE_SOURCE_VERSION
      value: "CATALOGUE_SOURCE_VERSION_VALUE"
    - name: CATALOGUE_DESTINATION_VERSION
      value: "CATALOGUE_DESTINATION_VERSION_VALUE"
    - name: CTA_VERSION
      value: "CTA_VERSION_VALUE"
    - name: COMMIT_ID
      value: "COMMIT_ID_VALUE"
    - name: TERM
      value: "xterm"
    command: ["/usr/bin/bash"]
    args: ["/shared/scripts/dbupdatetest.sh"]
    volumeMounts:
    - mountPath: /shared/etc_yum.repos.d
      name: repos
    - mountPath: /shared/scripts
      name: scripts
    - mountPath: /shared/etc_cta
      name: etccta
    - mountPath: /mnt/logs
      name: logstorage
    securityContext:
      privileged: true

  volumes:
  - name: repos
    configMap:
      name: yum.repos.d-config
  - name: etccta
    configMap:
      name: cta-catalogue-config
  - name: scripts
    configMap:
      name: dbupdatetestscript-config
  - name: logstorage
    persistentVolumeClaim:
      claimName: claimlogs

  imagePullSecrets:
  - name: ctaregsecret
