Fix run operator with minikube

This commit is contained in:
Tomasz Sęk 2019-09-23 20:07:52 +02:00
parent 01da21cdf8
commit d76a2b1906
No known key found for this signature in database
GPG Key ID: DC356D23F6A644D0
2 changed files with 5 additions and 1 deletions

View File

@ -94,6 +94,10 @@ func BuildJenkinsAPIUrl(namespace, serviceName string, portNumber int32, local,
// First is for http, the second one is for Jenkins slaves communication // First is for http, the second one is for Jenkins slaves communication
// see pkg/controller/jenkins/configuration/base/resources/service.go // see pkg/controller/jenkins/configuration/base/resources/service.go
url := lines[0] url := lines[0]
if strings.HasPrefix(url, "* ") {
return url[2:], nil
}
return url, nil return url, nil
} }

View File

@ -788,7 +788,7 @@ func (r *ReconcileJenkinsBaseConfiguration) ensureJenkinsClient(meta metav1.Obje
if err != nil { if err != nil {
return nil, err return nil, err
} }
r.logger.V(log.VDebug).Info(fmt.Sprintf("Jenkins API URL %s", jenkinsURL)) r.logger.V(log.VDebug).Info(fmt.Sprintf("Jenkins API URL '%s'", jenkinsURL))
credentialsSecret := &corev1.Secret{} credentialsSecret := &corev1.Secret{}
err = r.k8sClient.Get(context.TODO(), types.NamespacedName{Name: resources.GetOperatorCredentialsSecretName(r.jenkins), Namespace: r.jenkins.ObjectMeta.Namespace}, credentialsSecret) err = r.k8sClient.Get(context.TODO(), types.NamespacedName{Name: resources.GetOperatorCredentialsSecretName(r.jenkins), Namespace: r.jenkins.ObjectMeta.Namespace}, credentialsSecret)