6.3.3. Configuring a URI allowlist for web-import sources
You configure the sources of web-import image downloads by specifying URI allowlists and blocklists in the glance template in your OpenStackControlPlane custom resource (CR) file.
In this example, you are using an FTP server for image upload. The default port for FTP is 21.
Procedure
Open your
OpenStackControlPlanecustom resource CR file,openstack_control_plane.yaml, and add the following parameters to theglancetemplate:Example
glance: template: customServiceConfig: | [DEFAULT] allowed_schemes = [http,https,ftp] disallowed_schemes = [] allowed_hosts = [] disallowed_hosts = [] allowed_ports = [80,443] disallowed_ports = [] glanceAPIs: ...-
Because
ftpis in the list forallowed_schemes, this URL to the image resource is allowed: ftp://example.org/some/resource. -
Because 21 is not in the list for
allowed_ports, this URL to the same image resource is rejected: ftp://example.org:21/some/resource.
-
Because
Update the control plane:
$ oc apply -f openstack_control_plane.yaml -n openstackWait until RHOCP creates the resources related to the
OpenStackControlPlaneCR. Run the following command to check the status:$ oc get openstackcontrolplane -n openstack提示Append the
-woption to the end of thegetcommand to track deployment progress.