Skip to content

Commit 2d15140

Browse files
authored
Update Istio test versions and Istio docs (#688)
1 parent 3f94232 commit 2d15140

File tree

7 files changed

+164
-20
lines changed

7 files changed

+164
-20
lines changed

.github/workflows/istio-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
1+
# Copyright 2019, 2025, Oracle Corporation and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at
33
# http://oss.oracle.com/licenses/upl.
44

@@ -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: 50 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,24 @@ 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+
ifeq (latest,$(ISTIO_VERSION))
370+
ISTIO_VERSION_USE := $(shell $(SCRIPTS_DIR)/find-istio-version.sh "$(TOOLS_DIRECTORY)/istio-latest.txt")
371+
ISTIO_REVISION := $(subst .,-,$(ISTIO_VERSION_USE))
372+
ISTIO_HOME := $(TOOLS_DIRECTORY)/istio-$(ISTIO_VERSION_USE)
373+
else
374+
ISTIO_VERSION_USE := $(ISTIO_VERSION)
375+
ISTIO_REVISION := $(subst .,-,$(ISTIO_VERSION))
376+
ISTIO_HOME := $(TOOLS_DIRECTORY)/istio-$(ISTIO_VERSION)
377+
endif
378+
endif
362379

363380
# ----------------------------------------------------------------------------------------------------------------------
364381
# Tanzu settings
@@ -415,6 +432,9 @@ $(BUILD_PROPS):
415432
OPERATOR_IMAGE_NAME=$(OPERATOR_IMAGE_NAME)\n\
416433
OPERATOR_IMAGE=$(OPERATOR_IMAGE)\n\
417434
VERSION=$(VERSION)\n\
435+
ISTIO_VERSION_USE=$(ISTIO_VERSION_USE)\n\
436+
ISTIO_REVISION=$(ISTIO_REVISION)\n\
437+
ISTIO_PROFILE=$(ISTIO_PROFILE)\n\
418438
OPERATOR_PACKAGE_IMAGE=$(OPERATOR_PACKAGE_IMAGE)\n" > $(BUILD_PROPS)
419439

420440
# ----------------------------------------------------------------------------------------------------------------------
@@ -1739,6 +1759,7 @@ k3d-create: $(TOOLS_BIN)/k3d ## Create the k3d cluster
17391759
--registry-use $(K3D_INTERNAL_REGISTRY) --no-lb \
17401760
--runtime-ulimit "nofile=64000:64000" --runtime-ulimit "nproc=64000:64000" \
17411761
--api-port 127.0.0.1:6550
1762+
$(SCRIPTS_DIR)/k3d-label-node.sh
17421763

17431764
.PHONY: k3d-stop
17441765
k3d-stop: $(TOOLS_BIN)/k3d ## Stop a default k3d cluster
@@ -2273,39 +2294,53 @@ uninstall-metallb: ## Uninstall MetalLB
22732294
# Install the latest Istio version
22742295
# ----------------------------------------------------------------------------------------------------------------------
22752296
.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
2297+
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)
2298+
$(ISTIO_HOME)/bin/istioctl install -f $(BUILD_OUTPUT)/istio-config.yaml -y
2299+
kubectl -n istio-system wait --for condition=available deployment.apps/istiod-$(ISTIO_REVISION)
22802300
kubectl -n istio-system wait --for condition=available deployment.apps/istio-ingressgateway
22812301
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
2302+
kubectl apply -f $(SCRIPTS_DIR)/istio-strict.yaml
2303+
kubectl -n $(OPERATOR_NAMESPACE) apply -f $(SCRIPTS_DIR)/istio-operator.yaml
22842304
kubectl label namespace $(OPERATOR_NAMESPACE) istio-injection=enabled --overwrite=true
22852305
kubectl label namespace $(OPERATOR_NAMESPACE_CLIENT) istio-injection=enabled --overwrite=true
22862306
kubectl label namespace $(CLUSTER_NAMESPACE) istio-injection=enabled --overwrite=true
22872307
kubectl apply -f $(ISTIO_HOME)/samples/addons
22882308

2309+
# ----------------------------------------------------------------------------------------------------------------------
2310+
# Upgrade Istio
2311+
# ----------------------------------------------------------------------------------------------------------------------
2312+
.PHONY: upgrade-istio
2313+
upgrade-istio: delete-istio-config $(BUILD_OUTPUT)/istio-config.yaml ## Upgrade an already installed Istio to the Istio version specified by ISTIO_VERSION
2314+
$(ISTIO_HOME)/bin/istioctl upgrade -f $(SCRIPTS_DIR)/istio-config.yaml -y
2315+
22892316
# ----------------------------------------------------------------------------------------------------------------------
22902317
# Uninstall Istio
22912318
# ----------------------------------------------------------------------------------------------------------------------
22922319
.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))
2320+
uninstall-istio: delete-istio-config get-istio ## Uninstall Istio from k8s
2321+
kubectl -n $(OPERATOR_NAMESPACE) delete -f $(SCRIPTS_DIR)/istio-operator.yaml || true
2322+
kubectl delete -f ./hack/istio-strict.yaml || true
22972323
$(ISTIO_HOME)/bin/istioctl uninstall --purge -y
22982324

2325+
$(BUILD_OUTPUT)/istio-config.yaml: $(BUILD_PROPS)
2326+
@echo "Creating Istio config: rev=$(ISTIO_REVISION)"
2327+
cp $(SCRIPTS_DIR)/istio-config.yaml $(BUILD_OUTPUT)/istio-config.yaml
2328+
$(SED) -e 's/ISTIO_PROFILE/$(ISTIO_PROFILE)/g' $(BUILD_OUTPUT)/istio-config.yaml
2329+
$(SED) -e 's/ISTIO_REVISION/$(ISTIO_REVISION)/g' $(BUILD_OUTPUT)/istio-config.yaml
2330+
2331+
.PHONY: delete-istio-config
2332+
delete-istio-config:
2333+
rm $(BUILD_OUTPUT)/istio-config.yaml || true
22992334

23002335
# ----------------------------------------------------------------------------------------------------------------------
23012336
# Get the latest Istio version
23022337
# ----------------------------------------------------------------------------------------------------------------------
23032338
.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))
2339+
get-istio: $(BUILD_PROPS) $(BUILD_OUTPUT)/istio-config.yaml ## Download Istio to the build/tools/istio-* directory
2340+
$(SCRIPTS_DIR)/get-istio-latest.sh "$(ISTIO_VERSION_USE)" "$(TOOLS_DIRECTORY)"
23072341
@echo "Istio installed at $(ISTIO_HOME)"
23082342

2343+
23092344
# ----------------------------------------------------------------------------------------------------------------------
23102345
# Obtain the golangci-lint binary
23112346
# ----------------------------------------------------------------------------------------------------------------------

examples/400_Istio/README.adoc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2021, 2024, Oracle and/or its affiliates.
3+
Copyright (c) 2021, 2025, Oracle and/or its affiliates.
44
Licensed under the Universal Permissive License v 1.0 as shown at
55
http://oss.oracle.com/licenses/upl.
66

@@ -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)