apiVersion: v1
kind: Pod
metadata:
  name: ctacli
  labels:
    k8s-app: ctacli
spec:
  restartPolicy: Never
  containers:
  - name: ctacli
    image: gitlab-registry.cern.ch/cta/ctageneric:78673git921a9300
    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: TERM
      value: "xterm"
    command: ['/opt/run/bin/ctacli.sh']
    args: ["none"]
    volumeMounts:
    - mountPath: /shared
      name: shared
    - mountPath: /mnt/logs
      name: logstorage
    securityContext:
      privileged: true

  volumes:
  - name: shared
    hostPath:
      path: /opt/cta
  - name: logstorage
    persistentVolumeClaim:
      claimName: claimlogs

  imagePullSecrets:
  - name: ctaregsecret
