mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-01 09:18:45 +00:00
Merge pull request #63847 from bowei/custom-ingress
Automatic merge from submit-queue (batch tested with PRs 63589, 63644, 63861, 63872, 63847). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Enable CUSTOM_INGRESS_YAML to replace the glbc manifest This allows for customized versions of the Ingress YAML separate from stock Kubernetes. ```release-note NONE ```
This commit is contained in:
@@ -2413,11 +2413,19 @@ function start-lb-controller {
|
|||||||
prepare-log-file /var/log/glbc.log
|
prepare-log-file /var/log/glbc.log
|
||||||
setup-addon-manifests "addons" "cluster-loadbalancing/glbc"
|
setup-addon-manifests "addons" "cluster-loadbalancing/glbc"
|
||||||
|
|
||||||
local -r glbc_manifest="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest"
|
local -r src_manifest="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest"
|
||||||
if [[ ! -z "${GCE_GLBC_IMAGE:-}" ]]; then
|
local -r dest_manifest="/etc/kubernetes/manifests/glbc.manifest"
|
||||||
sed -i "s@image:.*@image: ${GCE_GLBC_IMAGE}@" "${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
|
fi
|
||||||
cp "${glbc_manifest}" /etc/kubernetes/manifests/
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user