kubectl run overrides envFrom doesn't add env vars #48361
Description
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
What happened:
Calling kubectl run with overrides injecting environment from configmap doesn't inject environment
What you expected to happen:
I expect to see environment variables from the config map in the process
How to reproduce it (as minimally and precisely as possible):
kubectl create configmap my-config --from-literal=FOO=BAR
kubectl run -i --rm --tty ubuntu --overrides='
{
"spec": {
"template": {
"spec": {
"containers": [
{
"name": "app",
"image": "ubuntu",
"envFrom": [
{
"configMapRef": {
"name": "my-config"
}
}
]
}
]
}
}
}
}
' --image=ubuntu --restart=Never -- bash -c "sleep 3 && env"
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version
):
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.2", GitCommit:"477efc3cbe6a7effca06bd1452fa356e2201e1ee", GitTreeState:"clean", BuildDate:"2017-04-19T22:51:55Z", GoVersion:"go1.8.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.1", GitCommit:"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e", GitTreeState:"clean", BuildDate:"2017-04-03T20:33:27Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
- Cloud provider or hardware configuration**: AWS/kops
- OS (e.g. from /etc/os-release): OSX
- Kernel (e.g.
uname -a
):
Darwin WLT041147 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
- Install tools:
- Others: