apiVersion: v1
kind: Pod
metadata:
 name: entitlement-tester
 namespace: default
spec:
  containers:
  - name: entitlement-tester
    image: registry.access.redhat.com/ubi8/ubi
    command:
    - /bin/entrypoint.sh
    env:
    - name: REMOVE_HOST_ENTITLEMENT
      value: "1"
    volumeMounts:
    - name: entrypoint
      mountPath: /bin/entrypoint.sh
      readOnly: true
      subPath: entrypoint.sh

    - name: entitlement-rhsm
      mountPath: /etc/rhsm/rhsm.conf
      readOnly: true
      subPath: RHSM
    - name: entitlement-pem
      mountPath: /etc/pki/entitlement/entitlement.pem
      readOnly: true
      subPath: PEM
    - name: entitlement-pem-key
      mountPath: /etc/pki/entitlement/entitlement-key.pem
      readOnly: true
      subPath: PEM

    - name: host-etc-os-release
      mountPath: /etc-host/os-release
      readOnly: true
  restartPolicy: Never
  volumes:
  - name: entrypoint
    configMap:
      defaultMode: 0700
      name: entitlement-tester-entrypoint
  - name: host-etc-os-release
    hostPath:
      path: /etc/os-release

  - name: entitlement-rhsm
    secret:
      defaultMode: 0400
      secretName: entitlement-tester-secret-files
  - name: entitlement-pem
    secret:
      defaultMode: 0400
      secretName: entitlement-tester-secret-files
  - name: entitlement-pem-key
    secret:
      defaultMode: 0400
      secretName: entitlement-tester-secret-files
