We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 261bcec commit 56ebfebCopy full SHA for 56ebfeb
1 file changed
src/cluster_manager.sh
@@ -118,6 +118,11 @@ _add_node() {
118
local mount_opts=""
119
if [ "${EXPOSE_KUBEAPI_PORT}" = "1" ]; then
120
port_opts="-p ${API_SERVER_PORT}:${API_SERVER_PORT}"
121
+ sudo mkdir -p "$(dirname "${EXTRA_CONFIG}")"
122
+ if ! echo -e "apiServer:\n subjectAltNames:\n - $(_get_hostname)" | sudo tee "${EXTRA_CONFIG}" >/dev/null; then
123
+ echo "ERROR: Failed to write API server configuration to ${EXTRA_CONFIG}" >&2
124
+ exit 1
125
+ fi
126
echo -e "apiServer:\n subjectAltNames:\n - $(_get_hostname)" | sudo tee "${EXTRA_CONFIG}" >/dev/null
127
mount_opts="--volume ${EXTRA_CONFIG}:/etc/microshift/config.d/api_server.yaml:ro"
128
fi
0 commit comments