kubelet: Make service environment variables optional

This commit is contained in:
Brad Hoekstra
2018-09-17 16:27:36 -04:00
parent 690179b122
commit ac8799a80d
43 changed files with 1413 additions and 867 deletions

View File

@@ -1370,3 +1370,11 @@ func TestSetDefaultHostPathVolumeSource(t *testing.T) {
t.Errorf("Expected v1.HostPathVolumeSource default type %v, got %v", expectedType, defaultType)
}
}
func TestSetDefaultEnableServiceLinks(t *testing.T) {
pod := &v1.Pod{}
output := roundTrip(t, runtime.Object(pod)).(*v1.Pod)
if output.Spec.EnableServiceLinks == nil || *output.Spec.EnableServiceLinks != v1.DefaultEnableServiceLinks {
t.Errorf("Expected enableServiceLinks value: %+v\ngot: %+v\n", v1.DefaultEnableServiceLinks, *output.Spec.EnableServiceLinks)
}
}