fix the seed job service names to use FQDN

This commit is contained in:
Seshu Kumar Alluvada 2020-03-23 09:47:58 -04:00
parent 959aa17c30
commit 0082392dbf
1 changed files with 4 additions and 6 deletions

View File

@ -402,9 +402,8 @@ func agentDeployment(jenkins *v1alpha2.Jenkins, namespace string, agentName stri
Env: []corev1.EnvVar{ Env: []corev1.EnvVar{
{ {
Name: "JENKINS_TUNNEL", Name: "JENKINS_TUNNEL",
Value: fmt.Sprintf("%s.%s:%d", Value: fmt.Sprintf("%s:%d",
resources.GetJenkinsSlavesServiceName(jenkins), resources.GetJenkinsSlavesServiceFQDN(jenkins),
jenkins.ObjectMeta.Namespace,
jenkins.Spec.SlaveService.Port), jenkins.Spec.SlaveService.Port),
}, },
{ {
@ -417,9 +416,8 @@ func agentDeployment(jenkins *v1alpha2.Jenkins, namespace string, agentName stri
}, },
{ {
Name: "JENKINS_URL", Name: "JENKINS_URL",
Value: fmt.Sprintf("http://%s.%s:%d", Value: fmt.Sprintf("http://%s:%d",
resources.GetJenkinsHTTPServiceName(jenkins), resources.GetJenkinsHTTPServiceFQDN(jenkins),
jenkins.ObjectMeta.Namespace,
jenkins.Spec.Service.Port, jenkins.Spec.Service.Port,
), ),
}, },