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

Fixing issue with missing istiod-remote chart when adding new versions #464

Merged
merged 1 commit into from
Nov 4, 2024
Merged
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
9 changes: 8 additions & 1 deletion hack/update-istio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ VERSIONS_YAML_FILE=${VERSIONS_YAML_FILE:-"versions.yaml"}
# The new entry will be placed immediately before the old one
function add_stable_version() {
echo "Adding new stable version: ${1}"
# we want to add the istiod-remote chart only for 1.23
istiod_remote_line=""
if [[ ${1} == 1.23.* ]]
then
istiod_remote_line="\"https://istio-release.storage.googleapis.com/charts/istiod-remote-${1}.tgz\","
fi
template=$(cat <<-END
{
"name": "v${1}",
Expand All @@ -35,14 +41,15 @@ function add_stable_version() {
"charts": [
"https://istio-release.storage.googleapis.com/charts/base-${1}.tgz",
"https://istio-release.storage.googleapis.com/charts/istiod-${1}.tgz",
"https://istio-release.storage.googleapis.com/charts/istiod-remote-${1}.tgz",
${istiod_remote_line}
"https://istio-release.storage.googleapis.com/charts/gateway-${1}.tgz",
"https://istio-release.storage.googleapis.com/charts/cni-${1}.tgz",
"https://istio-release.storage.googleapis.com/charts/ztunnel-${1}.tgz"
]
}
END
)

# Insert the new key above the old one (https://stackoverflow.com/questions/74368503/is-it-possible-to-insert-an-element-into-a-middle-of-array-in-yaml-using-yq)
# shellcheck disable=SC2016
yq -i '.versions |= (
Expand Down