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/10/14 12:33:48 UTC

[skywalking-showcase] 01/01: Add group name to frontend service

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

commit d05def4a9114032b6ee30d195fa1fcb4eb3a88b8
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Oct 14 20:33:39 2022 +0800

    Add group name to frontend service
---
 deploy/platform/docker/config/apisix/config.yaml   | 10 ++---
 .../kubernetes/feature-agent/resources.yaml        | 43 +++++++++++-----------
 2 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/deploy/platform/docker/config/apisix/config.yaml b/deploy/platform/docker/config/apisix/config.yaml
index 508e529..832795e 100644
--- a/deploy/platform/docker/config/apisix/config.yaml
+++ b/deploy/platform/docker/config/apisix/config.yaml
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 apisix:
-  node_listen: 80            
+  node_listen: 80
   enable_ipv6: false
   enable_admin: false
   config_center: yaml
@@ -24,9 +24,9 @@ plugin_attr:
       ip: "0.0.0.0"
       port: 9091
   skywalking:
-    service_name: frontend
+    service_name: agent::frontend
     service_instance_name: "$hostname"
-    endpoint_addr: http://oap:12800      
+    endpoint_addr: http://oap:12800
 plugins:
   - prometheus
   - skywalking
@@ -34,5 +34,5 @@ nginx_config:
     http_server_configuration_snippet: |
         location ~ \.(gif|jpg|png|js|css|html)$ {
           root /app/build;
-          index index.html; 
-        }
\ No newline at end of file
+          index index.html;
+        }
diff --git a/deploy/platform/kubernetes/feature-agent/resources.yaml b/deploy/platform/kubernetes/feature-agent/resources.yaml
index e2f6eb9..0d6cca4 100644
--- a/deploy/platform/kubernetes/feature-agent/resources.yaml
+++ b/deploy/platform/kubernetes/feature-agent/resources.yaml
@@ -251,23 +251,23 @@ data:
               service_id: 1
           -
               uri: /v3/*
-              service_id: 1          
+              service_id: 1
           -
               uri: /homepage
-              service_id: 2         
+              service_id: 2
               plugins:
                   skywalking:
-                      service_name: frontend
+                      service_name: agent::frontend
                       service_instance_name: "$hostname"
-                      endpoint_addr: http://oap:12800                  
+                      endpoint_addr: http://oap:12800
           -
               uri: /test
-              service_id: 2                
+              service_id: 2
               plugins:
                   skywalking:
-                      service_name: frontend
+                      service_name: agent::frontend
                       service_instance_name: "$hostname"
-                      endpoint_addr: http://oap:12800                     
+                      endpoint_addr: http://oap:12800
       services:
           -
               id: 1
@@ -280,11 +280,11 @@ data:
           - id: 1
             nodes:
               "oap:12800": 1
-            type: roundrobin   
+            type: roundrobin
           - id: 2
-            nodes: 
+            nodes:
               "app:80": 1
-            type: roundrobin  
+            type: roundrobin
 
       global_rules:
           -
@@ -297,7 +297,7 @@ data:
       #END
   config: |
       apisix:
-        node_listen: 80            
+        node_listen: 80
         enable_ipv6: false
         enable_admin: false
         config_center: yaml
@@ -307,9 +307,9 @@ data:
             ip: "0.0.0.0"
             port: 9091
         skywalking:
-          service_name: frontend
+          service_name: agent::frontend
           service_instance_name: "$hostname"
-          endpoint_addr: http://oap:12800                 
+          endpoint_addr: http://oap:12800
       plugins:
         - prometheus
         - skywalking
@@ -317,9 +317,9 @@ data:
           http_server_configuration_snippet: |
               location ~ \.(gif|jpg|png|js|css|html)$ {
                 root /app/build;
-                index index.html; 
-              }      
----          
+                index index.html;
+              }
+---
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -348,13 +348,13 @@ spec:
               memory: "256Mi"
             requests:
               cpu: 500m
-              memory: "256Mi"          
+              memory: "256Mi"
           ports:
-            - 
+            -
               containerPort: 80
               name: http
-            - 
-              containerPort: 9091 # APISIX Prometheus pulgin port 
+            -
+              containerPort: 9091 # APISIX Prometheus pulgin port
               name: metrics
           env:
             - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
@@ -365,7 +365,7 @@ spec:
               subPath: config
             - name: apisix-config
               mountPath: /usr/local/apisix/conf/apisix.yaml
-              subPath: apisix              
+              subPath: apisix
       volumes:
         - name: apisix-config
           configMap:
@@ -383,4 +383,3 @@ spec:
       port: 80
       targetPort: 80
 ---
-