mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 03:57:01 +00:00
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:
@@ -170,6 +170,9 @@ type RunnerPodSpec struct {
|
||||
// +optional
|
||||
RuntimeClassName *string `json:"runtimeClassName,omitempty"`
|
||||
|
||||
// +optional
|
||||
DnsPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`
|
||||
|
||||
// +optional
|
||||
DnsConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"`
|
||||
|
||||
|
||||
@@ -1381,6 +1381,9 @@ spec:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
dnsPolicy:
|
||||
description: DNSPolicy defines how a pod's DNS will be configured.
|
||||
type: string
|
||||
dockerEnabled:
|
||||
type: boolean
|
||||
dockerEnv:
|
||||
|
||||
@@ -1378,6 +1378,9 @@ spec:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
dnsPolicy:
|
||||
description: DNSPolicy defines how a pod's DNS will be configured.
|
||||
type: string
|
||||
dockerEnabled:
|
||||
type: boolean
|
||||
dockerEnv:
|
||||
|
||||
@@ -1325,6 +1325,9 @@ spec:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
dnsPolicy:
|
||||
description: DNSPolicy defines how a pod's DNS will be configured.
|
||||
type: string
|
||||
dockerEnabled:
|
||||
type: boolean
|
||||
dockerEnv:
|
||||
|
||||
@@ -1381,6 +1381,9 @@ spec:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
dnsPolicy:
|
||||
description: DNSPolicy defines how a pod's DNS will be configured.
|
||||
type: string
|
||||
dockerEnabled:
|
||||
type: boolean
|
||||
dockerEnv:
|
||||
|
||||
@@ -1378,6 +1378,9 @@ spec:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
dnsPolicy:
|
||||
description: DNSPolicy defines how a pod's DNS will be configured.
|
||||
type: string
|
||||
dockerEnabled:
|
||||
type: boolean
|
||||
dockerEnv:
|
||||
|
||||
@@ -1325,6 +1325,9 @@ spec:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
dnsPolicy:
|
||||
description: DNSPolicy defines how a pod's DNS will be configured.
|
||||
type: string
|
||||
dockerEnabled:
|
||||
type: boolean
|
||||
dockerEnv:
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user