Override default service DNS hostnames

You can use the apiOverride parameter to change default service DNS hostnames. Customizing these endpoints ensures that exposed service routes match your network’s domain architecture and trusted security certificates.

Procedure

  1. Open your OpenStackControlPlane custom resource (CR) file, openstack_control_plane.yaml, on your workstation.
  2. Update the apiOverride field for the service to override the default route hostname with your custom API public endpoint:
    spec:
      ...
      cinder:
        enabled: true
        apiOverride:
          route:
            spec:
              host: mycinder.domain.name
    Note
    The hostname must be resolved by the DNS service in your data center to which the RHOCP cluster and the DNS instance forwards their requests. You cannot use the internal RHOCP coredns.
  3. Update the control plane:
    $ oc apply -f openstack_control_plane.yaml -n openstack
  4. Wait until the Red Hat OpenShift Container Platform (RHOCP) creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status:
    $ oc get openstackcontrolplane -n openstack
    NAME 						STATUS 	MESSAGE
    openstack-control-plane 	Unknown 	Setup started

    The OpenStackControlPlane resources are created when the status is "Setup complete".

    Tip
    Append the -w option to the end of the get command to track deployment progress.
  5. Confirm that the control plane is deployed by reviewing the pods in the openstack namespace:
    $ oc get pods -n openstack

    The control plane is deployed when all the pods are either completed or running.

Results

  1. Confirm that the route is created:
    $ oc get route -n openstack cinder
    NAME      HOST/PORT               PATH   SERVICES   PORT      TERMINATION          WILDCARD
    cinder    mycinder.domain.name           cinder     cinder    reencrypt/Redirect   None
  2. Access the remote shell for the OpenStackClient pod from your workstation:
    $ oc rsh -n openstack openstackclient
  3. Verify that the endpoint is updated:
    $ openstack endpoint list --service cinderv3 --interface public
    +----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------+
    | ID                               | Region    | Service Name | Service Type | Enabled | Interface | URL                             |
    +----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------+
    | 5bc4760fa4944a14b1c052cc067b952c | regionOne | cinderv3     | volumev3     | True    | public    | https://mycinder.domain.name/v3 |
    +----------------------------------+-----------+--------------+--------------+---------+-----------+---------------------------------+
  4. Exit the OpenStackClient pod:
    $ exit