mirror of https://github.com/k3s-io/k3s
Fix overwriting env variables in kube-apiserver manifest
parent
a29b093a56
commit
3fdb5b92f4
|
@ -1763,16 +1763,16 @@ function start-kube-apiserver {
|
||||||
|
|
||||||
local container_env=""
|
local container_env=""
|
||||||
if [[ -n "${ENABLE_CACHE_MUTATION_DETECTOR:-}" ]]; then
|
if [[ -n "${ENABLE_CACHE_MUTATION_DETECTOR:-}" ]]; then
|
||||||
container_env="\"name\": \"KUBE_CACHE_MUTATION_DETECTOR\", \"value\": \"${ENABLE_CACHE_MUTATION_DETECTOR}\""
|
container_env+="{\"name\": \"KUBE_CACHE_MUTATION_DETECTOR\", \"value\": \"${ENABLE_CACHE_MUTATION_DETECTOR}\"}"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${ENABLE_PATCH_CONVERSION_DETECTOR:-}" ]]; then
|
if [[ -n "${ENABLE_PATCH_CONVERSION_DETECTOR:-}" ]]; then
|
||||||
if [[ -n "${container_env}" ]]; then
|
if [[ -n "${container_env}" ]]; then
|
||||||
container_env="${container_env}, "
|
container_env="${container_env}, "
|
||||||
fi
|
fi
|
||||||
container_env="\"name\": \"KUBE_PATCH_CONVERSION_DETECTOR\", \"value\": \"${ENABLE_PATCH_CONVERSION_DETECTOR}\""
|
container_env+="{\"name\": \"KUBE_PATCH_CONVERSION_DETECTOR\", \"value\": \"${ENABLE_PATCH_CONVERSION_DETECTOR}\"}"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${container_env}" ]]; then
|
if [[ -n "${container_env}" ]]; then
|
||||||
container_env="\"env\":[{${container_env}}],"
|
container_env="\"env\":[${container_env}],"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local -r src_file="${src_dir}/kube-apiserver.manifest"
|
local -r src_file="${src_dir}/kube-apiserver.manifest"
|
||||||
|
|
Loading…
Reference in New Issue