Create the init bundle using the ACS Portal:
If you are running oc
on your laptop, you are set. If you are SSH-ing to another host (like the bastion host) to run oc
, you have to scp the init bundle file over there. If you are using the OpenShift Web Terminal you have to use the API method.
The integrations to the internal registry were created automatically. But to enable scanning of images in the internal registry, you’ll have to configure valid credentials, so this is what you’ll do:
But the first step is to disable the auto-generate mechanism, otherwise your updated credentials would be set back automatically:
stackrox-central-services
spec:
add the following YAML snippet (one indent):customize:
envVars:
- name: ROX_DISABLE_AUTOGENERATED_REGISTRIES
value: 'true'
Create ServiceAccount to read images from Registry
stackrox
Projectacs-registry-reader
and click Createacs-registry-reader-token-...
secretsoc
give the ServiceAccount the right to read images from all projects:oc adm policy add-cluster-role-to-user 'system:image-puller' system:serviceaccount:stackrox:acs-registry-reader -n stackrox
Configure Registry Integrations in ACS
Access the ACS Portal and configure the already existing integrations of type Generic Docker Registry. Go to Platform Configuration -> Integrations -> Generic Docker Registry. You should see a number of autogenerated (from existing pull-secrets) entries.
You have to change four entries pointing to the internal registry, you can easily recognize them by the placeholder Username serviceaccount
.
For each of the four local registry integrations click Edit integration using the three dots at the right:
acs-registry-reader
as UsernameACS is now able to scan images in the internal registry!