-
Notifications
You must be signed in to change notification settings - Fork 0
/
istio.drawio
79 lines (79 loc) · 9.52 KB
/
istio.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<mxfile host="app.diagrams.net" modified="2021-08-31T10:38:11.165Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36" etag="xtsrUtjoZ0-qI8UU279e" version="15.0.2" type="github">
<diagram id="hEXDd10Iq0LCWIj7nufN" name="Page-1">
<mxGraphModel dx="2216" dy="1940" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="dJHb-aSYwerNETjksJnf-1" value="DiscoveryServer" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="-270" y="130" width="330" height="280" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-2" value="// 消息推送队列
+ pushQueue: PushQueue
// 存储当前的配置信息和各种资源信息
+ Env: model.Environment
// 生成控制面的配置
+ ConfigGenerator: core.ConfigGenerator
// 生成xDS 资源
+ Generators: map[string]model.XdsResourceGenerator
// 已经建立链接的服务连接
+ adsClients map[string]*Connection" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-1">
<mxGeometry y="26" width="330" height="164" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-3" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-1">
<mxGeometry y="190" width="330" height="8" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-4" value="// 对外入口,中间建立一步异步化和 RateLimit,就到 Push
+ ConfigUpdate(req *PushRequest)
// 触发推送逻辑
+ Push(req *model.PushRequest)" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-1">
<mxGeometry y="198" width="330" height="82" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-10" value="Environment" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="200" y="170" width="330" height="138" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-11" value="// Controller For 各种 kube 资源
+ ServiceDiscovery
// 关注 Istio 自身配置(vs..dt..)
+ IstioConfigStore
// 全局 PushContext,为 FullPush 和 Diff 服务
+ PushContext" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-10">
<mxGeometry y="26" width="330" height="104" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-12" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-10">
<mxGeometry y="130" width="330" height="8" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-18" value="PushRequest" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="600" y="390" width="340" height="148" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-19" value="// 本次推送的上下文
+ Push: PushContext" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-18">
<mxGeometry y="26" width="340" height="64" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-20" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-18">
<mxGeometry y="90" width="340" height="8" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-21" value="+ method(type): type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-18">
<mxGeometry y="98" width="340" height="50" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-22" value="PushContext" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="600" y="170" width="340" height="148" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-23" value="// 服务列表
+ ServiceIndex: serviceIndex
// VS 配置
+ virtualServiceIndex virtualServiceIndex" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-22">
<mxGeometry y="26" width="340" height="64" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-24" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-22">
<mxGeometry y="90" width="340" height="8" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-25" value="+ method(type): type" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="dJHb-aSYwerNETjksJnf-22">
<mxGeometry y="98" width="340" height="50" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-26" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center"><i>&lt;&lt;Interface&gt;&gt;</i><br><b>XDSUpdater</b></p><hr size="1"><p style="margin: 0px ; margin-left: 4px">&nbsp;</p>&nbsp; + EDSUpdate(shard, hostname string, namespace string, entry []*IstioEndpoint)<br>&nbsp; +&nbsp;ConfigUpdate(req *PushRequest)" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="1">
<mxGeometry x="-430" y="-150" width="650" height="110" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-27" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="dJHb-aSYwerNETjksJnf-1" target="dJHb-aSYwerNETjksJnf-26">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint x="-490" y="80" as="sourcePoint" />
<mxPoint x="-330" y="80" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-28" value="绝大多数的资源变动都会触发 ConfigUpdate 函数" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="-440" y="249" width="140" height="91" as="geometry" />
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-29" value="" style="endArrow=diamondThin;endFill=1;endSize=24;html=1;exitX=0.997;exitY=0.591;exitDx=0;exitDy=0;exitPerimeter=0;entryX=-0.003;entryY=0.558;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="dJHb-aSYwerNETjksJnf-2" target="dJHb-aSYwerNETjksJnf-11">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint x="270" y="260" as="sourcePoint" />
<mxPoint x="420" y="240" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="dJHb-aSYwerNETjksJnf-30" value="" style="endArrow=diamondThin;endFill=1;endSize=24;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="dJHb-aSYwerNETjksJnf-18">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint x="770.0000000000002" y="180.0039999999999" as="sourcePoint" />
<mxPoint x="770" y="318" as="targetPoint" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>