hub-clusters-creator 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/Makefile +28 -0
- data/bin/aks.rb +42 -0
- data/bin/gke.rb +48 -0
- data/docker/Dockerfile +20 -0
- data/docker/entrypoint.sh +89 -0
- data/hub-clusters-creator.gemspec +34 -0
- data/lib/hub-clusters-creator.rb +49 -0
- data/lib/hub-clusters-creator/agent.rb +142 -0
- data/lib/hub-clusters-creator/errors.rb +48 -0
- data/lib/hub-clusters-creator/kube/kube.rb +147 -0
- data/lib/hub-clusters-creator/logging.rb +46 -0
- data/lib/hub-clusters-creator/providers/aks/azure.rb +272 -0
- data/lib/hub-clusters-creator/providers/aks/helpers.rb +105 -0
- data/lib/hub-clusters-creator/providers/aks/schema.yaml +125 -0
- data/lib/hub-clusters-creator/providers/bootstrap.rb +226 -0
- data/lib/hub-clusters-creator/providers/gke/gke.rb +264 -0
- data/lib/hub-clusters-creator/providers/gke/helpers.rb +364 -0
- data/lib/hub-clusters-creator/providers/gke/schema.yaml +411 -0
- data/lib/hub-clusters-creator/providers/schema.yaml +113 -0
- data/lib/hub-clusters-creator/template.rb +45 -0
- data/lib/hub-clusters-creator/version.rb +20 -0
- metadata +192 -0
@@ -0,0 +1,411 @@
|
|
1
|
+
---
|
2
|
+
type: object
|
3
|
+
title: GKE Provider Configuration
|
4
|
+
description: >
|
5
|
+
Defined the provider configuration options required to initialize the
|
6
|
+
provider integration
|
7
|
+
required:
|
8
|
+
- account
|
9
|
+
- project
|
10
|
+
- region
|
11
|
+
|
12
|
+
properties:
|
13
|
+
account:
|
14
|
+
$id: '#/config/account'
|
15
|
+
type: string
|
16
|
+
title: Service Account Credentials JSON
|
17
|
+
description: >
|
18
|
+
The credentials used to speak the GCP APIs; you create a service account
|
19
|
+
under the Cloud IAM within the project, adding the permissions 'Compute
|
20
|
+
Admin' role to the service account via IAM tab. Once done you can create
|
21
|
+
a key under 'Service Accounts' and copy and paste the JSON payload here.
|
22
|
+
default: ''
|
23
|
+
pattern: ^.*$
|
24
|
+
|
25
|
+
project:
|
26
|
+
$id: '#/config/project'
|
27
|
+
type: string
|
28
|
+
title: GCP Project
|
29
|
+
description: >
|
30
|
+
The name of the GCP project you are provisioning the cluster done.
|
31
|
+
default: ''
|
32
|
+
pattern: ^.*$
|
33
|
+
|
34
|
+
region:
|
35
|
+
$id: '#/config/region'
|
36
|
+
type: string
|
37
|
+
title: GCP Region
|
38
|
+
description: >
|
39
|
+
The GCP region you wish to the cluster to reside within.
|
40
|
+
default: ''
|
41
|
+
examples:
|
42
|
+
- europe-west2
|
43
|
+
pattern: ^.*$
|
44
|
+
|
45
|
+
---
|
46
|
+
type: object
|
47
|
+
title: GKE Cluster configuration
|
48
|
+
description: >
|
49
|
+
Provides the ability to create a fully managed GKE cluster within GCP.
|
50
|
+
required:
|
51
|
+
- description
|
52
|
+
- disk_size_gb
|
53
|
+
- enable_autoscaler
|
54
|
+
- enable_autoupgrade
|
55
|
+
- enable_binary_authorization
|
56
|
+
- enable_horizontal_pod_autoscaler
|
57
|
+
- enable_http_loadbalancer
|
58
|
+
- enable_istio
|
59
|
+
- enable_logging
|
60
|
+
- enable_monitoring
|
61
|
+
- enable_private_endpoint
|
62
|
+
- enable_private_network
|
63
|
+
- image_type
|
64
|
+
- machine_type
|
65
|
+
- maintenance_window
|
66
|
+
- network
|
67
|
+
- subnetwork
|
68
|
+
- version
|
69
|
+
|
70
|
+
properties:
|
71
|
+
authorized_master_cidrs:
|
72
|
+
$id: '#/properties/authorized_master_cidrs'
|
73
|
+
tag: default
|
74
|
+
type: array
|
75
|
+
title: Master Authorized Networks
|
76
|
+
items:
|
77
|
+
$id: '#/properties/authorized_master_cidrs/items'
|
78
|
+
type: object
|
79
|
+
title: Networks
|
80
|
+
required:
|
81
|
+
- name
|
82
|
+
- cidr
|
83
|
+
properties:
|
84
|
+
name:
|
85
|
+
$id: '#/properties/authorized_master_cidrs/items/properties/name'
|
86
|
+
type: string
|
87
|
+
title: Display Name
|
88
|
+
default: 'allowany'
|
89
|
+
examples:
|
90
|
+
- any
|
91
|
+
pattern: ^(.*)$
|
92
|
+
cidr:
|
93
|
+
$id: '#/properties/authorized_master_cidrs/items/properties/cidr'
|
94
|
+
type: string
|
95
|
+
title: Network CIDR
|
96
|
+
default: '0.0.0.0/0'
|
97
|
+
examples:
|
98
|
+
- 0.0.0.0/0
|
99
|
+
pattern: ^([\d]{1,3}\.){3}[\d]{1,3}\/[\d]{1,2}$
|
100
|
+
|
101
|
+
cluster_ipv4_cidr:
|
102
|
+
$id: '#/properties/cluster_ipv4_cidr'
|
103
|
+
tag: advanced
|
104
|
+
type: string
|
105
|
+
title: Cluster Pod Network
|
106
|
+
default: ''
|
107
|
+
description: >
|
108
|
+
An optional network CIDR which is used to place the pod network on
|
109
|
+
(else the cloud provider chooses)
|
110
|
+
examples:
|
111
|
+
- ''
|
112
|
+
pattern: ^(([\d]{1,3}\.){3}[\d]{1,3}\/[\d]{1,2}|)$
|
113
|
+
|
114
|
+
create_subnetwork:
|
115
|
+
$id: '#/properties/create_subnetwork'
|
116
|
+
tag: advanced
|
117
|
+
type: boolean
|
118
|
+
title: Create Subnetwork
|
119
|
+
description: >
|
120
|
+
Indicates if you wish to create a new subnetwork to place the
|
121
|
+
compute node on to.
|
122
|
+
default: false
|
123
|
+
examples:
|
124
|
+
- false
|
125
|
+
- true
|
126
|
+
|
127
|
+
description:
|
128
|
+
$id: '#/properties/description'
|
129
|
+
tag: default
|
130
|
+
type: string
|
131
|
+
title: Description
|
132
|
+
description: >
|
133
|
+
A summary description for this cluster.
|
134
|
+
default: ''
|
135
|
+
examples:
|
136
|
+
- Dev Cluster
|
137
|
+
pattern: ^(.*)$
|
138
|
+
|
139
|
+
disk_size_gb:
|
140
|
+
$id: '#/properties/disk_size_gb'
|
141
|
+
tag: default
|
142
|
+
type: integer
|
143
|
+
title: Compute Disk Size (GB)
|
144
|
+
default: 100
|
145
|
+
description: >
|
146
|
+
Is the size of the disk used by the compute nodes
|
147
|
+
The dns domain which the cluster is using; this mist be accessible from
|
148
|
+
with inside the project.
|
149
|
+
examples:
|
150
|
+
- 100
|
151
|
+
|
152
|
+
enable_autorepair:
|
153
|
+
$id: '#/properties/enable_autorepair'
|
154
|
+
tag: default
|
155
|
+
type: boolean
|
156
|
+
title: Node Autorepair
|
157
|
+
default: true
|
158
|
+
description: >
|
159
|
+
Indicates if the cluster should be configured with auto repair
|
160
|
+
is enabled
|
161
|
+
examples:
|
162
|
+
- false
|
163
|
+
- true
|
164
|
+
|
165
|
+
enable_autoscaler:
|
166
|
+
$id: '#/properties/enable_autoscaler'
|
167
|
+
tag: default
|
168
|
+
type: boolean
|
169
|
+
title: Cluster Autoscaling
|
170
|
+
default: true
|
171
|
+
description: >
|
172
|
+
Indicates if the cluster should be configured with cluster autoscaling
|
173
|
+
turned on
|
174
|
+
examples:
|
175
|
+
- false
|
176
|
+
- true
|
177
|
+
|
178
|
+
enable_autoupgrade:
|
179
|
+
$id: '#/properties/enable_autoupgrade'
|
180
|
+
tag: default
|
181
|
+
type: boolean
|
182
|
+
title: Cluster Autoupgrading
|
183
|
+
default: true
|
184
|
+
description: >
|
185
|
+
Indicates if the cluster should be configured with autograding
|
186
|
+
enabled; meaning both nodes are masters are autoscated scheduled
|
187
|
+
to upgrade during your maintenance window.
|
188
|
+
examples:
|
189
|
+
- false
|
190
|
+
- true
|
191
|
+
|
192
|
+
enable_binary_authorization:
|
193
|
+
$id: '#/properties/enable_binary_authorization'
|
194
|
+
tag: advanced
|
195
|
+
type: boolean
|
196
|
+
title: Binary Authorization Service
|
197
|
+
default: false
|
198
|
+
description: >
|
199
|
+
Indicates if the cluster should be configured with GKE Binary
|
200
|
+
Authorization service enabled.
|
201
|
+
examples:
|
202
|
+
- false
|
203
|
+
- true
|
204
|
+
|
205
|
+
enable_horizontal_pod_autoscaler:
|
206
|
+
$id: '#/properties/enable_horizontal_pod_autoscaler'
|
207
|
+
tag: default
|
208
|
+
type: boolean
|
209
|
+
title: Horizontal Pod Autoscaler
|
210
|
+
default: false
|
211
|
+
description: >
|
212
|
+
Indicates if the cluster is configured with the horizontal
|
213
|
+
pod autoscaler addon. This automatically adjusts the cpu and
|
214
|
+
memory resources of pods in accordances with their demand. You
|
215
|
+
should ensure you use PodDisruptionBudgets if this is enabled.
|
216
|
+
examples:
|
217
|
+
- false
|
218
|
+
- true
|
219
|
+
|
220
|
+
enable_http_loadbalancer:
|
221
|
+
$id: '#/properties/enable_http_loadbalancer'
|
222
|
+
tag: default
|
223
|
+
type: boolean
|
224
|
+
title: HTTP Ingress Controller
|
225
|
+
default: true
|
226
|
+
description: >
|
227
|
+
Indicates if the cluster should be configured with the GKE
|
228
|
+
ingress controller. When enabled GKE will autodiscover your
|
229
|
+
ingress resources and provision load balancer on your behalf.
|
230
|
+
examples:
|
231
|
+
- false
|
232
|
+
- true
|
233
|
+
|
234
|
+
enable_istio:
|
235
|
+
$id: '#/properties/enable_istio'
|
236
|
+
tag: default
|
237
|
+
type: boolean
|
238
|
+
title: Istio Service Mesh
|
239
|
+
default: false
|
240
|
+
description: >
|
241
|
+
Indicates if the GKE Istio service mesh is deployed to the
|
242
|
+
cluster; this provides a more feature rich routing and
|
243
|
+
instrumentation.
|
244
|
+
examples:
|
245
|
+
- false
|
246
|
+
- true
|
247
|
+
|
248
|
+
enable_logging:
|
249
|
+
$id: '#/properties/enable_logging'
|
250
|
+
tag: default
|
251
|
+
type: boolean
|
252
|
+
title: Stackdriver Logging
|
253
|
+
default: false
|
254
|
+
description: >
|
255
|
+
Indicates if Stackdriver metrics should be enabled for the cluster
|
256
|
+
examples:
|
257
|
+
- false
|
258
|
+
- true
|
259
|
+
|
260
|
+
enable_monitoring:
|
261
|
+
$id: '#/properties/enable_monitoring'
|
262
|
+
tag: default
|
263
|
+
type: boolean
|
264
|
+
title: Stackdriver Metrics
|
265
|
+
default: false
|
266
|
+
description: >
|
267
|
+
Indicates if Stackdriver logging should be enabled for the cluster
|
268
|
+
examples:
|
269
|
+
- false
|
270
|
+
- true
|
271
|
+
|
272
|
+
enable_private_endpoint:
|
273
|
+
$id: '#/properties/enable_private_endpoint'
|
274
|
+
tag: advanced
|
275
|
+
type: boolean
|
276
|
+
title: Private Endpoints
|
277
|
+
default: false
|
278
|
+
description: >
|
279
|
+
Indicates if the master api endpoint should be accessible from private
|
280
|
+
network only i.e. no external access
|
281
|
+
examples:
|
282
|
+
- false
|
283
|
+
- true
|
284
|
+
|
285
|
+
enable_private_network:
|
286
|
+
$id: '#/properties/enable_private_network'
|
287
|
+
tag: advanced
|
288
|
+
type: boolean
|
289
|
+
title: Private Node Networking
|
290
|
+
default: true
|
291
|
+
description: >
|
292
|
+
Indicates if compute nodes should have external ip addresses or use
|
293
|
+
private networking and a cloud-nat device.
|
294
|
+
examples:
|
295
|
+
- false
|
296
|
+
- true
|
297
|
+
|
298
|
+
image_type:
|
299
|
+
$id: '#/properties/image_type'
|
300
|
+
tag: advanced
|
301
|
+
type: string
|
302
|
+
title: Machine Image
|
303
|
+
default: 'COS'
|
304
|
+
description: >
|
305
|
+
The operating system image the compute pool should use.
|
306
|
+
examples:
|
307
|
+
- COS
|
308
|
+
pattern: ^(.*)$
|
309
|
+
|
310
|
+
machine_type:
|
311
|
+
$id: '#/properties/machine_type'
|
312
|
+
tag: default
|
313
|
+
type: string
|
314
|
+
title: Machine Type
|
315
|
+
default: n1-standard-1
|
316
|
+
description: >
|
317
|
+
The GCP machine type which the default nodes pool should use.
|
318
|
+
examples:
|
319
|
+
- n1-standard-1
|
320
|
+
pattern: ^(.*)$
|
321
|
+
|
322
|
+
maintenance_window:
|
323
|
+
$id: '#/properties/maintenance_window'
|
324
|
+
tag: default
|
325
|
+
type: string
|
326
|
+
title: Maintenance Window
|
327
|
+
default: '03:00'
|
328
|
+
description: >
|
329
|
+
Specifies the maintenance window in hours and minutes which GKE
|
330
|
+
is permitted to run maintenance operations.
|
331
|
+
examples:
|
332
|
+
- '03:00'
|
333
|
+
pattern: ^[\d]{2}:[\d]{2}$
|
334
|
+
|
335
|
+
master_ipv4_cidr_block:
|
336
|
+
$id: '#/properties/master_ipv4_cidr_block'
|
337
|
+
tag: default
|
338
|
+
type: string
|
339
|
+
title: Master Peer Network Block
|
340
|
+
default: '172.16.0.0/28'
|
341
|
+
description: >
|
342
|
+
If private networking is enabled, this is the peering subnet used
|
343
|
+
to to GKE master api layer. Note, this must be unique within the
|
344
|
+
network.
|
345
|
+
examples:
|
346
|
+
- '172.16.0.0/28'
|
347
|
+
pattern: ^([\d]{1,3}\.){3}[\d]{1,3}\/[\d]{1,2}$
|
348
|
+
|
349
|
+
network:
|
350
|
+
$id: '#/properties/network'
|
351
|
+
tag: default
|
352
|
+
type: string
|
353
|
+
title: GCP Network
|
354
|
+
default: 'default'
|
355
|
+
description: >
|
356
|
+
The GCP network which the cluster should reside on, which have
|
357
|
+
to be unique within the GCP project and created beforehand.
|
358
|
+
examples:
|
359
|
+
- 'default'
|
360
|
+
pattern: ^(.*)$
|
361
|
+
|
362
|
+
preemptible:
|
363
|
+
$id: '#/properties/preemptible'
|
364
|
+
tag: advanced
|
365
|
+
type: boolean
|
366
|
+
title: Preemptible Nodes
|
367
|
+
default: false
|
368
|
+
description: >
|
369
|
+
Indicates if the default pool created should use preemptible nodes.
|
370
|
+
examples:
|
371
|
+
- false
|
372
|
+
- true
|
373
|
+
|
374
|
+
services_ipv4_cidr:
|
375
|
+
$id: '#/properties/services_ipv4_cidr'
|
376
|
+
tag: advanced
|
377
|
+
type: string
|
378
|
+
title: Cluster Services CIDR
|
379
|
+
default: ''
|
380
|
+
description: >
|
381
|
+
An optional network cidr configured for the cluster services,
|
382
|
+
otherwise GCP will decide.
|
383
|
+
examples:
|
384
|
+
- ''
|
385
|
+
pattern: ^(([\d]{1,3}\.){3}[\d]{1,3}\/[\d]{1,2}|)$
|
386
|
+
|
387
|
+
subnetwork:
|
388
|
+
$id: '#/properties/subnetwork'
|
389
|
+
tag: default
|
390
|
+
type: string
|
391
|
+
title: Subnetwork for Nodes
|
392
|
+
default: 'default'
|
393
|
+
description: >
|
394
|
+
The name of the GCP subnetwork which the cluster nodes should reside.
|
395
|
+
examples:
|
396
|
+
- default
|
397
|
+
pattern: ^(.*)$
|
398
|
+
|
399
|
+
version:
|
400
|
+
$id: '#/properties/version'
|
401
|
+
tag: default
|
402
|
+
type: string
|
403
|
+
title: Initial Kubernetes Version
|
404
|
+
default: 'latest'
|
405
|
+
description: >
|
406
|
+
The initial kubernetes version which the cluster should be
|
407
|
+
configured with.
|
408
|
+
examples:
|
409
|
+
- latest
|
410
|
+
- 1.13.7-gke.8
|
411
|
+
pattern: ^(.*)$
|
@@ -0,0 +1,113 @@
|
|
1
|
+
---
|
2
|
+
required:
|
3
|
+
- disk_size_gb
|
4
|
+
- domain
|
5
|
+
- size
|
6
|
+
properties:
|
7
|
+
domain:
|
8
|
+
$id: '#/properties/domain'
|
9
|
+
tag: default
|
10
|
+
type: string
|
11
|
+
title: DNS Domain
|
12
|
+
default: ''
|
13
|
+
description: >
|
14
|
+
The dns domain which the cluster is using; this mist be accessible from
|
15
|
+
with inside the project.
|
16
|
+
examples:
|
17
|
+
- 'example.com'
|
18
|
+
|
19
|
+
size:
|
20
|
+
$id: '#/properties/size'
|
21
|
+
tag: default
|
22
|
+
type: integer
|
23
|
+
title: Initial Node Size
|
24
|
+
default: 1
|
25
|
+
description: >
|
26
|
+
The number of nodes per zone which should exist in the cluster.
|
27
|
+
examples:
|
28
|
+
- 1
|
29
|
+
- 10
|
30
|
+
|
31
|
+
max_size:
|
32
|
+
$id: '#/properties/max_size'
|
33
|
+
tag: default
|
34
|
+
type: integer
|
35
|
+
title: Max Size
|
36
|
+
default: 10
|
37
|
+
description: >
|
38
|
+
Assuming the autoscaler is enabled this is the maximum number
|
39
|
+
nodes permitted.
|
40
|
+
examples:
|
41
|
+
- 10
|
42
|
+
|
43
|
+
disk_size_gb:
|
44
|
+
$id: '#/properties/disk_size_gb'
|
45
|
+
tag: default
|
46
|
+
type: integer
|
47
|
+
title: Compute Disk Size (GB)
|
48
|
+
default: 100
|
49
|
+
description: >
|
50
|
+
Is the size of the disk used by the compute nodes
|
51
|
+
examples:
|
52
|
+
- 100
|
53
|
+
|
54
|
+
github_client_id:
|
55
|
+
$id: '#/properties/github_client_id'
|
56
|
+
tag: default
|
57
|
+
type: string
|
58
|
+
title: Github Client ID
|
59
|
+
default: ''
|
60
|
+
description: >
|
61
|
+
The Github client id for the oauth2 application
|
62
|
+
examples:
|
63
|
+
- ''
|
64
|
+
pattern: ^(.*)$
|
65
|
+
|
66
|
+
github_client_secret:
|
67
|
+
$id: '#/properties/github_client_secret'
|
68
|
+
tag: default
|
69
|
+
type: string
|
70
|
+
title: Github Client Secret
|
71
|
+
default: ''
|
72
|
+
description: >
|
73
|
+
The Github client secret taken from the oauth2 application
|
74
|
+
examples:
|
75
|
+
- ''
|
76
|
+
pattern: ^(.*)$
|
77
|
+
|
78
|
+
grafana_disk_size:
|
79
|
+
$id: '#/properties/grafana_disk_size'
|
80
|
+
tag: advanced
|
81
|
+
type: integer
|
82
|
+
title: Grafana Disk Size
|
83
|
+
default: 10
|
84
|
+
description: >
|
85
|
+
The size of the disk used for grafana instance
|
86
|
+
examples:
|
87
|
+
- 10
|
88
|
+
- 100
|
89
|
+
|
90
|
+
grafana_hostname:
|
91
|
+
$id: '#/properties/grafana_hostname'
|
92
|
+
tag: default
|
93
|
+
type: string
|
94
|
+
title: Grafana Hostname
|
95
|
+
default: 'grafana'
|
96
|
+
description: >
|
97
|
+
The dns hostname which grafana should be configured to respond to.
|
98
|
+
examples:
|
99
|
+
- grafana
|
100
|
+
- metrics
|
101
|
+
pattern: ^(.*)$
|
102
|
+
|
103
|
+
grafana_version:
|
104
|
+
$id: '#/properties/grafana_version'
|
105
|
+
tag: advanced
|
106
|
+
type: string
|
107
|
+
title: Grafana Version
|
108
|
+
default: '6.2.5'
|
109
|
+
description: >
|
110
|
+
The version of the grafana which should be installed.
|
111
|
+
examples:
|
112
|
+
- 6.2.5
|
113
|
+
pattern: ^(.*)$
|