MCPcopy Index your code
hub / github.com/alibaba/virtual-environment

github.com/alibaba/virtual-environment @v0.6.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.0 ↗ · + Follow
217 symbols 619 edges 68 files 112 documented · 52% updated 2y agov0.6.0 · 2021-09-18★ 22210 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

KtEnv (Virtual Environment Operator)

Isolate kubernetes pod communication into virtual groups according to pod label, with route fallback support.

diagram-en-us.jpg

Check ☞document☜ for more information.

中文介绍

Instruction

This project inspired by the "project environment" practice widely used in Alibaba Group, witch allow developers create virtual testing environment cheaply and quickly by reusing many service instances from another testing environment.

           +----------+   +----------+   +----------+
ParentEnv  | ServiceA |   | ServiceB |   | ServiceC |
           +----------+   +-^------+-+   +----------+
                            |      |
           +-----------+    |      |    +-----------+
SubEnv    -> ServiceA' +----+      +----> ServiceC' |
           +-----------+                +-----------+

This is a simple example of 2 virtual environments. A ParentEnv contains instances of all the 3 services, while a SubEnv inherited from ParentEnv only contains instance of ServiceA and ServiceC (record as ServiceA' and ServiceC').

The arrow shows a call sequence "ServiceA->ServiceB->ServiceC", when the request comes from instance ServiceA', it should firstly fallback to hit ServiceB in the ParentEnv, and finally turn to ServiceC' in SubEnv.

Support

Contact us with DingTalk:

dingtalk-group-en-us.jpg

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 106
Method 74
Struct 18
Class 16
FuncType 1
Interface 1
TypeAlias 1

Languages

Go80%
Java20%

Modules by API surface

pkg/component/router/istio/http/virtual_service_generator.go16 symbols
pkg/apis/env/v1alpha2/zz_generated.deepcopy.go16 symbols
pkg/component/router/istio/http_router.go11 symbols
cmd/operator/logger.go9 symbols
pkg/apis/env/v1alpha2/virtualenvironment_types.go8 symbols
pkg/shared/logger/logger.go7 symbols
pkg/component/router/router_interface.go7 symbols
pkg/controller/virtualenv/reconcile_trigger.go6 symbols
pkg/component/router/istio/envoy/envoy_tag_appender.go6 symbols
cmd/webhook/admission_controller.go6 symbols
pkg/controller/virtualenv/virtualenv_controller.go5 symbols
pkg/controller/statefulset/statefulset_controller.go5 symbols

For agents

$ claude mcp add virtual-environment \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page