@@ -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,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
17441765k3d-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# ----------------------------------------------------------------------------------------------------------------------
0 commit comments