Use OpenShift API internal URL to fetch certficate (#829)
Signed-off-by: Anatolii Bazko <abazko@redhat.com>pull/833/head
parent
07c4f74f04
commit
5105bd00e6
|
|
@ -492,10 +492,11 @@ func (r *ReconcileChe) Reconcile(request reconcile.Request) (reconcile.Result, e
|
|||
|
||||
if util.IsOAuthEnabled(instance) {
|
||||
// create a secret with OpenShift API crt to be added to keystore that RH SSO will consume
|
||||
baseURL, _, err := util.GetOpenShiftAPIUrls()
|
||||
apiUrl, apiInternalUrl, err := util.GetOpenShiftAPIUrls()
|
||||
if err != nil {
|
||||
logrus.Errorf("Failed to get OpenShift cluster public hostname. A secret with API crt will not be created and consumed by RH-SSO/Keycloak")
|
||||
} else {
|
||||
baseURL := map[bool]string{true: apiInternalUrl, false: apiUrl}[apiInternalUrl != ""]
|
||||
if err := deploy.CreateTLSSecretFromEndpoint(deployContext, baseURL, "openshift-api-crt"); err != nil {
|
||||
return reconcile.Result{}, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue