Skip to content

Commit

Permalink
fix: add azure dns to request object (#286)
Browse files Browse the repository at this point in the history
Co-authored-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
fnuarnav and helayoty committed Sep 9, 2022
1 parent e717a27 commit 21a8d4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/aci/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

var (
client *Client
location = "westus"
location = "eastus2"
resourceGroup = "virtual-node-test-rg"
containerGroup = "virtual-kubelet-test-container-group"
virtualNetwork = "virtual-kubelet-tests-vnet"
Expand Down Expand Up @@ -218,8 +218,8 @@ func TestCreateContainerGroupWithoutResourceLimit(t *testing.T) {
},
Resources: ResourceRequirements{
Requests: &ComputeResources{
CPU: 1,
MemoryInGB: 1,
CPU: 0.5,
MemoryInGB: 0.5,
},
},
},
Expand Down
5 changes: 5 additions & 0 deletions provider/aci.go
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,13 @@ func (p *ACIProvider) getDNSConfig(pod *v1.Pod) *aci.DNSConfig {
nameServers := make([]string, 0)
searchDomains := []string{}

// Adding default Azure dns name explicitly
// if any other dns names are provided by the user ACI will use those instead of azure dns
// which may cause issues while looking up other Azure resources
AzureDNSIP := "168.63.129.16"
if pod.Spec.DNSPolicy == v1.DNSClusterFirst || pod.Spec.DNSPolicy == v1.DNSClusterFirstWithHostNet {
nameServers = append(nameServers, p.kubeDNSIP)
nameServers = append(nameServers, AzureDNSIP)
searchDomains = p.generateSearchesForDNSClusterFirst(pod.Spec.DNSConfig, pod)
}

Expand Down

0 comments on commit 21a8d4d

Please sign in to comment.