mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Enable CUSTOM_INGRESS_YAML to replace the glbc manifest
This allows for customized versions of the Ingress YAML separate from stock Kubernetes.
This commit is contained in:
parent
dc62a73742
commit
2e7807a249
@ -2413,11 +2413,19 @@ function start-lb-controller {
|
||||
prepare-log-file /var/log/glbc.log
|
||||
setup-addon-manifests "addons" "cluster-loadbalancing/glbc"
|
||||
|
||||
local -r glbc_manifest="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest"
|
||||
if [[ ! -z "${GCE_GLBC_IMAGE:-}" ]]; then
|
||||
sed -i "s@image:.*@image: ${GCE_GLBC_IMAGE}@" "${glbc_manifest}"
|
||||
local -r src_manifest="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest"
|
||||
local -r dest_manifest="/etc/kubernetes/manifests/glbc.manifest"
|
||||
|
||||
if [[ -n "${CUSTOM_INGRESS_YAML:-}" ]]; then
|
||||
echo "${CUSTOM_INGRESS_YAML}" > "${dest_manifest}"
|
||||
else
|
||||
cp "${src_manifest}" "${dest_manifest}"
|
||||
fi
|
||||
|
||||
# Override the glbc image if GCE_GLBC_IMAGE is specified.
|
||||
if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
|
||||
sed -i "s|image:.*|image: ${GCE_GLBC_IMAGE}|" "${dest_manifest}"
|
||||
fi
|
||||
cp "${glbc_manifest}" /etc/kubernetes/manifests/
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user