You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2022/04/08 13:14:52 UTC

[skywalking-showcase] branch main updated: Fix route to the satellite failure when using java-agent-injector in Kubernetes (#28)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-showcase.git


The following commit(s) were added to refs/heads/main by this push:
     new a6b461b  Fix route to the satellite failure when using java-agent-injector in Kubernetes (#28)
a6b461b is described below

commit a6b461b672ab30903417e680dad6f77a86cab0cd
Author: mrproliu <74...@qq.com>
AuthorDate: Fri Apr 8 21:14:48 2022 +0800

    Fix route to the satellite failure when using java-agent-injector in Kubernetes (#28)
---
 deploy/platform/kubernetes/Makefile    | 1 -
 deploy/platform/kubernetes/Makefile.in | 1 +
 deploy/platform/kubernetes/features.mk | 4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/deploy/platform/kubernetes/Makefile b/deploy/platform/kubernetes/Makefile
index 292cdb3..e7c1565 100644
--- a/deploy/platform/kubernetes/Makefile
+++ b/deploy/platform/kubernetes/Makefile
@@ -22,7 +22,6 @@ include Makefile.in
 features := $(subst $(comma), ,$(FEATURE_FLAGS))
 features := $(foreach f,$(features),feature-$(f))
 
-BACKEND_SERVICE := oap
 ifneq (,$(findstring satellite,$(features)))
 	BACKEND_SERVICE := satellite
 endif
diff --git a/deploy/platform/kubernetes/Makefile.in b/deploy/platform/kubernetes/Makefile.in
index a22fa1f..241ab00 100644
--- a/deploy/platform/kubernetes/Makefile.in
+++ b/deploy/platform/kubernetes/Makefile.in
@@ -20,5 +20,6 @@
 
 NAMESPACE ?= default
 AGENTLESS ?= false
+BACKEND_SERVICE ?= oap
 
 FEATURE_FLAGS ?= java-agent-injector,cluster,kubernetes-monitor,so11y,vm,als,event,istiod-monitor,satellite
diff --git a/deploy/platform/kubernetes/features.mk b/deploy/platform/kubernetes/features.mk
index 774dae8..d04f2a8 100644
--- a/deploy/platform/kubernetes/features.mk
+++ b/deploy/platform/kubernetes/features.mk
@@ -99,11 +99,11 @@ deploy.feature-java-agent-injector: install-cert-manager
 	@kubectl label namespace --overwrite $(NAMESPACE) swck-injection=enabled
 	# @feature: java-agent-injector; we can update the agent's backend address in a single-node cluster firstly so that we don't need to add the same backend env for every java agent
 	@kubectl get configmap skywalking-swck-java-agent-configmap -n skywalking-swck-system -oyaml | sed "s/127.0.0.1/$(NAMESPACE)-$(BACKEND_SERVICE).$(NAMESPACE)/" | kubectl apply -f -
-	$(MAKE) deploy FEATURE_FLAGS=agent AGENTLESS=false SHOW_TIPS=false
+	$(MAKE) deploy FEATURE_FLAGS=agent AGENTLESS=false SHOW_TIPS=false BACKEND_SERVICE=$(BACKEND_SERVICE)
 
 # @feature: java-agent-injector; uninstall the swck operator and cert-manager
 .PHONY: undeploy.feature-java-agent-injector
 undeploy.feature-java-agent-injector:
 	@curl -Ls https://archive.apache.org/dist/skywalking/swck/${SWCK_OPERATOR_VERSION}/skywalking-swck-${SWCK_OPERATOR_VERSION}-bin.tgz | tar -zxf - -O ./config/operator-bundle.yaml | kubectl delete --ignore-not-found -f -
 	@kubectl delete --ignore-not-found -f https://github.com/jetstack/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml
-	$(MAKE) undeploy FEATURE_FLAGS=agent AGENTLESS=false SHOW_TIPS=false
\ No newline at end of file
+	$(MAKE) undeploy FEATURE_FLAGS=agent AGENTLESS=false SHOW_TIPS=false BACKEND_SERVICE=$(BACKEND_SERVICE)
\ No newline at end of file