Skip to content

Commit 67d6a91

Browse files
authored
Kubernetes: update local configuration (ITISFoundation#1152)
Add missing required hosts * https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/merge_requests/1520
1 parent e4bd11b commit 67d6a91

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

charts/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ helmfile-sync: .check-helmfile-installed helmfile.yaml ## Syncs the helmfile con
5050
fi
5151

5252
.PHONY: configure-local-hosts
53-
configure-local-hosts: ## Adds local hosts entries for the machine
54-
@echo "Adding $(MACHINE_FQDN) hosts to /etc/hosts ..."
55-
@grep -q '127.0.0.1 k8s.monitoring.$(MACHINE_FQDN)' /etc/hosts || echo '127.0.0.1 k8s.monitoring.$(MACHINE_FQDN)' | sudo tee -a /etc/hosts
53+
configure-local-hosts: $(REPO_CONFIG_LOCATION) ## Adds local hosts entries for the machine
54+
# "Updating /etc/hosts with k8s $(MACHINE_FQDN) hosts ..."
55+
@set -a; source $(REPO_CONFIG_LOCATION); set +a; \
56+
grep -q "127.0.0.1 $$K8S_MONITORING_FQDN" /etc/hosts || echo "127.0.0.1 $$K8S_MONITORING_FQDN" | sudo tee -a /etc/hosts
57+
@set -a; source $(REPO_CONFIG_LOCATION); set +a; \
58+
grep -q "127.0.0.1 $$K8S_PRIVATE_FQDN" /etc/hosts || echo "127.0.0.1 $$K8S_PRIVATE_FQDN" | sudo tee -a /etc/hosts
5659

5760
.PHONY: helmfile-diff
5861
helmfile-diff: .check-helmfile-installed helmfile.yaml ## Shows the differences that would be applied by helmfile

0 commit comments

Comments
 (0)