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-helm.git
The following commit(s) were added to refs/heads/master by this push:
new 1cadd6d Integrate BanyanDB as storage solution (#126)
1cadd6d is described below
commit 1cadd6dbfa079585ae4a189d802b3a1c2e8e2d99
Author: ButterBright <[email protected]>
AuthorDate: Tue Oct 10 17:09:33 2023 +0800
Integrate BanyanDB as storage solution (#126)
---
.github/workflows/e2e.ci.yaml | 39 +++++++++-------------
CHANGES.md | 6 ++++
README.md | 23 +++++++++++--
chart/adapter/Chart.yaml | 2 +-
chart/adapter/README.md | 2 +-
chart/adapter/values.yaml | 2 +-
chart/operator/Chart.yaml | 2 +-
chart/operator/README.md | 2 +-
chart/operator/templates/crds.yaml | 18 +++++-----
chart/operator/values.yaml | 2 +-
chart/skywalking/Chart.yaml | 4 +++
chart/skywalking/templates/_helpers.tpl | 18 ++++++++++
chart/skywalking/values.yaml | 8 +++++
test/e2e/{e2e.yaml => e2e-banyandb.yaml} | 10 +++---
test/e2e/{e2e.yaml => e2e-elasticsearch.yaml} | 4 +--
test/e2e/env | 2 +-
.../dependency-services-instance-productpage.yml | 2 +-
.../expected/dependency-services-productpage.yml | 21 ++++++++----
test/e2e/expected/dependency-services-reviews.yml | 14 +++++---
test/e2e/expected/hpa-metrics.yaml | 8 ++++-
test/e2e/expected/metrics-has-value.yml | 8 ++++-
test/e2e/expected/service-instance.yml | 20 ++++++++++-
test/e2e/expected/service.yml | 36 ++++++++++++++++----
test/e2e/setup-e2e-shell/install-istioctl.sh | 2 +-
test/e2e/setup-e2e-shell/install-swctl.sh | 16 ++++++---
test/e2e/setup-e2e-shell/install-yq.sh | 2 +-
test/e2e/setup-e2e-shell/install.sh | 2 +-
test/e2e/swck/e2e.yaml | 6 ++--
28 files changed, 202 insertions(+), 79 deletions(-)
diff --git a/.github/workflows/e2e.ci.yaml b/.github/workflows/e2e.ci.yaml
index bcab64c..789349b 100644
--- a/.github/workflows/e2e.ci.yaml
+++ b/.github/workflows/e2e.ci.yaml
@@ -27,12 +27,6 @@ on:
env:
SKIP_TEST: true
ISTIO_VERSION: 1.7.1
- 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:
@@ -42,17 +36,20 @@ jobs:
matrix:
images:
- name: recent
- oap-repo: ghcr.io/apache/skywalking/oap
- oap-tag: cef4f6dcac5b14cd67f51a64ad08052bbc046653
- ui-repo: ghcr.io/apache/skywalking/ui
- ui-tag: cef4f6dcac5b14cd67f51a64ad08052bbc046653
+ test:
+ - name: Run Skywalking E2E Test (Elasticsearch as database)
+ config: test/e2e/e2e-elasticsearch.yaml
+ - name: Run Skywalking E2E Test (BanyanDB as database)
+ config: test/e2e/e2e-banyandb.yaml
+ - name: Run SWCK E2E Test
+ config: test/e2e/swck/e2e.yaml
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
+ OAP_TAG: 14fbd975be077082ed6fa604e05479dd9af0d995
+ OAP_REPO: ghcr.io/apache/skywalking/oap
+ UI_TAG: 14fbd975be077082ed6fa604e05479dd9af0d995
+ UI_REPO: ghcr.io/apache/skywalking/ui
+ SATELLITE_TAG: v35bfaff6352b4dc351a706772796a1f79b651c14
SATELLITE_REPO: ghcr.io/apache/skywalking-satellite/skywalking-satellite
steps:
- uses: actions/checkout@v2
@@ -63,17 +60,13 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup go
- uses: actions/setup-go@v2
+ uses: actions/setup-go@v4
with:
- go-version: '1.16'
- - name: Run Skywalking E2E Test
+ go-version: '1.20'
+ - name: ${{ matrix.test.name }}
uses:
apache/skywalking-infra-e2e@45584853d6f660102c523b1e9cb5815d12ae55d3
with:
- e2e-file: $GITHUB_WORKSPACE/test/e2e/e2e.yaml
- - name: Run SWCK E2E Test
- uses:
apache/skywalking-infra-e2e@afdf1cca0519d65bc480d8680b7a27f9b41fc421
- with:
- e2e-file: $GITHUB_WORKSPACE/test/e2e/swck/e2e.yaml
+ e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.config }}
- if: ${{ failure() }}
run: |
df -h
diff --git a/CHANGES.md b/CHANGES.md
index 733e38d..c8053e4 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,12 @@ Changes by Version
==================
Release Notes.
+4.6.0
+------------------
+
+- Integrate BanyanDB as storage solution
+- Bump up swck to v0.8.0
+
4.5.0
------------------
diff --git a/README.md b/README.md
index c92e316..d8349cd 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ There are required values that you must set explicitly when
deploying SkyWalking
| name | description | example |
| ---- | ----------- | ------- |
| `oap.image.tag` | the OAP docker image tag | `9.2.0` |
-| `oap.storageType` | the storage type of the OAP | `elasticsearch`,
`postgresql`, etc. |
+| `oap.storageType` | the storage type of the OAP | `elasticsearch`,
`postgresql`, `banyandb`, etc. |
| `ui.image.tag` | the UI docker image tag | `9.2.0` |
You can set these required values via command line (e.g. `--set
oap.image.tag=9.2.0 --set oap.storageType=elasticsearch`),
@@ -66,6 +66,22 @@ helm repo add elastic https://helm.elastic.co
helm dep up ${REPO}/skywalking
```
+To use banyandb as storage solution, you can try
+
+```shell
+export REPO=chart
+git clone https://github.com/apache/skywalking-helm
+cd skywalking-helm
+helm install "${SKYWALKING_RELEASE_NAME}" \
+ ${REPO}/skywalking \
+ -n "${SKYWALKING_RELEASE_NAMESPACE}" \
+ --set oap.image.tag=9.5.0 \
+ --set oap.storageType=banyandb \
+ --set ui.image.tag=9.5.0 \
+ --set elasticsearch.enabled=false \
+ --set banyandb.enabled=true
+```
+
## Install development version of SWCK Adapter using master branch
This is needed **only** when you want to install [SWCK
Adapter](https://github.com/apache/skywalking-swck/tree/master/adapter) from
master branch.
@@ -136,6 +152,7 @@ elasticsearch:
user: "xxx" # [optional]
password: "xxx" # [optional]
```
+The same goes for PostgreSQL and BanyanDB.
## Install development version using ghcr.io Helm repository
@@ -161,9 +178,9 @@ This is needed **only** when you want to install source
codes.
helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n
"${SKYWALKING_RELEASE_NAMESPACE}"
```
-## Install a specific version of SkyWalking with an existing Elasticsearch
+## Install a specific version of SkyWalking with an existing database
-Modify the connection information to the existing elasticsearch cluster in
file [`values-my-es.yaml`](chart/skywalking/values-my-es.yaml).
+If you want to use a specific version of elasticsearch as storage solution,
for instance, modify the connection information to the existing elasticsearch
cluster in file [`values-my-es.yaml`](chart/skywalking/values-my-es.yaml).
```shell script
helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n
"${SKYWALKING_RELEASE_NAMESPACE}" \
diff --git a/chart/adapter/Chart.yaml b/chart/adapter/Chart.yaml
index 3a0ac7c..97065c3 100644
--- a/chart/adapter/Chart.yaml
+++ b/chart/adapter/Chart.yaml
@@ -16,7 +16,7 @@
apiVersion: v2
name: skywalking-helm-swck-adapter
home: https://github.com/apache/skywalking-swck/tree/master/adapter
-version: 0.7.0
+version: 0.8.0
description: Provide custom metrics coming from SkyWalking OAP cluster for
autoscaling by Kubernetes HPA
icon:
https://raw.githubusercontent.com/apache/skywalking-kubernetes/master/logo/sw-logo-for-chart.jpg
sources:
diff --git a/chart/adapter/README.md b/chart/adapter/README.md
index 6f5c187..b224a7c 100644
--- a/chart/adapter/README.md
+++ b/chart/adapter/README.md
@@ -45,7 +45,7 @@ The following table lists the configurable parameters of the
adapter chart and t
| `.serviceAccountName` | The service account name of adapter
| `skywalking-custom-metrics-apiserver` |
| `.image.repository` | Adapter container image name |
`docker.io/apache/skywalking-swck` |
| `.image.pullPolicy` | Adapter container image pull policy
| `IfNotPresent` |
-| `.image.tag` | Adapter container image tag |
`v0.7.0` |
+| `.image.tag` | Adapter container image tag |
`v0.8.0` |
| `.service.port` | The port for the adapter service
| `6.1.0` |
| `.oap.service.name` | The service name of OAP
| `skywalking-system-oap` |
| `.oap.service.namespace` | The service namespace of OAP
| `skywalking-system` |
diff --git a/chart/adapter/values.yaml b/chart/adapter/values.yaml
index 5c3bcce..aa941c0 100644
--- a/chart/adapter/values.yaml
+++ b/chart/adapter/values.yaml
@@ -23,7 +23,7 @@ serviceAccountName: skywalking-custom-metrics-apiserver
image:
repository: docker.io/apache/skywalking-swck
pullPolicy: IfNotPresent
- tag: "v0.7.0"
+ tag: "v0.8.0"
service:
port: 6443
oap:
diff --git a/chart/operator/Chart.yaml b/chart/operator/Chart.yaml
index 3b98943..5400c19 100644
--- a/chart/operator/Chart.yaml
+++ b/chart/operator/Chart.yaml
@@ -16,7 +16,7 @@
apiVersion: v2
name: skywalking-helm-swck-operator
home: https://github.com/apache/skywalking-swck/tree/master/operator
-version: 0.7.0
+version: 0.8.0
description: Provision and maintain SkyWalking backend components
icon:
https://raw.githubusercontent.com/apache/skywalking-kubernetes/master/logo/sw-logo-for-chart.jpg
sources:
diff --git a/chart/operator/README.md b/chart/operator/README.md
index 406b3be..7afa6db 100644
--- a/chart/operator/README.md
+++ b/chart/operator/README.md
@@ -44,7 +44,7 @@ The following table lists the configurable parameters of the
operator chart and
| `.serviceAccountName` | The service account name of operator
| `skywalking-swck-controller-manager` |
| `.image.repository` | Operator container image name
| `docker.io/apache/skywalking-swck` |
| `.image.pullPolicy` | Operator container image pull policy
| `IfNotPresent` |
-| `.image.tag` | Operator container image tag
| `v0.7.0` |
+| `.image.tag` | Operator container image tag
| `v0.8.0` |
| `.metrics.service.port` | The port for the operator metrics service
| `8443` |
| `.webhook.service.port` | The port for the operator web hook service
| `9443` |
| `.resources.limits.cpu` | The limits of cpu in the operator
| `200m` |
diff --git a/chart/operator/templates/crds.yaml
b/chart/operator/templates/crds.yaml
index 14b6920..3bdd752 100644
--- a/chart/operator/templates/crds.yaml
+++ b/chart/operator/templates/crds.yaml
@@ -19,7 +19,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include
"operator.fullname" . | trunc (int (sub 63 (len "-serving-cert"))) | printf
"%s-serving-cert" }}
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
name: fetchers.operator.skywalking.apache.org
spec:
conversion:
@@ -131,7 +131,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include
"operator.fullname" . | trunc (int (sub 63 (len "-serving-cert"))) | printf
"%s-serving-cert" }}
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
name: javaagents.operator.skywalking.apache.org
spec:
conversion:
@@ -237,7 +237,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include
"operator.fullname" . | trunc (int (sub 63 (len "-serving-cert"))) | printf
"%s-serving-cert" }}
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
name: oapserverconfigs.operator.skywalking.apache.org
spec:
conversion:
@@ -453,7 +453,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: oapserverdynamicconfigs.operator.skywalking.apache.org
spec:
@@ -550,7 +550,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include
"operator.fullname" . | trunc (int (sub 63 (len "-serving-cert"))) | printf
"%s-serving-cert" }}
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
name: oapservers.operator.skywalking.apache.org
spec:
conversion:
@@ -1118,7 +1118,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include
"operator.fullname" . | trunc (int (sub 63 (len "-serving-cert"))) | printf
"%s-serving-cert" }}
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
name: satellites.operator.skywalking.apache.org
spec:
conversion:
@@ -1463,7 +1463,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include
"operator.fullname" . | trunc (int (sub 63 (len "-serving-cert"))) | printf
"%s-serving-cert" }}
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
name: storages.operator.skywalking.apache.org
spec:
conversion:
@@ -1721,7 +1721,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: swagents.operator.skywalking.apache.org
spec:
@@ -1981,7 +1981,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include
"operator.fullname" . | trunc (int (sub 63 (len "-serving-cert"))) | printf
"%s-serving-cert" }}
- controller-gen.kubebuilder.io/version: v0.7.0
+ controller-gen.kubebuilder.io/version: v0.8.0
name: uis.operator.skywalking.apache.org
spec:
conversion:
diff --git a/chart/operator/values.yaml b/chart/operator/values.yaml
index ddbed3a..91e0be9 100644
--- a/chart/operator/values.yaml
+++ b/chart/operator/values.yaml
@@ -23,7 +23,7 @@ serviceAccountName: skywalking-swck-controller-manager
image:
repository: docker.io/apache/skywalking-swck
pullPolicy: IfNotPresent
- tag: "v0.7.0"
+ tag: "v0.8.0"
securityContext:
allowPrivilegeEscalation: false
metrics:
diff --git a/chart/skywalking/Chart.yaml b/chart/skywalking/Chart.yaml
index 6951033..b236d8d 100644
--- a/chart/skywalking/Chart.yaml
+++ b/chart/skywalking/Chart.yaml
@@ -38,3 +38,7 @@ dependencies:
version: 12.1.2
repository:
https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
condition: postgresql.enabled
+ - name: skywalking-banyandb-helm
+ version: 0.1.0
+ repository: oci://registry-1.docker.io/apache
+ condition: banyandb.enabled
diff --git a/chart/skywalking/templates/_helpers.tpl
b/chart/skywalking/templates/_helpers.tpl
index 7461915..ed2513f 100644
--- a/chart/skywalking/templates/_helpers.tpl
+++ b/chart/skywalking/templates/_helpers.tpl
@@ -115,6 +115,15 @@ Create the name of the service account to use for the
satellite cluster
echo "Waiting for postgresql..."
sleep 3
done
+{{- else if eq .Values.oap.storageType "banyandb" -}}
+{{- $banyandbHost := "banyandb-http" -}}
+{{- if not .Values.banyandb.enabled -}}
+{{- $banyandbHost = .Values.banyandb.config.httpHost -}}
+{{- end }}
+- name: wait-for-banyandb
+ image: curlimages/curl
+ imagePullPolicy: IfNotPresent
+ command: ['sh', '-c', 'for i in $(seq 1 60); do curl {{ $banyandbHost }}:{{
.Values.banyandb.config.httpPort }}/api/healthz && exit 0 || sleep 5; done;
exit 1']
{{- end }}
{{- end -}}
@@ -150,5 +159,14 @@ Create the name of the service account to use for the
satellite cluster
value: "{{ .Values.postgresql.auth.username }}"
- name: SW_DATA_SOURCE_PASSWORD
value: "{{ .Values.postgresql.auth.password }}"
+{{- else if eq .Values.oap.storageType "banyandb" }}
+{{- $banyandbHost := "banyandb-grpc" -}}
+{{- if not .Values.banyandb.enabled -}}
+{{- $banyandbHost = .Values.banyandb.config.grpcHost -}}
+{{- end }}
+- name: SW_STORAGE_BANYANDB_HOST
+ value: "{{ $banyandbHost }}"
+- name: SW_STORAGE_BANYANDB_PORT
+ value: "{{ .Values.banyandb.config.grpcPort }}"
{{- end }}
{{- end -}}
diff --git a/chart/skywalking/values.yaml b/chart/skywalking/values.yaml
index addc8ca..5e68acf 100644
--- a/chart/skywalking/values.yaml
+++ b/chart/skywalking/values.yaml
@@ -444,6 +444,14 @@ postgresql:
persistence:
enabled: false
+banyandb:
+ enabled: false
+ config:
+ grpcHost: banyandb-grpc
+ httpHost: banyandb-http
+ grpcPort: 17912
+ httpPort: 17913
+
satellite:
name: satellite
replicas: 1
diff --git a/test/e2e/e2e.yaml b/test/e2e/e2e-banyandb.yaml
similarity index 97%
copy from test/e2e/e2e.yaml
copy to test/e2e/e2e-banyandb.yaml
index 91fb678..c879b8a 100644
--- a/test/e2e/e2e.yaml
+++ b/test/e2e/e2e-banyandb.yaml
@@ -45,8 +45,6 @@ setup:
helm dep up chart/skywalking
helm -n istio-system install skywalking chart/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}' \
@@ -55,7 +53,9 @@ setup:
--set ui.image.tag=$UI_TAG \
--set oap.image.repository=$OAP_REPO \
--set oap.image.tag=$OAP_TAG \
- --set oap.storageType=elasticsearch \
+ --set oap.storageType=banyandb \
+ --set elasticsearch.enabled=false \
+ --set banyandb.enabled=true \
--set satellite.enabled=true \
--set satellite.image.repository=$SATELLITE_REPO \
--set satellite.image.tag=$SATELLITE_TAG \
@@ -161,14 +161,14 @@ verify:
# 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' -
+ - query: swctl --display yaml
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
metrics linear --name=endpoint_resp_time --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' -
+ - query: swctl --display yaml
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
metrics linear --name=endpoint_resp_time --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
diff --git a/test/e2e/e2e.yaml b/test/e2e/e2e-elasticsearch.yaml
similarity index 98%
rename from test/e2e/e2e.yaml
rename to test/e2e/e2e-elasticsearch.yaml
index 91fb678..39870d8 100644
--- a/test/e2e/e2e.yaml
+++ b/test/e2e/e2e-elasticsearch.yaml
@@ -161,14 +161,14 @@ verify:
# 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' -
+ - query: swctl --display yaml
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
metrics linear --name=endpoint_resp_time --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' -
+ - query: swctl --display yaml
--base-url=http://${service_skywalking_ui_host}:${service_skywalking_ui_80}/graphql
metrics linear --name=endpoint_resp_time --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
diff --git a/test/e2e/env b/test/e2e/env
index b08c955..fd128cc 100644
--- a/test/e2e/env
+++ b/test/e2e/env
@@ -23,4 +23,4 @@
SW_AGENT_CLIENT_JS_COMMIT=af0565a67d382b683c1dbd94c379b7080db61449
SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016
SW_KUBERNETES_COMMIT_SHA=0f3ec68e5a7e1608cec8688716b848ed15e971e5
-SW_CTL_COMMIT=45a5f9807126dc6ea9fe06e17e7aafbe212436d2
+SW_CTL_COMMIT=9d2d0edccda2afe5cf24f1e632142f40e80e8fa4
diff --git a/test/e2e/expected/dependency-services-instance-productpage.yml
b/test/e2e/expected/dependency-services-instance-productpage.yml
index 1494adf..959380f 100644
--- a/test/e2e/expected/dependency-services-instance-productpage.yml
+++ b/test/e2e/expected/dependency-services-instance-productpage.yml
@@ -19,7 +19,7 @@ nodes:
name: {{ notEmpty .name }}
serviceid: {{ b64enc "e2e::reviews" }}.1
servicename: e2e::reviews
- type: http
+ type: ""
isreal: true
- id: {{ notEmpty .id }}
name: {{ notEmpty .name }}
diff --git a/test/e2e/expected/dependency-services-productpage.yml
b/test/e2e/expected/dependency-services-productpage.yml
index 39589b7..eb43aca 100644
--- a/test/e2e/expected/dependency-services-productpage.yml
+++ b/test/e2e/expected/dependency-services-productpage.yml
@@ -35,25 +35,34 @@ nodes:
calls:
{{- contains .calls }}
- source: {{ b64enc "e2e::istio-ingressgateway"}}.1
- sourcecomponents: []
+ sourcecomponents:
+ - http
target: {{ b64enc "e2e::productpage"}}.1
- targetcomponents: []
+ targetcomponents:
+ - http
+ - mtls
id: {{ b64enc "e2e::istio-ingressgateway"}}.1-{{ b64enc
"e2e::productpage"}}.1
detectpoints:
- CLIENT
- SERVER
- source: {{ b64enc "e2e::productpage"}}.1
- sourcecomponents: []
+ sourcecomponents:
+ - http
target: {{ b64enc "e2e::details"}}.1
- targetcomponents: []
+ targetcomponents:
+ - http
+ - mtls
id: {{ b64enc "e2e::productpage"}}.1-{{ b64enc "e2e::details"}}.1
detectpoints:
- CLIENT
- SERVER
- source: {{ b64enc "e2e::productpage" }}.1
- sourcecomponents: []
+ sourcecomponents:
+ - http
target: {{ b64enc "e2e::reviews"}}.1
- targetcomponents: []
+ targetcomponents:
+ - http
+ - mtls
id: {{ b64enc "e2e::productpage" }}.1-{{ b64enc "e2e::reviews"}}.1
detectpoints:
- CLIENT
diff --git a/test/e2e/expected/dependency-services-reviews.yml
b/test/e2e/expected/dependency-services-reviews.yml
index d41c779..0ccdaec 100644
--- a/test/e2e/expected/dependency-services-reviews.yml
+++ b/test/e2e/expected/dependency-services-reviews.yml
@@ -31,17 +31,23 @@ nodes:
calls:
{{- contains .calls }}
- source: {{ b64enc "e2e::productpage"}}.1
- sourcecomponents: []
+ sourcecomponents:
+ - http
target: {{ b64enc "e2e::reviews"}}.1
- targetcomponents: []
+ targetcomponents:
+ - http
+ - mtls
id: {{ b64enc "e2e::productpage"}}.1-{{ b64enc "e2e::reviews"}}.1
detectpoints:
- CLIENT
- SERVER
- source: {{ b64enc "e2e::reviews" }}.1
- sourcecomponents: []
+ sourcecomponents:
+ - http
target: {{ b64enc "e2e::ratings"}}.1
- targetcomponents: []
+ targetcomponents:
+ - http
+ - mtls
id: {{ b64enc "e2e::reviews" }}.1-{{ b64enc "e2e::ratings"}}.1
detectpoints:
- CLIENT
diff --git a/test/e2e/expected/hpa-metrics.yaml
b/test/e2e/expected/hpa-metrics.yaml
index 54084dd..264ecf9 100644
--- a/test/e2e/expected/hpa-metrics.yaml
+++ b/test/e2e/expected/hpa-metrics.yaml
@@ -15,5 +15,11 @@
{{- contains . }}
- key: {{ notEmpty .key }}
- value: {{ gt .value 15 }}
+ value:
+ value: 0
+ isemptyvalue: true
+- key: {{ notEmpty .key }}
+ value:
+ value: {{ gt .value.value 15 }}
+ isemptyvalue: false
{{- end }}
\ No newline at end of file
diff --git a/test/e2e/expected/metrics-has-value.yml
b/test/e2e/expected/metrics-has-value.yml
index d9c4985..ceb5b00 100644
--- a/test/e2e/expected/metrics-has-value.yml
+++ b/test/e2e/expected/metrics-has-value.yml
@@ -15,5 +15,11 @@
{{- contains . }}
- key: {{ notEmpty .key }}
- value: {{ ge .value 1 }}
+ value:
+ value: 0
+ isemptyvalue: true
+- key: {{ notEmpty .key }}
+ value:
+ value: {{ ge .value.value 1 }}
+ isemptyvalue: false
{{- end }}
\ No newline at end of file
diff --git a/test/e2e/expected/service-instance.yml
b/test/e2e/expected/service-instance.yml
index 658cdbd..8210388 100644
--- a/test/e2e/expected/service-instance.yml
+++ b/test/e2e/expected/service-instance.yml
@@ -16,7 +16,25 @@
{{- contains . }}
- id: {{ notEmpty .id }}
name: {{ notEmpty .name }}
- attributes: []
+ attributes:
+ {{- contains .attributes }}
+ - name: pod
+ value: {{ notEmpty .value }}
+ - name: namespace
+ value: default
+ - name: app
+ value: {{ notEmpty .value }}
+ - name: pod-template-hash
+ value: {{ notEmpty .value }}
+ - name: security.istio.io/tlsMode
+ value: istio
+ - name: service.istio.io/canonical-name
+ value: {{ notEmpty .value }}
+ - name: service.istio.io/canonical-revision
+ value: {{ notEmpty .value }}
+ - name: version
+ value: {{ notEmpty .value }}
+ {{- end }}
language: UNKNOWN
instanceuuid: {{ notEmpty .instanceuuid }}
{{- end }}
diff --git a/test/e2e/expected/service.yml b/test/e2e/expected/service.yml
index ba6d14b..e29cc7f 100644
--- a/test/e2e/expected/service.yml
+++ b/test/e2e/expected/service.yml
@@ -16,20 +16,44 @@
{{- contains . }}
- id: {{ b64enc "e2e::istio-ingressgateway" }}.1
name: e2e::istio-ingressgateway
- group: ""
+ group: "e2e"
+ shortname: "istio-ingressgateway"
+ layers:
+ - MESH
+ normal: true
- id: {{ b64enc "e2e::reviews" }}.1
name: e2e::reviews
- group: ""
+ group: "e2e"
+ shortname: "reviews"
+ layers:
+ - MESH
+ normal: true
- id: {{ b64enc "e2e::ratings" }}.1
name: e2e::ratings
- group: ""
+ group: "e2e"
+ shortname: "ratings"
+ layers:
+ - MESH
+ normal: true
- id: {{ b64enc "e2e::productpage" }}.1
name: e2e::productpage
- group: ""
+ group: "e2e"
+ shortname: "productpage"
+ layers:
+ - MESH
+ normal: true
- id: {{ b64enc "e2e::details" }}.1
name: e2e::details
- group: ""
+ group: "e2e"
+ shortname: "details"
+ layers:
+ - MESH
+ normal: true
- id: {{ b64enc "e2e::mongodb" }}.1
name: e2e::mongodb
- group: ""
+ group: "e2e"
+ shortname: "mongodb"
+ layers:
+ - MESH
+ normal: true
{{- end }}
diff --git a/test/e2e/setup-e2e-shell/install-istioctl.sh
b/test/e2e/setup-e2e-shell/install-istioctl.sh
index 166ea50..bf9ff11 100644
--- a/test/e2e/setup-e2e-shell/install-istioctl.sh
+++ b/test/e2e/setup-e2e-shell/install-istioctl.sh
@@ -25,5 +25,5 @@ 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
+ cp istio-$ISTIO_VERSION/bin/istioctl $BIN_DIR/istioctl
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
index 5893252..f9bcf34 100644
--- a/test/e2e/setup-e2e-shell/install-swctl.sh
+++ b/test/e2e/setup-e2e-shell/install-swctl.sh
@@ -22,10 +22,18 @@
BASE_DIR=$1
BIN_DIR=$2
-if ! command -v swctl &> /dev/null; then
+install_swctl() {
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
+ VERSION=${SW_CTL_COMMIT} make install DESTDIR=$BIN_DIR
+}
+
+if ! command -v swctl &> /dev/null; then
+ echo "swctl is not installed"
+ install_swctl
+elif ! swctl --version | grep -q "${SW_CTL_COMMIT}"; then
+ # Check if the installed version is correct
+ echo "swctl is already installed, but version is not ${SW_CTL_COMMIT}, will
re-install it"
+ install_swctl
+fi
diff --git a/test/e2e/setup-e2e-shell/install-yq.sh
b/test/e2e/setup-e2e-shell/install-yq.sh
index 28fd299..e0cca70 100644
--- a/test/e2e/setup-e2e-shell/install-yq.sh
+++ b/test/e2e/setup-e2e-shell/install-yq.sh
@@ -24,7 +24,7 @@ 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
+ curl -kLo yq.tar.gz https://github.com/mikefarah/yq/archive/v4.33.3.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
index 3d440fa..8ac8ed2 100644
--- a/test/e2e/setup-e2e-shell/install.sh
+++ b/test/e2e/setup-e2e-shell/install.sh
@@ -32,4 +32,4 @@ 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
+echo "success to install $NAME"
diff --git a/test/e2e/swck/e2e.yaml b/test/e2e/swck/e2e.yaml
index c83863e..0f26e93 100644
--- a/test/e2e/swck/e2e.yaml
+++ b/test/e2e/swck/e2e.yaml
@@ -51,7 +51,7 @@ setup:
- name: Setup oapserver and ui
command: |
kubectl create namespace skywalking-system
- curl
https://raw.githubusercontent.com/apache/skywalking-swck/v0.7.0/test/e2e/skywalking-components.yaml
| grep -B20 "\-\-\-" | kubectl apply -f -
+ curl
https://raw.githubusercontent.com/apache/skywalking-swck/v0.8.0/test/e2e/skywalking-components.yaml
| grep -B20 "\-\-\-" | kubectl apply -f -
wait:
- namespace: skywalking-system
resource: OAPServer/skywalking-system
@@ -59,14 +59,14 @@ setup:
- name: Setup java agent demo
command: |
kubectl label namespace skywalking-system swck-injection=enabled
- curl
https://raw.githubusercontent.com/apache/skywalking-swck/v0.7.0/test/e2e/demo.yaml
| sed 's/oap-service/skywalking-system-oap.skywalking-system/' | kubectl apply
-f -
+ curl
https://raw.githubusercontent.com/apache/skywalking-swck/v0.8.0/test/e2e/demo.yaml
| sed 's/oap-service/skywalking-system-oap.skywalking-system/' | kubectl apply
-f -
wait:
- namespace: skywalking-system
resource: deployment/demo
for: condition=Available
- name: Setup the hpa of java agent demo
command: |
- curl
https://raw.githubusercontent.com/apache/skywalking-swck/v0.7.0/test/e2e/hpa-demo.yaml
| kubectl apply -f -
+ curl
https://raw.githubusercontent.com/apache/skywalking-swck/v0.8.0/test/e2e/hpa-demo.yaml
| kubectl apply -f -
timeout: 20m
cleanup: