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

Special case default revision for trust domain patching #1014

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
15 changes: 14 additions & 1 deletion asmcli/asmcli

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion asmcli/components/ca/mesh-ca.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ EOF
if [[ "$ISTIOD_COUNT" -ne 0 ]]; then
local REVISION; REVISION="$(retry 2 kubectl -n istio-system get pod -l app=istiod \
-o jsonpath='{.items[].spec.containers[].env[?(@.name=="REVISION")].value}')"
local RAW_TRUST_DOMAINS_ALIASES; RAW_TRUST_DOMAINS_ALIASES="$(retry 2 kubectl -n istio-system get configmap istio-"${REVISION}" \

if [[ -z "${REVISION}" || "${REVISION}" = default ]]; then
REVISION=""
else
REVISION="-${REVISION}"
fi

local RAW_TRUST_DOMAINS_ALIASES; RAW_TRUST_DOMAINS_ALIASES="$(retry 2 kubectl -n istio-system get configmap istio"${REVISION}" \
-o jsonpath='{.data.mesh}' | sed -e '1,/trustDomainAliases:/ d')"
local RAW_TRUST_DOMAINS_ALIAS;
while IFS= read -r RAW_TRUST_DOMAINS_ALIAS; do
Expand Down
6 changes: 6 additions & 0 deletions asmcli/lib/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ run_command() {
"${@}" 2>/dev/null
return "$?"
fi

if [[ -n "${BASH_VERSION}" ]]; then
info "${BASH_LINENO[0]} Running: '${*}'"
else
info "Running: '${*}'"
fi

info "-------------"
local RETVAL
{ "${@}"; RETVAL="$?"; } || true
Expand Down