1.阅读连接:
什么是服务网格?Istio 基础教程 | 云原生资料库
2.envoy文档
3.覆盖的功能点:
路径:istio/features.yaml at master · istio/istio · GitHub
4.运行
背景:有go,有helm
镜像,推到可下载的仓库上
go test -tags integ ./tests/integration/pilot/... --istio.test.kube.config=~/.kube/config --istio.test.hub=二级仓库地址
5.调试-执行某些测试用例:
cd ./tests/integration/pilot
go test -v -failfast -tags=integ -run TestMirroring -test.timeout 20m -test.testlogfile ./log --istio.test.echo.readinessTimeout=20m --istio.test.skipVM=true --istio.test.kube.loadbalancer=false --istio.test.kube.deploy=true --istio.test.kube.deployEastWestGW=true --istio.test.work_dir=./work_dir --istio.test.nocleanup=false --istio.test.echo.callTimeout=180s --istio.test.env=kube --istio.test.kube.config=~/.kube/config --istio.test.hub=仓库二级地址 --istio.test.tag=latest
6.vscode调试:
dlv dap
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch test function",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${fileDirname}/../tests/integration/pilot/mirror_test.go",
"args": [
"-test.failfast",
"-test.testlogfile",
"log",//在脚本目录下生成的文件
"-test.run",
"TestMirroring$",
"--istio.test.skipVM",
"--istio.test.kube.loadbalancer=false",
"--istio.test.kube.deploy=false",//将不部署istiod
"--istio.test.kube.deployEastWestGW=true",//将部署istio-eastwestgateway
"--istio.test.work_dir",
"./work_dir",//在脚本目录下生成的目录
"--istio.test.nocleanup",
"--istio.test.echo.callTimeout",
"180s",
"--istio.test.env",
"kube",
"--istio.test.kube.config",
"~/.kube/config",
"--istio.test.hub",
"仓库二级地址",
"--istio.test.tag",
"latest"
],
"buildFlags": "-tags=integ"
}
],
}