The Insights Operator adds the SCA entitlements to a secret in the
openshift-config-managed
namespace and we are going to create a
MachineConfig from those entitlements so that we can entitle the
entire cluster.
This is built from this blog article
This one-liner requires oc
, curl
, and envsubst
(on MacOS it can be installed with brew install gettext
)
key=$(oc get secret -n openshift-config-managed etc-pki-entitlement -o=jsonpath='{.data.entitlement-key\.pem}') \
cert=$(oc get secret -n openshift-config-managed etc-pki-entitlement -o=jsonpath='{.data.entitlement\.pem}') \
envsubst < <(curl -sL https://gist.githubusercontent.com/kincl/7d720041d58f79a9725615c074a37d8c/raw/02-cluster-wide-machineconfig.template.yaml) \
| oc create -f -