Skip to content

Commit

Permalink
Bug 1880902 - If the endpoint publishing strategy type is set to host…
Browse files Browse the repository at this point in the history
… network then

we should automatically set the dnsPolicy with ClusterFirstWithHostNet.
  • Loading branch information
miheer committed Nov 17, 2020
1 parent 87c0acd commit ce85eed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/operator/controller/ingress/deployment.go
Expand Up @@ -386,6 +386,7 @@ func desiredRouterDeployment(ci *operatorv1.IngressController, ingressController
// problems or firewall restrictions.
deployment.Spec.Template.Spec.Containers[0].LivenessProbe.Handler.HTTPGet.Host = "localhost"
deployment.Spec.Template.Spec.Containers[0].ReadinessProbe.Handler.HTTPGet.Host = "localhost"
deployment.Spec.Template.Spec.DNSPolicy = "ClusterFirstWithHostNet"
}

// Fill in the default certificate secret name.
Expand Down Expand Up @@ -1007,6 +1008,7 @@ func deploymentConfigChanged(current, expected *appsv1.Deployment) (bool, *appsv
updated.Spec.Template.Spec.Containers = containers
updated.Spec.Template.Labels = expected.Spec.Template.Labels
updated.Spec.Strategy = expected.Spec.Strategy
updated.Spec.Template.Spec.DNSPolicy = expected.Spec.Template.Spec.DNSPolicy
volumes := make([]corev1.Volume, len(expected.Spec.Template.Spec.Volumes))
for i, vol := range expected.Spec.Template.Spec.Volumes {
volumes[i] = *vol.DeepCopy()
Expand Down

0 comments on commit ce85eed

Please sign in to comment.