apiVersion: v1
kind: Pod
metadata:
  name: ctaeos
  labels:
    k8s-app: ctaeos-mgm
spec:
  restartPolicy: Never
  containers:
  - name: mgm
    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: frontend
      value: 'cta-frontend:10955'
    - name: TERM
      value: "xterm"
    command: ['/opt/run/bin/ctaeos-mgm-log-wrapper.sh']
    args: ["none"]
    volumeMounts:
    - mountPath: /shared
      name: shared
    - mountPath: /mnt/logs
      name: logstorage
    - mountPath: /fst
      name: stgstorage
    - mountPath: /etc/config/eos
      name: eosconfig
    - mountPath: /etc/config/eoscta
      name: eosctaconfig
    securityContext:
      privileged: true

  volumes:
  - name: shared
    hostPath:
      path: /opt/cta
  - name: logstorage
    persistentVolumeClaim:
      claimName: claimlogs
  - name: stgstorage
    persistentVolumeClaim:
      claimName: claimstg
  - name: eosconfig
    configMap:
      name: eos-config
  - name: eosctaconfig
    configMap:
      name: eoscta-config

  imagePullSecrets:
  - name: ctaregsecret
