Add hostAliases to the runner spec (#456)

This commit is contained in:
Agoney Garcia-Deniz
2021-04-17 09:04:52 +01:00
committed by GitHub
parent 7b44454d01
commit 2e551c9d0a
9 changed files with 97 additions and 0 deletions

View File

@@ -813,6 +813,10 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
pod.Spec.TerminationGracePeriodSeconds = runner.Spec.TerminationGracePeriodSeconds
}
if len(runner.Spec.HostAliases) != 0 {
pod.Spec.HostAliases = runner.Spec.HostAliases
}
if err := ctrl.SetControllerReference(&runner, &pod, r.Scheme); err != nil {
return pod, err
}