@@ -40,7 +40,7 @@ KUBERNETES_DOC_VERSION=v1.30
4040# ----------------------------------------------------------------------------------------------------------------------
4141# The Coherence version to build against - must be a Java 8 compatible version
4242COHERENCE_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
4545COHERENCE_IMAGE_REGISTRY ?= ghcr.io/oracle
4646COHERENCE_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
17441759k3d-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# ----------------------------------------------------------------------------------------------------------------------
0 commit comments