kezhenxu94 commented on a change in pull request #8013: URL: https://github.com/apache/skywalking/pull/8013#discussion_r737042181
########## File path: test/e2e-v2/cases/istio/als/e2e.yaml ########## @@ -0,0 +1,211 @@ +# 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: ../../../script/env + kind: + import-images: + - skywalking/ui:$TAG + - skywalking/oap:$TAG + expose-ports: + - namespace: istio-system + resource: service/skywalking-ui + port: 80 + steps: + - name: install yq + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + - name: install kubectl + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh kubectl + - name: install istio + command: | + bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh istioctl + istioctl install -y --set profile=demo \ + --set meshConfig.defaultConfig.envoyAccessLogService.address=skywalking-oap.istio-system:11800 \ + --set meshConfig.enableEnvoyAccessLogService=true + kubectl label namespace default istio-injection=enabled + - name: Install helm + command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh helm + - name: Install SkyWalking + command: | + rm -rf skywalking-kubernetes && git clone https://github.com/apache/skywalking-kubernetes.git + cd skywalking-kubernetes + git reset --hard $SW_KUBERNETES_COMMIT_SHA + cd chart + mkdir -p skywalking/files/conf.d/oap/ && cp ../../test/e2e-v2/cases/istio/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 elasticsearch.imageTag=7.5.1 \ + --set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS=$ALS_ANALYZER \ + --set oap.env.SW_ENVOY_METRIC_ALS_TCP_ANALYSIS=$ALS_ANALYZER \ + --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.tag=$TAG \ + --set oap.image.repository=skywalking/oap \ + --set oap.storageType=elasticsearch + wait: + - namespace: istio-system + resource: deployments/skywalking-oap + 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 + +cleanup: + on: always Review comment: This part is not recommended now, read https://github.com/apache/skywalking-infra-e2e/blob/main/docs/en/setup/Configuration-File.md#cleanup > If the on option under cleanup is not set, it will be automatically set to always if there is environment variable CI=true, which is present on many popular CI services, such as GitHub Actions, CircleCI, etc., otherwise it will be set to success, so the testing environment can be preserved when tests failed in your local machine. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
