Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MGMT-2096: fix set dns #122

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ run_full_flow_with_install: run deploy_nodes_with_install set_dns
redeploy_all_with_install: destroy run_full_flow_with_install

set_dns:
scripts/assisted_deployment.sh set_dns
scripts/assisted_deployment.sh set_dns $(shell bash scripts/utils.sh get_namespace_index $(NAMESPACE) $(OC_FLAG))

deploy_ui: start_minikube
DEPLOY_TAG=$(DEPLOY_TAG) NAMESPACE_INDEX=$(shell bash scripts/utils.sh get_namespace_index $(NAMESPACE) $(OC_FLAG)) DEPLOY_MANIFEST_PATH=$(DEPLOY_MANIFEST_PATH) DEPLOY_MANIFEST_TAG=$(DEPLOY_MANIFEST_TAG) scripts/deploy_ui.sh
Expand Down
4 changes: 2 additions & 2 deletions scripts/assisted_deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ function destroy_all() {
}

function set_dns() {
NAMESPACE_INDEX=${1:-0}
if [ "${BASE_DNS_DOMAINS}" != '""' ]; then
echo "DNS registration should be handled by assisted-service"
exit 0
fi

API_VIP=$(ip route show dev ${NETWORK_BRIDGE:-"tt0"} | cut -d\ -f7)
API_VIP=$(ip route show dev tt$NAMESPACE_INDEX | cut -d\ -f7)
FILE="/etc/NetworkManager/conf.d/dnsmasq.conf"
if ! [ -f "${FILE}" ]; then
echo -e "[main]\ndns=dnsmasq" | sudo tee $FILE
Expand Down