apiVersion: batch/v1
kind: Job
metadata:
  name: cpsecret
  namespace: smq-dev
spec:
  template:
    metadata:
      name: cpsecret
    spec:
      serviceAccountName: smq-job-sa
      containers:
      - name: copysecret
        image: bitnami/kubectl
        command:
         - "bin/bash"
         - "-c"
         - "kubectl get secret ibm-entitlement-key -n ibm-common-services -o json | jq -r '.metadata.namespace=smq-dev' | kubectl apply -f -"
      restartPolicy: Never 