Allow RunnerDeployments to configure dnsPolicy for runners (#1892)

* Add DnsPolicy field to RunnerPodSpec struct

* Ensure the runnerSpec's DNSPolicy is mirrored to the pod.Spec

* Run `make manifests`
This commit is contained in:
Nicholas Farley
2022-10-04 19:16:11 -04:00
committed by GitHub
parent 6eadb03669
commit a389292478
8 changed files with 25 additions and 0 deletions

View File

@@ -650,6 +650,10 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
pod.Spec.HostAliases = runnerSpec.HostAliases
}
if runnerSpec.DnsPolicy != "" {
pod.Spec.DNSPolicy = runnerSpec.DnsPolicy
}
if runnerSpec.DnsConfig != nil {
pod.Spec.DNSConfig = runnerSpec.DnsConfig
}