Merge branch 'master' into patch-1

This commit is contained in:
Jeremy Rickard
2018-08-07 08:51:41 -06:00
committed by GitHub

View File

@@ -676,9 +676,11 @@ func (p *ACIProvider) getContainers(pod *v1.Pod) ([]aci.Container, error) {
c.EnvironmentVariables = make([]aci.EnvironmentVariable, 0, len(container.Env))
for _, e := range container.Env {
if e.Value != "" {
envVar := getACIEnvVar(e)
c.EnvironmentVariables = append(c.EnvironmentVariables, envVar)
}
}
// NOTE(robbiezhang): ACI CPU request must be times of 10m
cpuRequest := 1.00
@@ -1116,7 +1118,7 @@ func filterServiceAccountSecretVolume(osType string, containerGroup *aci.Contain
func getACIEnvVar(e v1.EnvVar) aci.EnvironmentVariable {
var envVar aci.EnvironmentVariable
// If the variable is a secret, use SecureValue
if e.ValueFrom.SecretKeyRef != nil {
if e.ValueFrom != nil && e.ValueFrom.SecretKeyRef != nil {
envVar = aci.EnvironmentVariable{
Name: e.Name,
SecureValue: e.Value,