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

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 9f42abf  Add skywalking satellite support (#83)
9f42abf is described below

commit 9f42abfe9b87149dc55320237b6cc9dfea733a9b
Author: mrproliu <[email protected]>
AuthorDate: Mon Nov 29 10:40:52 2021 +0800

    Add skywalking satellite support (#83)
---
 .github/workflows/e2e.ci.yaml                      | 136 ++++----------
 .github/workflows/e2e.compatibility.yaml           | 103 +++-------
 README.md                                          |  12 ++
 chart/skywalking/README.md                         |  16 ++
 chart/skywalking/templates/_helpers.tpl            |  22 +++
 chart/skywalking/templates/oap-deployment.yaml     |   2 +-
 .../skywalking/templates/satellite-deployment.yaml | 133 +++++++++++++
 chart/skywalking/templates/satellite-role.yaml     |  31 +++
 .../templates/satellite-rolebinding.yaml           |  35 ++++
 .../templates/satellite-serviceaccount.yaml        |  27 +++
 chart/skywalking/templates/satellite-svc.yaml      |  38 ++++
 chart/skywalking/values.yaml                       |  29 +++
 test/e2e/e2e.yaml                                  | 207 +++++++++++++++++++++
 test/e2e/env                                       |  26 +++
 .../dependency-services-instance-productpage.yml   |  41 ++++
 .../expected/dependency-services-productpage.yml   |  61 ++++++
 test/e2e/expected/dependency-services-reviews.yml  |  49 +++++
 test/e2e/expected/metrics-has-value.yml            |  19 ++
 test/e2e/expected/service-endpoint-productpage.yml |  19 ++
 test/e2e/expected/service-endpoint-reviews.yml     |  19 ++
 test/e2e/expected/service-instance.yml             |  22 +++
 test/e2e/expected/service.yml                      |  35 ++++
 test/e2e/kind.yaml                                 |  26 +++
 test/e2e/metadata-service-mapping.yaml             |  17 ++
 test/e2e/setup-e2e-shell/install-etcdctl.sh        |  38 ++++
 test/e2e/setup-e2e-shell/install-helm.sh           |  30 +++
 test/e2e/setup-e2e-shell/install-istioctl.sh       |  29 +++
 test/e2e/setup-e2e-shell/install-kubectl.sh        |  29 +++
 test/e2e/setup-e2e-shell/install-swctl.sh          |  31 +++
 test/e2e/setup-e2e-shell/install-yq.sh             |  30 +++
 test/e2e/setup-e2e-shell/install.sh                |  35 ++++
 test/e2e/traffic-gen.yaml                          |  40 ++++
 32 files changed, 1211 insertions(+), 176 deletions(-)

diff --git a/.github/workflows/e2e.ci.yaml b/.github/workflows/e2e.ci.yaml
index 60a023e..59b4a3e 100644
--- a/.github/workflows/e2e.ci.yaml
+++ b/.github/workflows/e2e.ci.yaml
@@ -27,114 +27,56 @@ on:
 env:
   SKIP_TEST: true
   ISTIO_VERSION: 1.7.1
-  TAG: ${{ github.sha }}
-  SCRIPTS_DIR: main/test/e2e-mesh/e2e-istio/scripts
-  SW_OAP_BASE_IMAGE: openjdk:8-jre-alpine
+  OAP_TAG: cef4f6dcac5b14cd67f51a64ad08052bbc046653
+  OAP_REPO: ghcr.io/apache/skywalking/oap
+  UI_TAG: cef4f6dcac5b14cd67f51a64ad08052bbc046653
+  UI_REPO: ghcr.io/apache/skywalking/ui
+  SATELLITE_TAG: v64f1938e118e95b8d8f50756f666e4777ce6aca2
+  SATELLITE_REPO: ghcr.io/apache/skywalking-satellite/skywalking-satellite
 
 jobs:
   als:
     runs-on: ubuntu-latest
     timeout-minutes: 60
-    name: Istio+Envoy Access Log Service
+    strategy:
+      matrix:
+        images:
+          - name: recent
+            oap-repo: ghcr.io/apache/skywalking/oap
+            oap-tag: cef4f6dcac5b14cd67f51a64ad08052bbc046653
+            ui-repo: ghcr.io/apache/skywalking/ui
+            ui-tag: cef4f6dcac5b14cd67f51a64ad08052bbc046653
+          - name: 8.6.0
+            oap-repo: skywalking.docker.scarf.sh/apache/skywalking-oap-server
+            oap-tag: 8.6.0-es6
+            ui-repo: skywalking.docker.scarf.sh/apache/skywalking-ui
+            ui-tag: 8.6.0
+    name: Istio+Envoy Access Log Service(${{ matrix.images.name }})
+    env:
+      OAP_TAG: ${{ matrix.images.oap-tag }}
+      OAP_REPO: ${{ matrix.images.oap-repo }}
+      UI_TAG: ${{ matrix.images.ui-tag }}
+      UI_REPO: ${{ matrix.images.ui-repo }}
+      SATELLITE_TAG: v64f1938e118e95b8d8f50756f666e4777ce6aca2
+      SATELLITE_REPO: ghcr.io/apache/skywalking-satellite/skywalking-satellite
     steps:
       - uses: actions/checkout@v2
-      - uses: actions/checkout@v2
-        with:
-          repository: apache/skywalking
-          submodules: true
-          path: main
-          ref: 6228d450e1b0792dd9875ad68984c89c81ece742
 
-      - uses: actions/cache@v2
+      - name: Setup go
+        uses: actions/setup-go@v2
         with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: ${{ runner.os }}-maven-
-
-      - name: Build Docker Image
-        run: cd main && make docker && cd ..
-
-      - name: Prepare envrionment
-        run: bash ${SCRIPTS_DIR}/pre.sh
-
-      - name: Install Minikube
-        run: bash ${SCRIPTS_DIR}/minikube.sh start
-
-      - name: Install Istio
-        run: bash ${SCRIPTS_DIR}/istio.sh --set profile=demo --set 
meshConfig.defaultConfig.envoyAccessLogService.address=skywalking-oap.istio-system:11800
 --set meshConfig.enableEnvoyAccessLogService=true
-
-      - name: Install SkyWalking
-        run: |
-          cd chart
-          helm dep up skywalking
-          helm -n istio-system install skywalking skywalking \
-               --set fullnameOverride=skywalking \
-               --set elasticsearch.replicas=1 \
-               --set elasticsearch.minimumMasterNodes=1 \
-               --set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=k8s-mesh \
-               --set oap.env.SW_ENVOY_METRIC_ALS_TCP_ANALYSIS=k8s-mesh \
-               --set 
oap.env.K8S_SERVICE_NAME_RULE='e2e::${service.metadata.name}' \
-               --set oap.envoy.als.enabled=true \
-               --set oap.replicas=1 \
-               --set ui.image.repository=skywalking/ui \
-               --set ui.image.tag=$TAG \
-               --set oap.image.repository=skywalking/oap \
-               --set oap.image.tag=$TAG \
-               --set oap.storageType=elasticsearch
-          kubectl -n istio-system get pods
-
-          sleep 3
-          kubectl -n istio-system wait --for=condition=available 
deployments/skywalking-oap --timeout=1200s
-          kubectl get pods -A -o wide --show-labels
-          kubectl get services -A -o wide
-
-      - name: Deploy demo services
-        run: |
-          bash ${SCRIPTS_DIR}/demo.sh
-          # Enable TCP services
-          kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/platform/kube/bookinfo-ratings-v2.yaml
-          kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/platform/kube/bookinfo-db.yaml
-          kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/networking/destination-rule-all.yaml
-          kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/networking/virtual-service-ratings-db.yaml
-
-      - name: Cluster Info
-        if: ${{ failure() }}
-        run: |
-          df -h
-          minikube logs
-          minikube status
-
-      - name: Set up Minikube tunnel
-        run: |
-          mkdir /tmp/minikube-tunnel
-          minikube tunnel > /tmp/minikube-tunnel/a.log &
-          export POD_NAME=$(kubectl get pods -n istio-system -l 
"app=skywalking,release=skywalking,component=ui" -o 
jsonpath="{.items[0].metadata.name}")
-          echo $POD_NAME
-          kubectl -n istio-system port-forward $POD_NAME 8080:8080 > 
/tmp/minikube-tunnel/b.log &
-
-      - name: Run E2E test
-        run: |
-          export GATEWAY_HOST=$(minikube ip)
-          export GATEWAY_PORT=$(kubectl -n istio-system get service 
istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
-          export WEBAPP_HOST=127.0.0.1
-          export WEBAPP_PORT=8080
-
-          cd main
-          ./mvnw -q -DskipTests install
-          ./mvnw -q -f apm-application-toolkit -DskipTests -am install
-          SW_VERSION=$(./mvnw -q -DforceStdout -N 
org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate 
-Dexpression=project.version)
-          ./mvnw -q --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false 
-Dsw.version=${SW_VERSION} verify 
-Dit.test=org.apache.skywalking.e2e.mesh.ALSE2E
-
-      - name: Logs
+          go-version: '1.16'
+      - name: Run E2E Test
+        uses: 
apache/skywalking-infra-e2e@45584853d6f660102c523b1e9cb5815d12ae55d3
+        with:
+          e2e-file: $GITHUB_WORKSPACE/test/e2e/e2e.yaml
+      - uses: actions/upload-artifact@v2
         if: ${{ failure() }}
-        run: |
-          kubectl -n istio-system logs --tail=10000 -l 
"app=skywalking,release=skywalking,component=ui"
-          kubectl -n istio-system logs --tail=10000 -l 
"app=skywalking,release=skywalking,component=oap"
-          cat /tmp/minikube-tunnel/*
+        name: Upload Logs
+        with:
+          name: logs
+          path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
 
-      - name: Clean up
-        if: ${{ always() }}
-        run: minikube delete
 
   build:
     runs-on: ubuntu-latest
diff --git a/.github/workflows/e2e.compatibility.yaml 
b/.github/workflows/e2e.compatibility.yaml
index dbef919..13b63fe 100644
--- a/.github/workflows/e2e.compatibility.yaml
+++ b/.github/workflows/e2e.compatibility.yaml
@@ -23,8 +23,8 @@ on:
 
 env:
   ISTIO_VERSION: 1.7.1
-  SCRIPTS_DIR: main/test/e2e-mesh/e2e-istio/scripts
-  SW_OAP_BASE_IMAGE: openjdk:8-jre-alpine
+  SATELLITE_TAG: v4b97fd255b6459fe9d3fc4f88c0d8f682fc2a364
+  SATELLITE_REPO: ghcr.io/apache/skywalking-satellite/skywalking-satellite
 
 jobs:
   als:
@@ -32,84 +32,31 @@ jobs:
     timeout-minutes: 60
     strategy:
       matrix:
-        tag:
-          - 8.3.0-es6
+        images:
+          - oap-repo: skywalking.docker.scarf.sh/apache/skywalking-oap-server
+            oap-tag: 8.6.0-es6
+            ui-repo: skywalking.docker.scarf.sh/apache/skywalking-ui
+            ui-tag: 8.6.0
     env:
-      TAG: ${{ matrix.tag }}
-    name: ${{ matrix.tag }}
+      OAP_TAG: ${{ matrix.images.oap-tag }}
+      OAP_REPO: ${{ matrix.images.oap-repo }}
+      UI_TAG: ${{ matrix.images.ui-tag }}
+      UI_REPO: ${{ matrix.images.ui-repo }}
+    name: als_${{ matrix.images.oap-tag }}
     steps:
       - uses: actions/checkout@v2
-      - uses: actions/checkout@v2
-        with:
-          repository: apache/skywalking
-          submodules: true
-          path: main
-          ref: 5e4b16cbfc96f80bd86eb6a98ddcf60f0959c9b1
-
-      - name: Prepare envrionment
-        run: bash ${SCRIPTS_DIR}/pre.sh
-
-      - name: Install Minikube
-        run: bash ${SCRIPTS_DIR}/minikube.sh start
-
-      - name: Install Istio
-        run: bash ${SCRIPTS_DIR}/istio.sh --set profile=demo --set 
meshConfig.defaultConfig.envoyAccessLogService.address=skywalking-oap.istio-system:11800
 --set meshConfig.enableEnvoyAccessLogService=true
 
-      - name: Install SkyWalking
-        run: |
-          cd chart
-          helm dep up skywalking
-          helm -n istio-system install skywalking skywalking \
-               --set fullnameOverride=skywalking \
-               --set elasticsearch.replicas=1 \
-               --set elasticsearch.minimumMasterNodes=1 \
-               --set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=k8s-mesh \
-               --set oap.envoy.als.enabled=true \
-               --set oap.replicas=1 \
-               --set ui.image.tag=${TAG//-es*} \
-               --set oap.image.tag=$TAG \
-               --set oap.storageType=elasticsearch
-          kubectl -n istio-system get pods
-
-          sleep 3
-          kubectl -n istio-system wait --for=condition=available 
deployments/skywalking-oap --timeout=1200s
-          kubectl get pods -A -o wide --show-labels
-          kubectl get services -A -o wide
-
-      - name: Deploy demo services
-        run: bash ${SCRIPTS_DIR}/demo.sh
-
-      - name: Cluster Info
-        if: ${{ failure() }}
-        run: |
-          df -h
-          minikube logs
-          minikube status
-
-      - name: Set up Minikube tunnel
-        run: |
-          mkdir /tmp/minikube-tunnel
-          minikube tunnel > /tmp/minikube-tunnel/a.log &
-          export POD_NAME=$(kubectl get pods -n istio-system -l 
"app=skywalking,release=skywalking,component=ui" -o 
jsonpath="{.items[0].metadata.name}")
-          echo $POD_NAME
-          kubectl -n istio-system port-forward $POD_NAME 8080:8080 > 
/tmp/minikube-tunnel/b.log &
-
-      - name: Run E2E test
-        run: |
-          export GATEWAY_HOST=$(minikube ip)
-          export GATEWAY_PORT=$(kubectl -n istio-system get service 
istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
-          export WEBAPP_HOST=127.0.0.1
-          export WEBAPP_PORT=8080
-
-          cd main && ./mvnw --batch-mode -f test/e2e/pom.xml -am 
-DfailIfNoTests=false verify -Dit.test=org.apache.skywalking.e2e.mesh.ALSE2E
-
-      - name: Logs
+      - name: Setup go
+        uses: actions/setup-go@v2
+        with:
+          go-version: '1.16'
+      - name: Run E2E Test
+        uses: 
apache/skywalking-infra-e2e@45584853d6f660102c523b1e9cb5815d12ae55d3
+        with:
+          e2e-file: $GITHUB_WORKSPACE/test/e2e/e2e.yaml
+      - uses: actions/upload-artifact@v2
         if: ${{ failure() }}
-        run: |
-          kubectl -n istio-system logs --tail=10000 -l 
"app=skywalking,release=skywalking,component=ui"
-          kubectl -n istio-system logs --tail=10000 -l 
"app=skywalking,release=skywalking,component=oap"
-          cat /tmp/minikube-tunnel/*
-
-      - name: Clean up
-        if: ${{ always() }}
-        run: minikube delete
+        name: Upload Logs
+        with:
+          name: logs
+          path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
diff --git a/README.md b/README.md
index b1468c0..d5d7a0b 100644
--- a/README.md
+++ b/README.md
@@ -116,6 +116,18 @@ helm install "${SKYWALKING_RELEASE_NAME}" 
${REPO}/skywalking -n "${SKYWALKING_RE
   -f ./skywalking/values-my-es.yaml
 ```
 
+## Install SkyWalking with Satellite
+
+Enable the satellite as gateway, and set the satellite image tag.
+
+```shell script
+helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n 
"${SKYWALKING_RELEASE_NAMESPACE}" \
+  --set satellite.enabled=true \
+  --set satellite.image.tag=v0.3.0
+```
+
+After satellite have been installed, you should replace the `oap` address to 
the `satellite` address, the address from agent or `istio`, such as 
`skywalking-satellite.istio-system:11800`.
+
 ## Customization
 
 - Use your own configuration files
diff --git a/chart/skywalking/README.md b/chart/skywalking/README.md
index 307b04d..2bad4d0 100644
--- a/chart/skywalking/README.md
+++ b/chart/skywalking/README.md
@@ -145,6 +145,22 @@ The following table lists the configurable parameters of 
the Skywalking chart an
 | `elasticsearch.keystore`                    | Allows you map Kubernetes 
secrets into the keystore. See the [config 
example](/elasticsearch/examples/config/values.yaml) and [how to use the 
keystore](#how-to-use-the-keystore)                                             
                                                                                
             | `[]`                                                             
                                                         |
 | `elasticsearch.rbac`                    | Configuration for creating a role, 
role binding and service account as part of this helm chart with `create: 
true`. Also can be used to reference an external service account with 
`serviceAccountName: "externalServiceAccountName"`.                             
                                                                | `create: 
false`<br>`serviceAccountName: ""`                       |
 | `elasticsearch.podSecurityPolicy`       | Configuration for create a pod 
security policy with minimal permissions to run this Helm chart with `create: 
true`. Also can be used to reference an external pod security policy with 
`name: "externalPodSecurityPolicy"`                                             
                                                            | `create: 
false`<br>`name: ""`                                     |
+| `satellite.name`                            | Satellite deployment name      
                                                                     | 
`satellite`                         |
+| `satellite.replicas`                        | Satellite k8s deployment 
replicas                                                                   | 
`1`                                 |
+| `satellite.enabled`                         | Is enable Satellite            
                                                                     | `false`  
                           |
+| `satellite.image.repository`                | Satellite container image name 
                                                                     | 
`skywalking.docker.scarf.sh/apache/skywalking-satellite`            |
+| `satellite.image.tag`                       | Satellite container image tag  
                                                                     | `v0.3.0` 
                           |
+| `satellite.image.pullPolicy`                | Satellite container image pull 
policy                                                               | 
`IfNotPresent`                      |
+| `satellite.antiAffinity`                    | Satellite anti-affinity policy 
                                                                     | `soft`   
                           |
+| `satellite.nodeAffinity`                    | Satellite node affinity policy 
                                                                     | `{}`     
                           |
+| `satellite.nodeSelector`                    | Satellite labels for pod 
assignment                                                                 | 
`{}`                                |
+| `satellite.tolerations`                     | Satellite tolerations          
                                                                     | `[]`     
                           |
+| `satellite.service.type`                    | Satellite svc type             
                                                                     | 
`ClusterIP`                         |
+| `satellite.ports.grpc`                      | Satellite grpc port for 
tracing, metrics, logs, events                                              | 
`11800`                             |
+| `satellite.ports.prometheus`                | Satellite http port for 
Prometheus monitoring                                                       | 
`1234`                              |
+| `satellite.resources`                       | Satellite node resources 
requests & limits                                                          | 
`{} - cpu limit must be an integer` |
+| `satellite.podAnnotations`                  | Configurable 
[annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)
 applied to all Satellite pods                                                  
                                                                                
                                             | `{}`                             
                                                                                
         |
+| `satellite.env`                             | Satellite environment 
variables                                                                     | 
`[]`                                |
 
 Specify each parameter using the `--set key=value[,key=value]` argument to 
`helm install`. For example,
 
diff --git a/chart/skywalking/templates/_helpers.tpl 
b/chart/skywalking/templates/_helpers.tpl
index bf17d47..f218240 100644
--- a/chart/skywalking/templates/_helpers.tpl
+++ b/chart/skywalking/templates/_helpers.tpl
@@ -49,6 +49,13 @@ We truncate at 63 chars because some Kubernetes name fields 
are limited to this
 {{- end -}}
 
 {{/*
+Create a oap full labels value.
+*/}}
+{{- define "skywalking.oap.labels" -}}
+app={{ template "skywalking.name" . }},release={{ .Release.Name 
}},component={{ .Values.oap.name }}
+{{- end -}}
+
+{{/*
 Create a default fully qualified ui name.
 We truncate at 63 chars because some Kubernetes name fields are limited to 
this (by the DNS naming spec).
 */}}
@@ -57,12 +64,27 @@ We truncate at 63 chars because some Kubernetes name fields 
are limited to this
 {{- end -}}
 
 {{/*
+Create a default fully qualified satellite name.
+We truncate at 63 chars because some Kubernetes name fields are limited to 
this (by the DNS naming spec).
+*/}}
+{{- define "skywalking.satellite.fullname" -}}
+{{ template "skywalking.fullname" . }}-{{ .Values.satellite.name }}
+{{- end -}}
+
+{{/*
 Create the name of the service account to use for the oap cluster
 */}}
 {{- define "skywalking.serviceAccountName.oap" -}}
 {{ default (include "skywalking.oap.fullname" .) .Values.serviceAccounts.oap }}
 {{- end -}}
 
+{{/*
+Create the name of the service account to use for the satellite cluster
+*/}}
+{{- define "skywalking.serviceAccountName.satellite" -}}
+{{ default (include "skywalking.satellite.fullname" .) 
.Values.serviceAccounts.satellite }}
+{{- end -}}
+
 {{- define "skywalking.containers.wait-for-es" -}}
 - name: wait-for-elasticsearch
   image: {{ .Values.initContainer.image }}:{{ .Values.initContainer.tag }}
diff --git a/chart/skywalking/templates/oap-deployment.yaml 
b/chart/skywalking/templates/oap-deployment.yaml
index 560e9db..d627a97 100644
--- a/chart/skywalking/templates/oap-deployment.yaml
+++ b/chart/skywalking/templates/oap-deployment.yaml
@@ -121,7 +121,7 @@ spec:
           value: "60"
 {{- end }}
         - name: SW_CLUSTER_K8S_LABEL
-          value: "app={{ template "skywalking.name" . }},release={{ 
.Release.Name }},component={{ .Values.oap.name }}"
+          value: "{{ template "skywalking.oap.labels" . }}"
         - name: SKYWALKING_COLLECTOR_UID
           valueFrom:
             fieldRef:
diff --git a/chart/skywalking/templates/satellite-deployment.yaml 
b/chart/skywalking/templates/satellite-deployment.yaml
new file mode 100644
index 0000000..1f91481
--- /dev/null
+++ b/chart/skywalking/templates/satellite-deployment.yaml
@@ -0,0 +1,133 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.satellite.enabled }}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  labels:
+    app: {{ template "skywalking.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.satellite.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "skywalking.satellite.fullname" . }}
+spec:
+  replicas: {{ .Values.satellite.replicas }}
+  selector:
+    matchLabels:
+      app: {{ template "skywalking.name" . }}
+      component: "{{ .Values.satellite.name }}"
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "skywalking.name" . }}
+        component: "{{ .Values.satellite.name }}"
+        release: {{ .Release.Name }}
+        {{- if .Values.satellite.podAnnotations }}
+      annotations:
+{{ toYaml .Values.satellite.podAnnotations | indent 8 }}
+        {{- end }}
+    spec:
+      serviceAccountName: {{ template 
"skywalking.serviceAccountName.satellite" . }}
+      affinity:
+      {{- if eq .Values.satellite.antiAffinity "hard" }}
+        podAntiAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            - topologyKey: "kubernetes.io/hostname"
+              labelSelector:
+                matchLabels:
+                  app: "{{ template "skywalking.name" . }}"
+                  release: "{{ .Release.Name }}"
+                  component: "{{ .Values.satellite.name }}"
+      {{- else if eq .Values.satellite.antiAffinity "soft" }}
+        podAntiAffinity:
+          preferredDuringSchedulingIgnoredDuringExecution:
+          - weight: 1
+            podAffinityTerm:
+              topologyKey: kubernetes.io/hostname
+              labelSelector:
+                matchLabels:
+                  app: "{{ template "skywalking.name" . }}"
+                  release: "{{ .Release.Name }}"
+                  component: "{{ .Values.satellite.name }}"
+      {{- end }}
+      {{- with .Values.satellite.nodeAffinity }}
+        nodeAffinity:
+{{ toYaml . | indent 10 }}
+      {{- end }}
+{{- if .Values.satellite.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.satellite.nodeSelector | indent 8 }}
+{{- end }}
+{{- if .Values.satellite.tolerations }}
+      tolerations:
+{{ toYaml .Values.satellite.tolerations | indent 8 }}
+{{- end }}
+{{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+{{ toYaml .Values.imagePullSecrets | indent 8 }}
+{{- end }}
+      containers:
+      - name: {{ .Values.satellite.name }}
+        image: {{ .Values.satellite.image.repository }}:{{ required 
"satellite.image.tag is required" .Values.satellite.image.tag }}
+        imagePullPolicy: {{ .Values.satellite.image.pullPolicy }}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.oap.ports.grpc }}
+          initialDelaySeconds: 15
+          periodSeconds: 20
+        ports:
+        {{- range $key, $value :=  .Values.satellite.ports }}
+        - containerPort: {{ $value }}
+          name: {{ $key }}
+        {{- end }}
+{{- if .Values.satellite.resources }}
+        resources:
+{{ toYaml .Values.satellite.resources | indent 10 }}
+{{- end }}
+        env:
+        - name: SATELLITE_GRPC_CLIENT_FINDER
+          value: kubernetes
+        - name: SATELLITE_GRPC_CLIENT_KUBERNETES_NAMESPACE
+          value: "{{ .Release.Namespace }}"
+        - name: SATELLITE_GRPC_CLIENT_KUBERNETES_KIND
+          value: pod
+        - name: SATELLITE_GRPC_CLIENT_KUBERNETES_SELECTOR_LABEL
+          value: "{{ template "skywalking.oap.labels" . }}"
+        - name: SATELLITE_GRPC_CLIENT_KUBERNETES_EXTRA_PORT
+          value: "{{ .Values.oap.ports.grpc }}"
+        {{- range $key, $value :=  .Values.satellite.env }}
+        - name: {{ $key }}
+          value: {{ $value | quote }}
+        {{- end }}
+
+        volumeMounts:
+          {{- if (.Files.Glob "files/conf.d/satellite/**") }}
+          {{ range $path, $bytes := .Files.Glob "files/conf.d/satellite/**" }}
+          - name: skywalking-satellite-override
+            mountPath: {{ print "/skywalking/config/" ($path | replace 
"files/conf.d/satellite/" "") }}
+            subPath: {{ $path | replace "files/conf.d/satellite/" "" | b64enc 
| replace "=" "-" }}
+          {{- end }}
+          {{- end }}
+
+      volumes:
+        {{- if (.Files.Glob "files/conf.d/satellite/**") }}
+        - name: skywalking-satellite-override
+          configMap:
+            name: {{ template "skywalking.fullname" . }}-satellite-cm-override
+        {{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/chart/skywalking/templates/satellite-role.yaml 
b/chart/skywalking/templates/satellite-role.yaml
new file mode 100644
index 0000000..3454574
--- /dev/null
+++ b/chart/skywalking/templates/satellite-role.yaml
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.satellite.enabled }}
+kind: Role
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: {{ template "skywalking.satellite.fullname" . }}
+  labels:
+    app: {{ template "skywalking.name" . }}
+    component: "{{ .Values.oap.name }}"
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+rules:
+  - apiGroups: [""]
+    resources: ["pods"]
+    verbs: ["get", "watch", "list"]
+{{- end }}
\ No newline at end of file
diff --git a/chart/skywalking/templates/satellite-rolebinding.yaml 
b/chart/skywalking/templates/satellite-rolebinding.yaml
new file mode 100644
index 0000000..0512c67
--- /dev/null
+++ b/chart/skywalking/templates/satellite-rolebinding.yaml
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.satellite.enabled }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+  name: {{ template "skywalking.satellite.fullname" . }}
+  labels:
+    app: {{ template "skywalking.name" . }}
+    component: "{{ .Values.oap.name }}"
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: {{ template "skywalking.satellite.fullname" . }}
+subjects:
+  - kind: ServiceAccount
+    name: {{ template "skywalking.serviceAccountName.satellite" . }}
+    namespace: {{ .Release.Namespace }}
+{{- end }}
\ No newline at end of file
diff --git a/chart/skywalking/templates/satellite-serviceaccount.yaml 
b/chart/skywalking/templates/satellite-serviceaccount.yaml
new file mode 100644
index 0000000..ce9920f
--- /dev/null
+++ b/chart/skywalking/templates/satellite-serviceaccount.yaml
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.satellite.enabled }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    app: {{ template "skywalking.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.satellite.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "skywalking.serviceAccountName.satellite" . }}
+{{- end }}
\ No newline at end of file
diff --git a/chart/skywalking/templates/satellite-svc.yaml 
b/chart/skywalking/templates/satellite-svc.yaml
new file mode 100644
index 0000000..03547bd
--- /dev/null
+++ b/chart/skywalking/templates/satellite-svc.yaml
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.satellite.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ template "skywalking.satellite.fullname" . }}
+  labels:
+    app: {{ template "skywalking.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.satellite.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+spec:
+  type: {{ .Values.satellite.service.type }}
+  ports:
+  {{- range $key, $value :=  .Values.satellite.ports }}
+  - port: {{ $value }}
+    name: {{ $key }}
+  {{- end }}
+  selector:
+    app: {{ template "skywalking.name" . }}
+    component: "{{ .Values.satellite.name }}"
+    release: {{ .Release.Name }}
+{{- end }}
\ No newline at end of file
diff --git a/chart/skywalking/values.yaml b/chart/skywalking/values.yaml
index 7ee4171..474651a 100644
--- a/chart/skywalking/values.yaml
+++ b/chart/skywalking/values.yaml
@@ -373,5 +373,34 @@ elasticsearch:
 
   keystore: []
 
+satellite:
+  name: satellite
+  replicas: 1
+  enabled: false
+  image:
+    repository: skywalking.docker.scarf.sh/apache/skywalking-satellite
+    tag: null # Must be set explicitly
+    pullPolicy: IfNotPresent
+  ports:
+    grpc: 11800
+    prometheus: 1234
+  service:
+    type: ClusterIP
+  antiAffinity: "soft"
+  nodeAffinity: {}
+  nodeSelector: {}
+  tolerations: []
+  resources: {}
+    # limits:
+    #   cpu: 4
+    #   memory: 8Gi
+    # requests:
+    #   cpu: 4
+    #   memory: 4Gi
+  podAnnotations:
+    # example: oap-foo
+  env:
+    # more env, please refer to 
https://skywalking.apache.org/docs/skywalking-satellite/latest/en/setup/readme/#satellite_configyaml
+
 nameOverride: ""
 fullnameOverride: ""
diff --git a/test/e2e/e2e.yaml b/test/e2e/e2e.yaml
new file mode 100644
index 0000000..0d7d6d2
--- /dev/null
+++ b/test/e2e/e2e.yaml
@@ -0,0 +1,207 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is used to show how to write configuration files and can be used 
to test.
+
+setup:
+  env: kind
+  file: kind.yaml
+  init-system-environment: env
+  kind:
+    expose-ports:
+      - namespace: istio-system
+        resource: service/skywalking-ui
+        port: 80
+  steps:
+    - name: install yq
+      command: bash test/e2e/setup-e2e-shell/install.sh yq
+    - name: install swctl
+      command: bash test/e2e/setup-e2e-shell/install.sh swctl
+    - name: install kubectl
+      command: bash test/e2e/setup-e2e-shell/install.sh kubectl
+    - name: install istio
+      command: |
+        bash test/e2e/setup-e2e-shell/install.sh istioctl
+        istioctl install -y --set profile=demo \
+          --set 
meshConfig.defaultConfig.envoyAccessLogService.address=skywalking-satellite.istio-system:11800
 \
+          --set meshConfig.enableEnvoyAccessLogService=true
+        kubectl label namespace default istio-injection=enabled
+    - name: Install helm
+      command: bash test/e2e/setup-e2e-shell/install.sh helm
+    - name: Install SkyWalking
+      command: |
+        cd chart
+        mkdir -p skywalking/files/conf.d/oap/ && cp 
../test/e2e/metadata-service-mapping.yaml 
skywalking/files/conf.d/oap/metadata-service-mapping.yaml
+        helm dep up skywalking
+        helm -n istio-system install skywalking skywalking \
+                       --set fullnameOverride=skywalking \
+                       --set elasticsearch.replicas=1 \
+                       --set elasticsearch.minimumMasterNodes=1 \
+                       --set 
oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=k8s-mesh \
+                       --set oap.env.SW_ENVOY_METRIC_ALS_TCP_ANALYSIS=k8s-mesh 
\
+                       --set 
oap.env.K8S_SERVICE_NAME_RULE='e2e::${service.metadata.name}' \
+                       --set oap.envoy.als.enabled=true \
+                       --set oap.replicas=1 \
+                       --set ui.image.repository=$UI_REPO \
+                       --set ui.image.tag=$UI_TAG \
+                       --set oap.image.repository=$OAP_REPO \
+                       --set oap.image.tag=$OAP_TAG \
+                       --set oap.storageType=elasticsearch \
+                       --set satellite.enabled=true \
+                       --set satellite.image.repository=$SATELLITE_REPO \
+                       --set satellite.image.tag=$SATELLITE_TAG
+      wait:
+        - namespace: istio-system
+          resource: deployments/skywalking-oap
+          for: condition=available
+        - namespace: istio-system
+          resource: deployments/skywalking-satellite
+          for: condition=available
+    - name: Deploy demo services
+      command: |
+        kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/platform/kube/bookinfo.yaml
+        kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/networking/bookinfo-gateway.yaml
+        # Enable TCP services
+        kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/platform/kube/bookinfo-ratings-v2.yaml
+        kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/platform/kube/bookinfo-db.yaml
+        kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/networking/destination-rule-all.yaml
+        kubectl apply -f 
https://raw.githubusercontent.com/istio/istio/$ISTIO_VERSION/samples/bookinfo/networking/virtual-service-ratings-db.yaml
+      wait:
+        - namespace: default
+          resource: pod
+          for: condition=Ready
+    - name: Generate traffic
+      path: traffic-gen.yaml
+      wait:
+        - namespace: default
+          resource: pod
+          for: condition=Ready
+  timeout: 25m
+
+verify:
+  retry:
+    count: 20
+    interval: 10s
+  cases:
+    # service list
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 service ls
+      expected: expected/service.yml
+    # service instance list
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::productpage
+      expected: expected/service-instance.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::reviews
+      expected: expected/service-instance.yml
+    # service endpoint
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 endpoint list --service-name=e2e::productpage
+      expected: expected/service-endpoint-productpage.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 endpoint list --service-name=e2e::reviews
+      expected: expected/service-endpoint-reviews.yml
+
+    # service metrics: e2e::productpage
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_sla --service-name=e2e::productpage |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_cpm --service-name=e2e::productpage |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_resp_time --service-name=e2e::productpage |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_apdex --service-name=e2e::productpage |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    # service metrics: e2e::reviews
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_sla --service-name=e2e::reviews |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_cpm --service-name=e2e::reviews |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_resp_time --service-name=e2e::reviews |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_apdex --service-name=e2e::reviews |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    # service instance metrics: e2e::productpage
+    - query: |
+        swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_instance_resp_time 
--service-name=e2e::productpage --instance-name=$( \
+          swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::productpage | yq e '.[0].name' -
+        ) |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: |
+        swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_instance_cpm --service-name=e2e::productpage 
--instance-name=$( \
+          swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::productpage | yq e '.[0].name' -
+        ) |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: |
+        swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_instance_sla --service-name=e2e::productpage 
--instance-name=$( \
+          swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::productpage | yq e '.[0].name' -
+        ) |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    # service instance metrics: e2e::reviews
+    - query: |
+        swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_instance_resp_time --service-name=e2e::reviews 
--instance-name=$( \
+          swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::reviews | yq e '.[0].name' -
+        ) |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: |
+        swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_instance_cpm --service-name=e2e::reviews 
--instance-name=$( \
+          swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::reviews | yq e '.[0].name' -
+        ) |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: |
+        swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_instance_sla --service-name=e2e::reviews 
--instance-name=$( \
+          swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::reviews | yq e '.[0].name' -
+        ) |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+
+    # service endpoint metrics: e2e::productpage GET:/productpage
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=endpoint_cpm --endpoint-name=GET:/productpage 
--service-name=e2e::productpage |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=endpoint_avg --endpoint-name=GET:/productpage 
--service-name=e2e::productpage |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=endpoint_sla --endpoint-name=GET:/productpage 
--service-name=e2e::productpage |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    # service endpoint metrics: e2e::reviews GET:/reviews/0
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=endpoint_cpm --endpoint-name=GET:/reviews/0 
--service-name=e2e::reviews |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=endpoint_avg --endpoint-name=GET:/reviews/0 
--service-name=e2e::reviews |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=endpoint_sla --endpoint-name=GET:/reviews/0 
--service-name=e2e::reviews |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+
+    # dependency service
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 dependency service --service-name=e2e::productpage
+      expected: expected/dependency-services-productpage.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 dependency service --service-name=e2e::reviews
+      expected: expected/dependency-services-reviews.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 dependency instance --service-name=e2e::productpage 
--dest-service-name=e2e::reviews
+      expected: expected/dependency-services-instance-productpage.yml
+
+    # service relation metrics
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_relation_client_cpm  
--service-name=e2e::productpage --dest-service-name=e2e::reviews |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_relation_server_cpm  
--service-name=e2e::productpage --dest-service-name=e2e::reviews |yq e 
'to_entries' -
+      expected: expected/metrics-has-value.yml
+    # service instance relation metrics, e2e::productpage -> e2e::reviews
+    - query: |
+        swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_instance_relation_client_cpm \
+          --service-name=e2e::productpage --instance-name=$( \
+            swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::productpage | yq e '.[0].name' - ) \
+          --dest-service-name=e2e::reviews --dest-instance-name=$( \
+            swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::reviews | yq e '.[0].name' - ) \
+        |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    - query: |
+        swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 metrics linear --name=service_instance_relation_server_cpm \
+          --service-name=e2e::productpage --instance-name=$( \
+            swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::productpage | yq e '.[0].name' - ) \
+          --dest-service-name=e2e::reviews --dest-instance-name=$( \
+            swctl --display yaml 
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
 instance list --service-name=e2e::reviews | yq e '.[0].name' - ) \
+        |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
diff --git a/test/e2e/env b/test/e2e/env
new file mode 100644
index 0000000..b08c955
--- /dev/null
+++ b/test/e2e/env
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SW_AGENT_JAVA_COMMIT=fbdfc42b4d825ba33205d646ddaaaad20c005cb8
+SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
+SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
+SW_AGENT_NODEJS_COMMIT=e755659c7f308d3b5589619778c8360308cb14f8
+SW_AGENT_GO_COMMIT=4af380c2db6243106b0fc650b6003ce3b3eb82a0
+SW_AGENT_PYTHON_COMMIT=50388c55428d742d73d9733278f04173585de80d
+SW_AGENT_CLIENT_JS_COMMIT=af0565a67d382b683c1dbd94c379b7080db61449
+SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016
+SW_KUBERNETES_COMMIT_SHA=0f3ec68e5a7e1608cec8688716b848ed15e971e5
+
+SW_CTL_COMMIT=45a5f9807126dc6ea9fe06e17e7aafbe212436d2
diff --git a/test/e2e/expected/dependency-services-instance-productpage.yml 
b/test/e2e/expected/dependency-services-instance-productpage.yml
new file mode 100644
index 0000000..1494adf
--- /dev/null
+++ b/test/e2e/expected/dependency-services-instance-productpage.yml
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ notEmpty .id }}
+  name: {{ notEmpty .name }}
+  serviceid: {{ b64enc "e2e::reviews" }}.1
+  servicename: e2e::reviews
+  type: http
+  isreal: true
+- id: {{ notEmpty .id }}
+  name: {{ notEmpty .name }}
+  serviceid: {{ b64enc "e2e::productpage" }}.1
+  servicename: e2e::productpage
+  type: ""
+  isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ notEmpty .source }}
+  sourcecomponents: []
+  target: {{ notEmpty .target }}
+  targetcomponents: []
+  id: {{ notEmpty .source }}-{{ notEmpty .target }}
+  detectpoints:
+    - CLIENT
+    - SERVER
+{{- end }}
diff --git a/test/e2e/expected/dependency-services-productpage.yml 
b/test/e2e/expected/dependency-services-productpage.yml
new file mode 100644
index 0000000..39589b7
--- /dev/null
+++ b/test/e2e/expected/dependency-services-productpage.yml
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ b64enc "e2e::reviews"}}.1
+  name: e2e::reviews
+  type: http
+  isreal: true
+- id: {{ b64enc "e2e::productpage"}}.1
+  name: e2e::productpage
+  type: http
+  isreal: true
+- id: {{ b64enc "e2e::details" }}.1
+  name: e2e::details
+  type: http
+  isreal: true
+- id: {{ b64enc "e2e::istio-ingressgateway" }}.1
+  name: e2e::istio-ingressgateway
+  type: http
+  isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "e2e::istio-ingressgateway"}}.1
+  sourcecomponents: []
+  target: {{ b64enc "e2e::productpage"}}.1
+  targetcomponents: []
+  id: {{ b64enc "e2e::istio-ingressgateway"}}.1-{{ b64enc 
"e2e::productpage"}}.1
+  detectpoints:
+    - CLIENT
+    - SERVER
+- source: {{ b64enc "e2e::productpage"}}.1
+  sourcecomponents: []
+  target: {{ b64enc "e2e::details"}}.1
+  targetcomponents: []
+  id: {{ b64enc "e2e::productpage"}}.1-{{ b64enc "e2e::details"}}.1
+  detectpoints:
+    - CLIENT
+    - SERVER
+- source: {{ b64enc "e2e::productpage" }}.1
+  sourcecomponents: []
+  target: {{ b64enc "e2e::reviews"}}.1
+  targetcomponents: []
+  id: {{ b64enc "e2e::productpage" }}.1-{{ b64enc "e2e::reviews"}}.1
+  detectpoints:
+    - CLIENT
+    - SERVER
+{{- end }}
diff --git a/test/e2e/expected/dependency-services-reviews.yml 
b/test/e2e/expected/dependency-services-reviews.yml
new file mode 100644
index 0000000..d41c779
--- /dev/null
+++ b/test/e2e/expected/dependency-services-reviews.yml
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ b64enc "e2e::reviews"}}.1
+  name: e2e::reviews
+  type: http
+  isreal: true
+- id: {{ b64enc "e2e::ratings"}}.1
+  name: e2e::ratings
+  type: http
+  isreal: true
+- id: {{ b64enc "e2e::productpage" }}.1
+  name: e2e::productpage
+  type: http
+  isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "e2e::productpage"}}.1
+  sourcecomponents: []
+  target: {{ b64enc "e2e::reviews"}}.1
+  targetcomponents: []
+  id: {{ b64enc "e2e::productpage"}}.1-{{ b64enc "e2e::reviews"}}.1
+  detectpoints:
+    - CLIENT
+    - SERVER
+- source: {{ b64enc "e2e::reviews" }}.1
+  sourcecomponents: []
+  target: {{ b64enc "e2e::ratings"}}.1
+  targetcomponents: []
+  id: {{ b64enc "e2e::reviews" }}.1-{{ b64enc "e2e::ratings"}}.1
+  detectpoints:
+    - CLIENT
+    - SERVER
+{{- end }}
diff --git a/test/e2e/expected/metrics-has-value.yml 
b/test/e2e/expected/metrics-has-value.yml
new file mode 100644
index 0000000..d9c4985
--- /dev/null
+++ b/test/e2e/expected/metrics-has-value.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- contains . }}
+- key: {{ notEmpty .key }}
+  value: {{ ge .value 1 }}
+{{- end }}
\ No newline at end of file
diff --git a/test/e2e/expected/service-endpoint-productpage.yml 
b/test/e2e/expected/service-endpoint-productpage.yml
new file mode 100644
index 0000000..d26fc8f
--- /dev/null
+++ b/test/e2e/expected/service-endpoint-productpage.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- contains . }}
+- id: {{ b64enc "e2e::productpage" }}.1_{{ b64enc "GET:/productpage" }}
+  name: GET:/productpage
+{{- end }}
diff --git a/test/e2e/expected/service-endpoint-reviews.yml 
b/test/e2e/expected/service-endpoint-reviews.yml
new file mode 100644
index 0000000..f26305d
--- /dev/null
+++ b/test/e2e/expected/service-endpoint-reviews.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- contains . }}
+- id: {{ b64enc "e2e::reviews" }}.1_{{ b64enc "GET:/reviews/0" }}
+  name: GET:/reviews/0
+{{- end }}
diff --git a/test/e2e/expected/service-instance.yml 
b/test/e2e/expected/service-instance.yml
new file mode 100644
index 0000000..658cdbd
--- /dev/null
+++ b/test/e2e/expected/service-instance.yml
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- contains . }}
+- id: {{ notEmpty .id }}
+  name: {{ notEmpty .name }}
+  attributes: []
+  language: UNKNOWN
+  instanceuuid: {{ notEmpty .instanceuuid }}
+{{- end }}
diff --git a/test/e2e/expected/service.yml b/test/e2e/expected/service.yml
new file mode 100644
index 0000000..ba6d14b
--- /dev/null
+++ b/test/e2e/expected/service.yml
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- contains . }}
+- id: {{ b64enc "e2e::istio-ingressgateway" }}.1
+  name: e2e::istio-ingressgateway
+  group: ""
+- id: {{ b64enc "e2e::reviews" }}.1
+  name: e2e::reviews
+  group: ""
+- id: {{ b64enc "e2e::ratings" }}.1
+  name: e2e::ratings
+  group: ""
+- id: {{ b64enc "e2e::productpage" }}.1
+  name: e2e::productpage
+  group: ""
+- id: {{ b64enc "e2e::details" }}.1
+  name: e2e::details
+  group: ""
+- id: {{ b64enc "e2e::mongodb" }}.1
+  name: e2e::mongodb
+  group: ""
+{{- end }}
diff --git a/test/e2e/kind.yaml b/test/e2e/kind.yaml
new file mode 100644
index 0000000..2f9384f
--- /dev/null
+++ b/test/e2e/kind.yaml
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# this config file contains all config fields with comments
+# NOTE: this is not a particularly useful config file
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+  # the control plane node config
+  - role: control-plane
+  # the three workers
+  - role: worker
+  - role: worker
+  - role: worker
diff --git a/test/e2e/metadata-service-mapping.yaml 
b/test/e2e/metadata-service-mapping.yaml
new file mode 100644
index 0000000..9e58722
--- /dev/null
+++ b/test/e2e/metadata-service-mapping.yaml
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+serviceName: e2e::${LABELS."service.istio.io/canonical-name"}
+serviceInstanceName: ${NAME}
diff --git a/test/e2e/setup-e2e-shell/install-etcdctl.sh 
b/test/e2e/setup-e2e-shell/install-etcdctl.sh
new file mode 100644
index 0000000..da8bebd
--- /dev/null
+++ b/test/e2e/setup-e2e-shell/install-etcdctl.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+BASE_DIR=$1
+BIN_DIR=$2
+
+if ! command -v etcdctl &> /dev/null; then
+  mkdir -p $BASE_DIR/etcdctl && cd $BASE_DIR/etcdctl
+  utype=$(uname | awk '{print tolower($0)}')
+  suffix=
+  if [ $utype = "darwin" ]
+  then
+      suffix="zip"
+  else
+      suffix="tar.gz"
+  fi
+  curl -kLo etcdctl.$suffix 
https://github.com/coreos/etcd/releases/download/v3.5.0/etcd-v3.5.0-$utype-amd64.$suffix
+  tar -zxf etcdctl.$suffix --strip=1
+  cp etcdctl $BIN_DIR/
+fi
\ No newline at end of file
diff --git a/test/e2e/setup-e2e-shell/install-helm.sh 
b/test/e2e/setup-e2e-shell/install-helm.sh
new file mode 100644
index 0000000..197f888
--- /dev/null
+++ b/test/e2e/setup-e2e-shell/install-helm.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+BASE_DIR=$1
+BIN_DIR=$2
+HELMVERSION=${HELMVERSION:-'helm-v3.0.0'}
+
+if ! command -v helm &> /dev/null; then
+  mkdir -p $BASE_DIR/helm && cd $BASE_DIR/helm
+  curl -sSL https://get.helm.sh/${HELMVERSION}-linux-amd64.tar.gz
+  tar xz -C $BIN_DIR --strip-components=1 linux-amd64/helm
+fi
\ No newline at end of file
diff --git a/test/e2e/setup-e2e-shell/install-istioctl.sh 
b/test/e2e/setup-e2e-shell/install-istioctl.sh
new file mode 100644
index 0000000..166ea50
--- /dev/null
+++ b/test/e2e/setup-e2e-shell/install-istioctl.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+BASE_DIR=$1
+BIN_DIR=$2
+
+if ! command -v istioctl &> /dev/null; then
+  mkdir -p $BASE_DIR/istioctl && cd $BASE_DIR/istioctl
+  curl -L https://istio.io/downloadIstio | sh -
+  cp istio-$ISTIO_VERSION/bin/istioctl $BIN_DIR
+fi
\ No newline at end of file
diff --git a/test/e2e/setup-e2e-shell/install-kubectl.sh 
b/test/e2e/setup-e2e-shell/install-kubectl.sh
new file mode 100644
index 0000000..792661f
--- /dev/null
+++ b/test/e2e/setup-e2e-shell/install-kubectl.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+BASE_DIR=$1
+BIN_DIR=$2
+K8SVERSION=${K8SVERSION:-'k8s-v1.19.2'}
+
+if ! command -v kubectl &> /dev/null; then
+  curl -sSL 
"https://storage.googleapis.com/kubernetes-release/release/${K8SVERSION#k8s-}/bin/linux/amd64/kubectl";
 -o $BIN_DIR/kubectl
+  chmod +x $BIN_DIR/kubectl
+fi
\ No newline at end of file
diff --git a/test/e2e/setup-e2e-shell/install-swctl.sh 
b/test/e2e/setup-e2e-shell/install-swctl.sh
new file mode 100644
index 0000000..5893252
--- /dev/null
+++ b/test/e2e/setup-e2e-shell/install-swctl.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+BASE_DIR=$1
+BIN_DIR=$2
+
+if ! command -v swctl &> /dev/null; then
+  mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
+  curl -kLo skywalking-cli.tar.gz 
https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
+  tar -zxf skywalking-cli.tar.gz --strip=1
+  utype=$(uname | awk '{print tolower($0)}')
+  make $utype && mv bin/swctl-*-$utype-amd64 $BIN_DIR/swctl
+fi
\ No newline at end of file
diff --git a/test/e2e/setup-e2e-shell/install-yq.sh 
b/test/e2e/setup-e2e-shell/install-yq.sh
new file mode 100644
index 0000000..28fd299
--- /dev/null
+++ b/test/e2e/setup-e2e-shell/install-yq.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+BASE_DIR=$1
+BIN_DIR=$2
+
+if ! command -v yq &> /dev/null; then
+  mkdir -p $BASE_DIR/yq && cd $BASE_DIR/yq
+  curl -kLo yq.tar.gz https://github.com/mikefarah/yq/archive/v4.11.1.tar.gz
+  tar -zxf yq.tar.gz --strip=1
+  go install && go build -ldflags -s && cp yq $BIN_DIR/
+fi
\ No newline at end of file
diff --git a/test/e2e/setup-e2e-shell/install.sh 
b/test/e2e/setup-e2e-shell/install.sh
new file mode 100644
index 0000000..3d440fa
--- /dev/null
+++ b/test/e2e/setup-e2e-shell/install.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+set -ex
+
+NAME=$1
+CURRENT_DIR="$(cd "$(dirname $0)"; pwd)"
+
+# prepare base dir
+TMP_DIR=/tmp/skywalking-infra-e2e
+BIN_DIR=/usr/local/bin
+mkdir -p $TMP_DIR && cd $TMP_DIR
+
+# execute install
+bash $CURRENT_DIR/install-$NAME.sh $TMP_DIR $BIN_DIR
+
+echo "success to install $NAME"
\ No newline at end of file
diff --git a/test/e2e/traffic-gen.yaml b/test/e2e/traffic-gen.yaml
new file mode 100644
index 0000000..549bcfd
--- /dev/null
+++ b/test/e2e/traffic-gen.yaml
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: trafficgenerator
+  labels:
+    app: trafficgenerator
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: trafficgenerator
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/inject: "false"
+      labels:
+        app: trafficgenerator
+    spec:
+      containers:
+        - name: trafficgenerator
+          image: williamyeh/wrk
+          command: ["wrk", "-t1", "-c1", "-d20m", 
"http://istio-ingressgateway.istio-system:80/productpage";]
+          resources:
+            requests:
+              cpu: 0.1
\ No newline at end of file

Reply via email to