kubelet: Make service environment variables optional
This commit is contained in:
@@ -37,6 +37,7 @@ func noDefault(*core.Pod) error { return nil }
|
||||
|
||||
func TestDecodeSinglePod(t *testing.T) {
|
||||
grace := int64(30)
|
||||
enableServiceLinks := core.DefaultEnableServiceLinks
|
||||
pod := &v1.Pod{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: "",
|
||||
@@ -58,8 +59,9 @@ func TestDecodeSinglePod(t *testing.T) {
|
||||
TerminationMessagePolicy: v1.TerminationMessageReadFile,
|
||||
SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(),
|
||||
}},
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
SchedulerName: core.DefaultSchedulerName,
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
SchedulerName: core.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
}
|
||||
json, err := runtime.Encode(testapi.Default.Codec(), pod)
|
||||
@@ -99,6 +101,7 @@ func TestDecodeSinglePod(t *testing.T) {
|
||||
|
||||
func TestDecodePodList(t *testing.T) {
|
||||
grace := int64(30)
|
||||
enableServiceLinks := core.DefaultEnableServiceLinks
|
||||
pod := &v1.Pod{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: "",
|
||||
@@ -121,8 +124,9 @@ func TestDecodePodList(t *testing.T) {
|
||||
|
||||
SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(),
|
||||
}},
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
SchedulerName: core.DefaultSchedulerName,
|
||||
SecurityContext: &v1.PodSecurityContext{},
|
||||
SchedulerName: core.DefaultSchedulerName,
|
||||
EnableServiceLinks: &enableServiceLinks,
|
||||
},
|
||||
}
|
||||
podList := &v1.PodList{
|
||||
|
Reference in New Issue
Block a user