зеркало из https://github.com/Azure/aks-engine.git
fix: go template and does not short circuit causing nil ptr (#2217)
This commit is contained in:
Родитель
8d885abef4
Коммит
26de099e87
|
@ -267,14 +267,14 @@ write_files:
|
|||
{{CloudInitData "generateProxyCertsScript"}}
|
||||
{{end}}
|
||||
|
||||
{{if and HasLinuxProfile HasCustomSearchDomain}}
|
||||
{{if HasLinuxProfile }}{{if HasCustomSearchDomain}}
|
||||
- path: /opt/azure/containers/setup-custom-search-domains.sh
|
||||
permissions: "0744"
|
||||
encoding: gzip
|
||||
owner: root
|
||||
content: !!binary |
|
||||
{{CloudInitData "customSearchDomainsScript"}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
- path: /var/lib/kubelet/kubeconfig
|
||||
permissions: "0644"
|
||||
|
|
|
@ -268,14 +268,14 @@ write_files:
|
|||
content: |
|
||||
{{WrapAsParameter "clientCertificate"}}
|
||||
|
||||
{{if and HasLinuxProfile HasCustomSearchDomain}}
|
||||
{{if HasLinuxProfile }}{{if HasCustomSearchDomain}}
|
||||
- path: /opt/azure/containers/setup-custom-search-domains.sh
|
||||
permissions: "0744"
|
||||
encoding: gzip
|
||||
owner: root
|
||||
content: !!binary |
|
||||
{{CloudInitData "customSearchDomainsScript"}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
- path: /var/lib/kubelet/kubeconfig
|
||||
permissions: "0644"
|
||||
|
|
|
@ -661,8 +661,17 @@ func TestTemplateGenerator_GetKubernetesLinuxNodeCustomDataJSONObject(t *testing
|
|||
AvailabilityProfile: api.VirtualMachineScaleSets,
|
||||
VnetCidrs: []string{"10.0.0.0/8"},
|
||||
},
|
||||
}
|
||||
return *cs
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "VMSSWithNoLinuxProfile",
|
||||
CSFactory: func() api.ContainerService {
|
||||
cs := api.CreateMockContainerService("VMSSWithNoLinuxProfile", "1.10.13", 3, 0, false)
|
||||
cs.Properties.AgentPoolProfiles = []*api.AgentPoolProfile{
|
||||
{
|
||||
Name: "pool2",
|
||||
Name: "pool1",
|
||||
Count: 1,
|
||||
OSType: api.Linux,
|
||||
VMSize: "Standard_D2_v2",
|
||||
|
@ -670,6 +679,7 @@ func TestTemplateGenerator_GetKubernetesLinuxNodeCustomDataJSONObject(t *testing
|
|||
VnetCidrs: []string{"10.0.0.0/8"},
|
||||
},
|
||||
}
|
||||
cs.Properties.LinuxProfile = nil
|
||||
return *cs
|
||||
},
|
||||
},
|
||||
|
|
|
@ -17293,14 +17293,14 @@ write_files:
|
|||
{{CloudInitData "generateProxyCertsScript"}}
|
||||
{{end}}
|
||||
|
||||
{{if and HasLinuxProfile HasCustomSearchDomain}}
|
||||
{{if HasLinuxProfile }}{{if HasCustomSearchDomain}}
|
||||
- path: /opt/azure/containers/setup-custom-search-domains.sh
|
||||
permissions: "0744"
|
||||
encoding: gzip
|
||||
owner: root
|
||||
content: !!binary |
|
||||
{{CloudInitData "customSearchDomainsScript"}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
- path: /var/lib/kubelet/kubeconfig
|
||||
permissions: "0644"
|
||||
|
@ -17935,14 +17935,14 @@ write_files:
|
|||
content: |
|
||||
{{WrapAsParameter "clientCertificate"}}
|
||||
|
||||
{{if and HasLinuxProfile HasCustomSearchDomain}}
|
||||
{{if HasLinuxProfile }}{{if HasCustomSearchDomain}}
|
||||
- path: /opt/azure/containers/setup-custom-search-domains.sh
|
||||
permissions: "0744"
|
||||
encoding: gzip
|
||||
owner: root
|
||||
content: !!binary |
|
||||
{{CloudInitData "customSearchDomainsScript"}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
- path: /var/lib/kubelet/kubeconfig
|
||||
permissions: "0644"
|
||||
|
|
Загрузка…
Ссылка в новой задаче