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

@@ -129,6 +129,7 @@ func TestExtractPodsFromHTTP(t *testing.T) {
nodeName := "different-value"
grace := int64(30)
enableServiceLinks := api.DefaultEnableServiceLinks
var testCases = []struct {
desc string
pods runtime.Object
@@ -173,6 +174,7 @@ func TestExtractPodsFromHTTP(t *testing.T) {
SecurityContext: &v1.PodSecurityContext{},
TerminationGracePeriodSeconds: &grace,
SchedulerName: api.DefaultSchedulerName,
EnableServiceLinks: &enableServiceLinks,
Containers: []v1.Container{{
Name: "1",
@@ -244,6 +246,7 @@ func TestExtractPodsFromHTTP(t *testing.T) {
TerminationGracePeriodSeconds: &grace,
SecurityContext: &v1.PodSecurityContext{},
SchedulerName: api.DefaultSchedulerName,
EnableServiceLinks: &enableServiceLinks,
Containers: []v1.Container{{
Name: "1",
@@ -272,6 +275,7 @@ func TestExtractPodsFromHTTP(t *testing.T) {
TerminationGracePeriodSeconds: &grace,
SecurityContext: &v1.PodSecurityContext{},
SchedulerName: api.DefaultSchedulerName,
EnableServiceLinks: &enableServiceLinks,
Containers: []v1.Container{{
Name: "2",