mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-01 01:08:55 +00:00
trimspace on user specified env params
Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
This commit is contained in:
@@ -43,7 +43,7 @@ func SetEnvParams() *EnvParams {
|
||||
}
|
||||
|
||||
for k := range envParams {
|
||||
if v := os.Getenv(fmt.Sprintf("KUBE_%s", strings.ToUpper(k))); v != "" {
|
||||
if v := strings.TrimSpace(os.Getenv(fmt.Sprintf("KUBE_%s", strings.ToUpper(k)))); v != "" {
|
||||
envParams[k] = v
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user