Add HostAliases to schema (#656)
Add HostAliases to schema and propagate them to pods so the user can add entries to /etc/hosts
This commit is contained in:
		
							parent
							
								
									dfae860ca8
								
							
						
					
					
						commit
						31c8368c55
					
				|  | @ -372,6 +372,10 @@ type JenkinsMaster struct { | |||
| 	// PriorityClassName for Jenkins master pod
 | ||||
| 	// +optional
 | ||||
| 	PriorityClassName string `json:"priorityClassName,omitempty"` | ||||
| 
 | ||||
| 	// HostAliases for Jenkins master pod and SeedJob agent
 | ||||
| 	// +optional
 | ||||
| 	HostAliases []corev1.HostAlias `json:"hostAliases,omitempty"` | ||||
| } | ||||
| 
 | ||||
| // Service defines Kubernetes service attributes
 | ||||
|  |  | |||
|  | @ -37,6 +37,7 @@ func NewJenkinsDeployment(objectMeta metav1.ObjectMeta, jenkins *v1alpha2.Jenkin | |||
| 					ImagePullSecrets:   jenkins.Spec.Master.ImagePullSecrets, | ||||
| 					Tolerations:        jenkins.Spec.Master.Tolerations, | ||||
| 					PriorityClassName:  jenkins.Spec.Master.PriorityClassName, | ||||
| 					HostAliases: 	    jenkins.Spec.Master.HostAliases, | ||||
| 				}, | ||||
| 			}, | ||||
| 			Selector: selector, | ||||
|  |  | |||
|  | @ -380,6 +380,7 @@ func NewJenkinsMasterPod(objectMeta metav1.ObjectMeta, jenkins *v1alpha2.Jenkins | |||
| 			ImagePullSecrets:   jenkins.Spec.Master.ImagePullSecrets, | ||||
| 			Tolerations:        jenkins.Spec.Master.Tolerations, | ||||
| 			PriorityClassName:  jenkins.Spec.Master.PriorityClassName, | ||||
| 			HostAliases: 	    jenkins.Spec.Master.HostAliases, | ||||
| 		}, | ||||
| 	} | ||||
| } | ||||
|  |  | |||
|  | @ -439,6 +439,7 @@ func agentDeployment(jenkins *v1alpha2.Jenkins, namespace string, agentName stri | |||
| 					NodeSelector:     jenkins.Spec.Master.NodeSelector, | ||||
| 					Tolerations:      jenkins.Spec.Master.Tolerations, | ||||
| 					ImagePullSecrets: jenkins.Spec.Master.ImagePullSecrets, | ||||
| 					HostAliases:      jenkins.Spec.Master.HostAliases, | ||||
| 					Containers: []corev1.Container{ | ||||
| 						{ | ||||
| 							Name:  "jnlp", | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue