Refactor env.go

This copies and pastes the loop that used to exist in

func populateEnvironmentVariables(..) {
	...
	for _, env := range container.Env {
		... <--- This code
	}
}

Into getEnvironmentVariableValue. getEnvironmentVariableValue
returns val, err, where val is a pointer to a string
to indicate optionality.
This commit is contained in:
Sargun Dhillon
2020-11-13 10:29:29 -08:00
parent affbd27827
commit 06c089843e
2 changed files with 141 additions and 133 deletions

1
go.mod
View File

@@ -27,6 +27,7 @@ require (
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.0.0
k8s.io/kubernetes v1.18.4
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451
sigs.k8s.io/controller-runtime v0.6.3
)