Skip to content

Commit 21308c3

Browse files
committed
Update Istio test versions and doc
1 parent 3f94232 commit 21308c3

File tree

7 files changed

+156
-18
lines changed

7 files changed

+156
-18
lines changed

.github/workflows/istio-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
matrix:
3939
istioVersion:
4040
- latest
41-
- 1.18.2
42-
- 1.17.5
41+
- 1.23.4
42+
- 1.22.8
4343

4444
steps:
4545
- uses: actions/checkout@v4

Makefile

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ KUBERNETES_DOC_VERSION=v1.30
4040
# ----------------------------------------------------------------------------------------------------------------------
4141
# The Coherence version to build against - must be a Java 8 compatible version
4242
COHERENCE_VERSION ?= 21.12.5
43-
COHERENCE_VERSION_LTS ?= 14.1.2-0-0
43+
COHERENCE_VERSION_LTS ?= 14.1.2-0-1
4444
# The default Coherence image the Operator will run if no image is specified
4545
COHERENCE_IMAGE_REGISTRY ?= ghcr.io/oracle
4646
COHERENCE_IMAGE_NAME ?= coherence-ce
@@ -358,7 +358,18 @@ METALLB_VERSION ?= v0.12.1
358358
# Istio settings
359359
# ----------------------------------------------------------------------------------------------------------------------
360360
# The version of Istio to install, leave empty for the latest
361-
ISTIO_VERSION ?=
361+
ISTIO_VERSION ?=
362+
ISTIO_PROFILE ?= demo
363+
ISTIO_USE_CONFIG ?= false
364+
ifeq (,$(ISTIO_VERSION))
365+
ISTIO_VERSION_USE := $(shell $(SCRIPTS_DIR)/find-istio-version.sh "$(TOOLS_DIRECTORY)/istio-latest.txt")
366+
ISTIO_REVISION := $(subst .,-,$(ISTIO_VERSION_USE))
367+
ISTIO_HOME := $(TOOLS_DIRECTORY)/istio-$(ISTIO_VERSION_USE)
368+
else
369+
ISTIO_VERSION_USE := $(ISTIO_VERSION)
370+
ISTIO_REVISION := $(subst .,-,$(ISTIO_VERSION))
371+
ISTIO_HOME := $(TOOLS_DIRECTORY)/istio-$(ISTIO_VERSION)
372+
endif
362373

363374
# ----------------------------------------------------------------------------------------------------------------------
364375
# Tanzu settings
@@ -415,6 +426,9 @@ $(BUILD_PROPS):
415426
OPERATOR_IMAGE_NAME=$(OPERATOR_IMAGE_NAME)\n\
416427
OPERATOR_IMAGE=$(OPERATOR_IMAGE)\n\
417428
VERSION=$(VERSION)\n\
429+
ISTIO_VERSION_USE=$(ISTIO_VERSION_USE)\n\
430+
ISTIO_REVISION=$(ISTIO_REVISION)\n\
431+
ISTIO_PROFILE=$(ISTIO_PROFILE)\n\
418432
OPERATOR_PACKAGE_IMAGE=$(OPERATOR_PACKAGE_IMAGE)\n" > $(BUILD_PROPS)
419433

420434
# ----------------------------------------------------------------------------------------------------------------------
@@ -1739,6 +1753,7 @@ k3d-create: $(TOOLS_BIN)/k3d ## Create the k3d cluster
17391753
--registry-use $(K3D_INTERNAL_REGISTRY) --no-lb \
17401754
--runtime-ulimit "nofile=64000:64000" --runtime-ulimit "nproc=64000:64000" \
17411755
--api-port 127.0.0.1:6550
1756+
$(SCRIPTS_DIR)/k3d-label-node.sh
17421757

17431758
.PHONY: k3d-stop
17441759
k3d-stop: $(TOOLS_BIN)/k3d ## Stop a default k3d cluster
@@ -2273,39 +2288,53 @@ uninstall-metallb: ## Uninstall MetalLB
22732288
# Install the latest Istio version
22742289
# ----------------------------------------------------------------------------------------------------------------------
22752290
.PHONY: install-istio
2276-
install-istio: get-istio ## Install the latest version of Istio into k8s (or override the version using the ISTIO_VERSION env var)
2277-
$(eval ISTIO_HOME := $(shell find $(TOOLS_DIRECTORY) -maxdepth 1 -type d | grep istio))
2278-
$(ISTIO_HOME)/bin/istioctl install --set profile=demo -y
2279-
kubectl -n istio-system wait --for condition=available deployment.apps/istiod
2291+
install-istio: delete-istio-config get-istio ## Install the latest version of Istio into k8s (or override the version using the ISTIO_VERSION env var)
2292+
$(ISTIO_HOME)/bin/istioctl install -f $(BUILD_OUTPUT)/istio-config.yaml -y
2293+
kubectl -n istio-system wait --for condition=available deployment.apps/istiod-$(ISTIO_REVISION)
22802294
kubectl -n istio-system wait --for condition=available deployment.apps/istio-ingressgateway
22812295
kubectl -n istio-system wait --for condition=available deployment.apps/istio-egressgateway
2282-
kubectl apply -f ./hack/istio-strict.yaml
2283-
kubectl -n $(OPERATOR_NAMESPACE) apply -f ./hack/istio-operator.yaml
2296+
kubectl apply -f $(SCRIPTS_DIR)/istio-strict.yaml
2297+
kubectl -n $(OPERATOR_NAMESPACE) apply -f $(SCRIPTS_DIR)/istio-operator.yaml
22842298
kubectl label namespace $(OPERATOR_NAMESPACE) istio-injection=enabled --overwrite=true
22852299
kubectl label namespace $(OPERATOR_NAMESPACE_CLIENT) istio-injection=enabled --overwrite=true
22862300
kubectl label namespace $(CLUSTER_NAMESPACE) istio-injection=enabled --overwrite=true
22872301
kubectl apply -f $(ISTIO_HOME)/samples/addons
22882302

2303+
# ----------------------------------------------------------------------------------------------------------------------
2304+
# Upgrade Istio
2305+
# ----------------------------------------------------------------------------------------------------------------------
2306+
.PHONY: upgrade-istio
2307+
upgrade-istio: delete-istio-config $(BUILD_OUTPUT)/istio-config.yaml ## Upgrade an already installed Istio to the Istio version specified by ISTIO_VERSION
2308+
$(ISTIO_HOME)/bin/istioctl upgrade -f $(SCRIPTS_DIR)/istio-config.yaml -y
2309+
22892310
# ----------------------------------------------------------------------------------------------------------------------
22902311
# Uninstall Istio
22912312
# ----------------------------------------------------------------------------------------------------------------------
22922313
.PHONY: uninstall-istio
2293-
uninstall-istio: get-istio ## Uninstall Istio from k8s
2294-
kubectl -n $(OPERATOR_NAMESPACE) delete -f ./hack/istio-operator.yaml || true
2295-
kubectl delete -f ./hack/istio-strict.yaml
2296-
$(eval ISTIO_HOME := $(shell find $(TOOLS_DIRECTORY) -maxdepth 1 -type d | grep istio))
2314+
uninstall-istio: delete-istio-config get-istio ## Uninstall Istio from k8s
2315+
kubectl -n $(OPERATOR_NAMESPACE) delete -f $(SCRIPTS_DIR)/istio-operator.yaml || true
2316+
kubectl delete -f ./hack/istio-strict.yaml || true
22972317
$(ISTIO_HOME)/bin/istioctl uninstall --purge -y
22982318

2319+
$(BUILD_OUTPUT)/istio-config.yaml: $(BUILD_PROPS)
2320+
@echo "Creating Istio config: rev=$(ISTIO_REVISION)"
2321+
cp $(SCRIPTS_DIR)/istio-config.yaml $(BUILD_OUTPUT)/istio-config.yaml
2322+
$(SED) -e 's/ISTIO_PROFILE/$(ISTIO_PROFILE)/g' $(BUILD_OUTPUT)/istio-config.yaml
2323+
$(SED) -e 's/ISTIO_REVISION/$(ISTIO_REVISION)/g' $(BUILD_OUTPUT)/istio-config.yaml
2324+
2325+
.PHONY: delete-istio-config
2326+
delete-istio-config:
2327+
rm $(BUILD_OUTPUT)/istio-config.yaml || true
22992328

23002329
# ----------------------------------------------------------------------------------------------------------------------
23012330
# Get the latest Istio version
23022331
# ----------------------------------------------------------------------------------------------------------------------
23032332
.PHONY: get-istio
2304-
get-istio: $(BUILD_PROPS)
2305-
$(SCRIPTS_DIR)/get-istio-latest.sh "$(ISTIO_VERSION)" "$(TOOLS_DIRECTORY)"
2306-
$(eval ISTIO_HOME := $(shell find $(TOOLS_DIRECTORY) -maxdepth 1 -type d | grep istio))
2333+
get-istio: $(BUILD_PROPS) $(BUILD_OUTPUT)/istio-config.yaml ## Download Istio to the build/tools/istio-* directory
2334+
$(SCRIPTS_DIR)/get-istio-latest.sh "$(ISTIO_VERSION_USE)" "$(TOOLS_DIRECTORY)"
23072335
@echo "Istio installed at $(ISTIO_HOME)"
23082336

2337+
23092338
# ----------------------------------------------------------------------------------------------------------------------
23102339
# Obtain the golangci-lint binary
23112340
# ----------------------------------------------------------------------------------------------------------------------

examples/400_Istio/README.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ Coherence clusters can be manually configured to work with Istio, even if not us
2525
See the Istio example in the <<examples/no-operator/04_istio/README.adoc,No Operator Examples>>
2626
====
2727
28+
[IMPORTANT]
29+
====
30+
*Upgrading Istio*
31+
32+
The Istio documentations states that the recommended way to upgrade Istio is to use
33+
https://istio.io/latest/docs/setup/upgrade/canary/[Istio revisions and canary upgrades].
34+
If Istio is upgraded using a simple in-place upgrade option this will cause Coherence Pods to have communication issues
35+
and ultimately make the Coherence cluster unusable. This is because an in-place Istio upgrade will cause the Istio Proxy
36+
in the side-car containers to receive config updates and then to drain all the TCP connections it is managing, hence
37+
causing Coherence containers to disconnect from each other.
38+
39+
This issue is not just related to Coherence but can impact any long-lived TCP connections, for example connections to a database.
40+
41+
If you are using Istio in a managed environment where you do not control its life-cycle, you must ensure that the people
42+
that are responsible for managing Istio use the recommended upgrade approach.
43+
====
44+
2845
=== How Does Coherence Work with Istio?
2946
3047
Istio is a "Service Mesh" so the clue to how Istio works in Kubernetes is in the name, it relies on the configuration

hack/find-istio-version.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
#
3+
# Copyright (c) 2025, Oracle and/or its affiliates.
4+
# Licensed under the Universal Permissive License v 1.0 as shown at
5+
# http://oss.oracle.com/licenses/upl.
6+
#
7+
8+
ISTIO_VERSION_FILE=$1
9+
ISTIO_VERSION=""
10+
11+
if [ -e $1 ]
12+
then
13+
ISTIO_VERSION=$(cat $1)
14+
else
15+
if [ "${ISTIO_VERSION}" = "" -o "${ISTIO_VERSION}" = "latest" ]
16+
then
17+
ISTIO_VERSION="$(curl -sL https://github.com/istio/istio/releases | \
18+
grep -o 'releases/[0-9]*.[0-9]*.[0-9]*/' | sort --version-sort | \
19+
tail -1 | awk -F'/' '{ print $2}')"
20+
ISTIO_VERSION="${ISTIO_VERSION##*/}"
21+
echo ${ISTIO_VERSION} > $1
22+
fi
23+
fi
24+
25+
echo ${ISTIO_VERSION}

hack/get-istio-latest.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ ISTIO_HOME=${TOOLS_DIRECTORY}/istio-${ISTIO_VERSION}
2424

2525
if [ ! -d "${ISTIO_HOME}" ]; then
2626
echo "Istio will be installed into ${ISTIO_HOME}"
27-
rm -rf "${TOOLS_DIRECTORY}"/istio-*
2827
mkdir -p "${ISTIO_HOME}" || true
2928
curl -sL https://istio.io/downloadIstio | ISTIO_VERSION=${ISTIO_VERSION} sh -
3029
fi

hack/istio-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apiVersion: install.istio.io/v1alpha1
2+
kind: IstioOperator
3+
metadata:
4+
namespace: istio-system
5+
spec:
6+
profile: ISTIO_PROFILE
7+
revision: ISTIO_REVISION
8+
# Turn on default components: base, pilot, and ingress gateway
9+
components:
10+
base:
11+
enabled: true
12+
pilot:
13+
enabled: true
14+
k8s:
15+
podDisruptionBudget:
16+
minAvailable: 1
17+
hpaSpec:
18+
minReplicas: 2
19+
# Istio Gateway feature
20+
ingressGateways:
21+
- name: istio-ingressgateway
22+
enabled: true
23+
egressGateways:
24+
- name: istio-egressgateway
25+
enabled: true
26+
27+
# Most default values come from the helm chart's values.yaml
28+
# Below are the things that differ
29+
values:
30+
defaultRevision: ""
31+
global:
32+
istioNamespace: istio-system
33+
configValidation: true
34+
gateways:
35+
istio-ingressgateway: {}
36+
istio-egressgateway: {}

hack/k3d-label-node.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
kubectl label node k3d-operator-agent-0 topology.kubernetes.io/zone=zone-one --overwrite
4+
kubectl label node k3d-operator-agent-0 topology.kubernetes.io/region=one --overwrite
5+
kubectl label node k3d-operator-agent-0 oci.oraclecloud.com/fault-domain=fd-one --overwrite
6+
kubectl label node k3d-operator-agent-0 coherence.oracle.com/test=test-one --overwrite
7+
8+
kubectl label node k3d-operator-agent-1 topology.kubernetes.io/zone=zone-one --overwrite
9+
kubectl label node k3d-operator-agent-1 topology.kubernetes.io/region=one --overwrite
10+
kubectl label node k3d-operator-agent-1 oci.oraclecloud.com/fault-domain=fd-one --overwrite
11+
kubectl label node k3d-operator-agent-1 coherence.oracle.com/test=test-one --overwrite
12+
13+
kubectl label node k3d-operator-agent-2 topology.kubernetes.io/zone=zone-two --overwrite || true
14+
kubectl label node k3d-operator-agent-2 topology.kubernetes.io/region=two --overwrite || true
15+
kubectl label node k3d-operator-agent-2 oci.oraclecloud.com/fault-domain=fd-two --overwrite || true
16+
kubectl label node k3d-operator-agent-2 coherence.oracle.com/test=test-two --overwrite || true
17+
18+
kubectl label node k3d-operator-agent-3 topology.kubernetes.io/zone=zone-two --overwrite || true
19+
kubectl label node k3d-operator-agent-3 topology.kubernetes.io/region=two --overwrite || true
20+
kubectl label node k3d-operator-agent-3 oci.oraclecloud.com/fault-domain=fd-two --overwrite || true
21+
kubectl label node k3d-operator-agent-3 coherence.oracle.com/test=test-two --overwrite || true
22+
23+
kubectl label node k3d-operator-agent-4 topology.kubernetes.io/zone=zone-three --overwrite || true
24+
kubectl label node k3d-operator-agent-4 topology.kubernetes.io/region=three --overwrite || true
25+
kubectl label node k3d-operator-agent-4 oci.oraclecloud.com/fault-domain=fd-three --overwrite || true
26+
kubectl label node k3d-operator-agent-4 coherence.oracle.com/test=test-three --overwrite || true
27+
28+
kubectl label node k3d-operator-server-0 topology.kubernetes.io/zone=zone-three --overwrite || true
29+
kubectl label node k3d-operator-server-0 topology.kubernetes.io/region=three --overwrite || true
30+
kubectl label node k3d-operator-server-0 oci.oraclecloud.com/fault-domain=fd-three --overwrite || true
31+
kubectl label node k3d-operator-server-0 coherence.oracle.com/test=test-three --overwrite || true
32+

0 commit comments

Comments
 (0)