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

Istio Version documentation #847

Merged
merged 7 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/istio_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ACs:
- [ ] Istio module upgrades with zero downtime - https://github.com/kyma-project/istio/issues/429
- [ ] Tests and documentation updated if needed.
- [ ] Verify that sidecars are in sync with Control Plane.
- [ ] Istio and Envoy Version updated in the `README.md`. The scripts `scripts/get_module_istio_version.sh` and `scripts/get_module_envoy_version.sh` can be used to extract the versions.
triffer marked this conversation as resolved.
Show resolved Hide resolved

**DoD:**
- [ ] Provide documentation.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Istio is an open-source service mesh that provides a uniform way to manage, conn

Kyma Istio Operator is a component of the Kyma runtime that handles the management and configuration of the Istio service mesh. Within Kyma Istio Operator, [Istio Controller](/docs/user/00-10-overview-istio-controller.md) is responsible for installing, uninstalling, and upgrading Istio.

**Istio version:** 1.21.2
triffer marked this conversation as resolved.
Show resolved Hide resolved
**Envoy version:** 1.29.4

## Install Kyma Istio Operator and Istio from the latest release

### Prerequisites
Expand Down
2 changes: 1 addition & 1 deletion docs/release-notes/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

## Fixed Bugs

- Some bug fix
- Some bug fix
8 changes: 8 additions & 0 deletions scripts/create_draft_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ GITHUB_URL=https://api.github.com/repos/${REPOSITORY}
GITHUB_AUTH_HEADER="Authorization: Bearer ${GITHUB_TOKEN}"
CHANGELOG_FILE=$(cat CHANGELOG.md)
RELEASE_NOTES_FILE=$(cat "docs/release-notes/${RELEASE_TAG}.md")

ISTIO_VERSION=$("scripts/get_module_istio_version.sh")
ENVOY_VERSION=$("scripts/get_module_envoy_version.sh" $ISTIO_VERSION)

BODY="${RELEASE_NOTES_FILE}

## Versions
- Istio: ${ISTIO_VERSION}
- Envoy: ${ENVOY_VERSION}

${CHANGELOG_FILE}"

JSON_PAYLOAD=$(jq -n \
Expand Down
20 changes: 20 additions & 0 deletions scripts/get_module_envoy_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# standard bash error handling
set -o nounset # treat unset variables as an error and exit immediately.
set -o errexit # exit immediately when a command fails.
set -E # needs to be set if we want the ERR trap
set -o pipefail # prevents errors in a pipeline from being masked

if [ "$#" -lt 1 ]; then
echo "The Istio tag must be provided as the first argument"
exit 1
fi

ISTIO_TAG=$1

# The command will have a return in the following format: /usr/local/bin/envoy version: bcf6c19288e9d4a133f815657c951539018bc9bb/1.29.4-dev/Clean/RELEASE/BoringSSL
# We need to sanitize the version by removing newlines
# To avoid confusion we also remove the -dev suffix
docker run --rm --entrypoint "/usr/local/bin/envoy" europe-docker.pkg.dev/kyma-project/prod/external/istio/proxyv2:${ISTIO_TAG}-distroless --version | awk '{print $3}' | awk -F'/' '{print $2}' | tr -d '\n' | sed 's/-dev//'

14 changes: 14 additions & 0 deletions scripts/get_module_istio_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# standard bash error handling
set -o nounset # treat unset variables as an error and exit immediately.
set -o errexit # exit immediately when a command fails.
set -E # needs to be set if we want the ERR trap
set -o pipefail # prevents errors in a pipeline from being masked

# - Find the line containing the "tag:" in the the istio-operator.yaml
# - Extract the tag
# - Remove " from the string
# - Remove the -distroless in the tag
cat internal/istiooperator/istio-operator.yaml | grep "tag:" | awk '{print $2}' | tr -d '"' | awk -F'-' '{print $1}'

Loading