Skip to content

Commit

Permalink
fix env vars config ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Menezes committed Jan 25, 2020
1 parent b7d876a commit 4d19dca
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions pkg/model/components/etcdmanager/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,6 @@ func (b *EtcdManagerBuilder) buildPod(etcdCluster *kops.EtcdClusterSpec) (*v1.Po
container.Image = etcdCluster.Manager.Image
}

if etcdCluster.Manager != nil && len(etcdCluster.Manager.EtcdConfigOverwrite) > 0 {
for name, value := range etcdCluster.Manager.EtcdConfigOverwrite {
klog.Warningf("overloading ENV var in manifest %s with %s=%s", bundle, name, value)
configOverwrite := v1.EnvVar{
Name: name,
Value: value,
}

container.Env = append(container.Env, configOverwrite)
}
}
}

// With etcd-manager the hosts changes are self-contained, so
Expand Down Expand Up @@ -489,6 +478,18 @@ func (b *EtcdManagerBuilder) buildPod(etcdCluster *kops.EtcdClusterSpec) (*v1.Po

container.Env = envMap.ToEnvVars()

if etcdCluster.Manager != nil && len(etcdCluster.Manager.EtcdConfigOverwrite) > 0 {
for name, value := range etcdCluster.Manager.EtcdConfigOverwrite {
klog.Warningf("overloading ENV var in manifest %s with %s=%s", bundle, name, value)
configOverwrite := v1.EnvVar{
Name: name,
Value: value,
}

container.Env = append(container.Env, configOverwrite)
}
}

{
foundPKI := false
for i := range pod.Spec.Volumes {
Expand Down

0 comments on commit 4d19dca

Please sign in to comment.