Revert "Add HOSTNAME to env by default for pod containers"

This reverts commit 4c3e195db3.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2018-09-06 15:30:42 -07:00
parent db8500d10c
commit eb3d3cfc5e

View File

@ -342,8 +342,6 @@ func (c *criService) generateContainerSpec(id string, sandboxID string, sandboxP
for _, e := range config.GetEnvs() { for _, e := range config.GetEnvs() {
g.AddProcessEnv(e.GetKey(), e.GetValue()) g.AddProcessEnv(e.GetKey(), e.GetValue())
} }
// add the HOSTNAME variable to the environment to match Docker runtime default
g.AddProcessEnv("HOSTNAME", sandboxConfig.GetHostname())
securityContext := config.GetLinux().GetSecurityContext() securityContext := config.GetLinux().GetSecurityContext()
selinuxOpt := securityContext.GetSelinuxOptions() selinuxOpt := securityContext.GetSelinuxOptions()