Skip to content

Commit

Permalink
fix: add https prefix to the first host to make host clickable (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
Monska85 authored Aug 26, 2024
1 parent 3523d73 commit 4cc1f5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bash_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function print-basic-auth() {
echo "Discovering configured ingresses in namespace: ${CURRENT_NAMESPACE}"

for INGRESS in $(kubectl --namespace "${CURRENT_NAMESPACE}" get ingresses -o jsonpath='{.items[*].metadata.name}'); do
FIRST_HOST=$(kubectl --namespace "${CURRENT_NAMESPACE}" get ingress "${INGRESS}" -o jsonpath="{.spec.rules[0].host}")
FIRST_HOST="https://$(kubectl --namespace "${CURRENT_NAMESPACE}" get ingress "${INGRESS}" -o jsonpath="{.spec.rules[0].host}")"
SECRET=$(kubectl --namespace "${CURRENT_NAMESPACE}" get ingress "${INGRESS}" -o jsonpath="{.metadata.annotations.nginx\\.ingress\\.kubernetes\\.io/auth-secret}")
if [ -z "${SECRET}" ]; then
echo "No auth secret found for ingress ${INGRESS} (${FIRST_HOST})"
Expand Down

0 comments on commit 4cc1f5a

Please sign in to comment.