With RedHat Advance Cluster Management 2.1/2.2 it is possible to provision OpenShift clusters through an http proxy by using mutatingwebhook to update the proxy settings in the provisioning jobs.
One way to accomplish this is to deploy the podpreset webhook controller (https://www.openshift.com/blog/a-podpreset-based-webhook-admission-controller). It will be assumed that you have configured cluster-wide http proxy in the OpenShift cluster already.
STEP 1: Follow the 6 steps listed in the blog post, to deploy the webhook controller.
STEP 2: Then define the following podpreset configuration.
- name: HTTP_PROXY
- name: HTTPS_PROXY
- name: NO_PROXY
The proxy settings you can get by querying your cluster proxy configurations. For example,
oc get proxy cluster -n openshift-config -o yaml .
Notice that we are matching the pod label
hive.openshift.io/job-type: provision . This should select for only the hive provisioning jobs. A second podpreset is needed for deprovision as well.
With this in place, you will be able to reach public cloud providers through the http proxy server, and provision a cluster.
NOTE: These steps create a network path from the hub and cloud provider (and eventually the spoke), through the http proxy server. In order to have the provisioned cluster imported into RHACM, post provision, a network path has to be establish in the opposite direction. I leave this up to the reader.