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

@@ -151,6 +151,7 @@ func randomUID() types.UID {
func generateDeployment(image string) apps.Deployment {
podLabels := map[string]string{"name": image}
terminationSec := int64(30)
enableServiceLinks := v1.DefaultEnableServiceLinks
return apps.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: image,
@@ -176,6 +177,7 @@ func generateDeployment(image string) apps.Deployment {
TerminationGracePeriodSeconds: &terminationSec,
RestartPolicy: v1.RestartPolicyAlways,
SecurityContext: &v1.PodSecurityContext{},
EnableServiceLinks: &enableServiceLinks,
},
},
},