Environment Variable Interpolation is Order Dependent #90466
Labels
kind/documentation
Categorizes issue or PR as related to documentation.
sig/apps
Categorizes an issue or PR as relevant to SIG Apps.
What happened:
Variables are not interpolated when the variable assignment is ordered after the variable use.
What you expected to happen:
I would expect variable interpolation to succeed regardless of the order of the variables.
How to reproduce it (as minimally and precisely as possible):
Define variables for a container spec in the following order:
value: $(var1).testString2
value: testString1
Check the values of the variables inside the container and this is the result:
var1=testString1
var2='$(var1).testString2'
Anything else we need to know?:
Swapping the variable order resolves the issue.
Environment:
Kubernetes version (use
kubectl version
):Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"9e991415386e4cf155a24b1da15becaa390438d8", GitTreeState:"clean", BuildDate:"2020-03-25T14:58:59Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.10-eks-bac369", GitCommit:"bac3690554985327ae4d13e42169e8b1c2f37226", GitTreeState:"clean", BuildDate:"2020-02-26T01:12:54Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
Cloud provider or hardware configuration:
AWS EKS
OS (e.g:
cat /etc/os-release
):NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.9.4
PRETTY_NAME="Alpine Linux v3.9"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
Kernel (e.g.
uname -a
):Linux netshoot-6df4df959b-mwhkh 4.14.173-137.229.amzn2.x86_64 Unit test coverage in Kubelet is lousy. (~30%) #1 SMP Wed Apr 1 18:06:08 UTC 2020 x86_64 Linux
Install tools:
Network plugin and version (if this is a network-related bug):
Others:
The text was updated successfully, but these errors were encountered: