-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathdeploy-nginx-services-through-ingress.yml
More file actions
270 lines (269 loc) · 6.38 KB
/
deploy-nginx-services-through-ingress.yml
File metadata and controls
270 lines (269 loc) · 6.38 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建Kubernetes集群,配置Ingress与Nginx,启用监控,自定义网络与安全设置。
en: Create a Kubernetes cluster, configure Ingress with Nginx, enable monitoring,
and customize network and security settings.
Parameters:
AckName:
Type: String
Label:
en: Cluster Name
zh-cn: 集群名称
Description:
en: The name must be 1 to 63 characters in length and can contain letters, Chinese
characters, digits, and hyphens (-).
zh-cn: 名称为1~63个字符,可包含数字、汉字、英文字符或中划线(-)。
AllowedPattern: ^[a-zA-Z0-9\u4e00-\u9fa5][-a-zA-Z0-9\u4e00-\u9fa5]{0,62}$
AssociationProperty: AutoCompleteInput
AssociationPropertyMetadata:
Length: 5
Prefix: cluster-for-nginx-
CharacterClasses:
- Class: lowercase
min: 1
ZoneId:
Type: String
Label:
en: VSwitch Available Zone
zh-cn: 可用区
AssociationProperty: ALIYUN::VPC::Zone::ZoneId
Description:
en: If the available zone cannot be selected, please switch regions.
zh-cn: 如果选择不到可用区,请切换地域。
InstanceType:
Type: String
Label:
en: Instance Type
zh-cn: 节点规格
Description:
en: It is recommended to use a new generation of ecs instances. If the instance
specification cannot be selected, please change the availability zone again.
zh-cn: 建议使用新一代的 ecs 实例,如果选择不到实例规格,请重新更换可用区。
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ${ZoneId}
CreateACKClusterParams:
NetworkPlugin: terway-eniip
CommonName:
Type: String
Default: ack-for-nginx
Resources:
ModuleAcsCsProvision:
Type: MODULE::ACS::CS::Provision
Version: default
DependsOn: EnableServiceSls
EnableServiceSls:
Type: ALIYUN::ROS::AutoEnableService
Properties:
ServiceName: SLS
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock: 192.168.0.0/16
VpcName:
Fn::Sub: ${CommonName}-vpc
Vswitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
CidrBlock: 192.168.0.0/24
VSwitchName:
Fn::Sub: ${CommonName}-${ZoneId}-vsw
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupName:
Fn::Sub: ${CommonName}-sg
SecurityGroupEgress:
- PortRange: -1/-1
Priority: 1
IpProtocol: all
DestCidrIp: 0.0.0.0/0
NicType: internet
- PortRange: -1/-1
Priority: 1
IpProtocol: all
DestCidrIp: 0.0.0.0/0
NicType: intranet
RandomString:
Type: ALIYUN::RandomString
Properties:
length: 10
character_classes:
- class: lowercase
min: 1
- class: uppercase
min: 1
- class: digits
min: 1
character_sequences:
- sequence: '!@#$%^&*()_+-='
min: 1
Ack:
Type: ALIYUN::CS::ManagedKubernetesCluster
Properties:
VpcId:
Ref: Vpc
VSwitchIds:
- Ref: Vswitch
PodVswitchIds:
- Ref: Vswitch
Name:
Ref: AckName
NumOfNodes: 3
ClusterSpec: ack.pro.small
ServiceCidr: 172.16.0.0/16
Addons:
- Name: security-inspector
- Name: terway-eniip
Config: '{"IPVlan":"false","NetworkPolicy":"false","ENITrunking":"false"}'
- Name: csi-plugin
- Name: csi-provisioner
- Name: storage-operator
Config: '{"CnfsOssEnable":"false","CnfsNasEnable":"false"}'
- Name: logtail-ds
Config: '{"IngressDashboardEnabled":"true"}'
- Name: nginx-ingress-controller
Config: '{"IngressSlbNetworkType":"internet","IngressSlbSpec":"slb.s2.small"}'
- Name: ack-node-local-dns
- Name: arms-prometheus
- Name: ack-node-problem-detector
Config: '{"sls_project_name":""}'
EndpointPublicAccess: false
SnatEntry: true
LoadBalancerSpec: slb.s1.small
IsEnterpriseSecurityGroup: false
WorkerInstanceTypes:
- Ref: InstanceType
WorkerSystemDiskCategory: cloud_essd
WorkerSystemDiskSize: 40
LoginPassword:
Fn::GetAtt:
- RandomString
- value
Runtime:
Name: containerd
Version: 1.6.20
DependsOn:
- ModuleAcsCsProvision
- EnableServiceSls
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- AckName
- ZoneId
- InstanceType
Hidden:
- CommonName
TemplateTags:
- acs:technical-solution:ops-on-cloud:部署Nginx并通过Ingress暴露和监控服务-tech_solu_16
ALIYUN::ROS::Composer:
f0e44c4f:
Rect:
- 713
- 460
- 40
- 99
- 1
- 0
ResT: Composer::ROSParameter::AlibabaCloud
02566a27:
Parent: f0e44c4f
Rect:
- 666
- 381
- 63
- 139
- 2
- 0
ResT: Composer::ROSParameter::Region
301d668c:
Parent: 02566a27
Rect:
- 40
- 40
- 615
- 429
- 3
- 0
ResT: MODULE::ACS::CS::Provision
6348dbd7:
Res:
- Vpc
Parent: 02566a27
Rect:
- 442
- 279
- 102
- 190
- 3
- 0
05a45e36:
Res:
- RandomString
Parent: 02566a27
Rect:
- 40
- 40
- 615
- 304
- 3
- 0
8561516f:
Res:
- EnableServiceSls
Parent: 02566a27
Rect:
- 40
- 40
- 615
- 190
- 3
- 0
571f6950:
Res:
- Vswitch
Parent: 6348dbd7
Rect:
- 400
- 200
- 122
- 239
- 4
- 0
225dfff6:
Res:
- SecurityGroup
Parent: 6348dbd7
Rect:
- 160
- 120
- 219
- 279
- 9
- 0
6928561f:
Res:
- Ack
Parent: 571f6950
Rect:
- 40
- 40
- 279
- 304
- 10
- 0
Layer:
- 225dfff6
8cea26bc:
Parent: 02566a27
Edge:
- 6928561f
- 05a45e36
Line: 0:0:0:gray:0