Set container env var using services. (#573)

* Introduce service env vars.
This commit is contained in:
Yash Desai
2019-04-17 11:30:39 -07:00
committed by Brian Goff
parent 6cb323eec2
commit de32752395
10 changed files with 1389 additions and 5 deletions

View File

@@ -25,6 +25,8 @@ const (
// For each one of these strings, a container that uses the string as its image will be appended to the pod.
// This method DOES NOT create the pod in the Kubernetes API.
func (f *Framework) CreateDummyPodObjectWithPrefix(prefix string, images ...string) *corev1.Pod {
enableServiceLink := false
pod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
GenerateName: prefix,
@@ -41,6 +43,7 @@ func (f *Framework) CreateDummyPodObjectWithPrefix(prefix string, images ...stri
Effect: corev1.TaintEffect(f.TaintEffect),
},
},
EnableServiceLinks: &enableServiceLink,
},
}
for idx, img := range images {