Cosmetic changes

This commit is contained in:
Jakub Al-Khalili
2019-12-19 13:54:32 +01:00
committed by Paweł Prażak
parent 80b0839e5d
commit 9b4a04c32f
+7 -9
View File
@@ -445,16 +445,14 @@ func (r *ReconcileJenkins) setDefaults(jenkins *v1alpha2.Jenkins, logger logr.Lo
if reflect.DeepEqual(jenkins.Spec.Service, v1alpha2.Service{}) {
logger.Info("Setting default Jenkins master service")
changed = true
var serviceType = corev1.ServiceTypeClusterIP
if r.jenkinsAPIConnectionSettings.UseNodePort {
jenkins.Spec.Service = v1alpha2.Service{
Type: corev1.ServiceTypeNodePort,
Port: constants.DefaultHTTPPortInt32,
}
} else {
jenkins.Spec.Service = v1alpha2.Service{
Type: corev1.ServiceTypeClusterIP,
Port: constants.DefaultHTTPPortInt32,
}
serviceType = corev1.ServiceTypeNodePort
}
jenkins.Spec.Service = v1alpha2.Service{
Type: serviceType,
Port: constants.DefaultHTTPPortInt32,
}
}
if reflect.DeepEqual(jenkins.Spec.SlaveService, v1alpha2.Service{}) {