forked from Azure/acs-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s_versions.go
354 lines (346 loc) · 19.7 KB
/
k8s_versions.go
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
package acsengine
import (
"strconv"
"strings"
"github.com/Azure/acs-engine/pkg/api/common"
)
var k8sComponentVersions = map[string]map[string]string{
"1.10": {
"dockerEngine": "1.13.*",
"dashboard": "kubernetes-dashboard-amd64:v1.8.3",
"exechealthz": "exechealthz-amd64:1.2",
"addon-resizer": "addon-resizer:1.7",
"heapster": "heapster-amd64:v1.5.1",
"metrics-server": "metrics-server-amd64:v0.2.1",
"kube-dns": "k8s-dns-kube-dns-amd64:1.14.8",
"addon-manager": "kube-addon-manager-amd64:v8.6",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.8",
"pause": "pause-amd64:3.1",
"tiller": "tiller:v2.8.1",
"rescheduler": "rescheduler:v0.3.1",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
"routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod,
"backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries),
"backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64),
"backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration),
"backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64),
"ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64),
"ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket),
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
},
"1.9": {
"dockerEngine": "1.13.*",
"dashboard": "kubernetes-dashboard-amd64:v1.8.3",
"exechealthz": "exechealthz-amd64:1.2",
"addon-resizer": "addon-resizer:1.7",
"heapster": "heapster-amd64:v1.5.1",
"metrics-server": "metrics-server-amd64:v0.2.1",
"kube-dns": "k8s-dns-kube-dns-amd64:1.14.8",
"addon-manager": "kube-addon-manager-amd64:v8.6",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.8",
"pause": "pause-amd64:3.1",
"tiller": "tiller:v2.8.1",
"rescheduler": "rescheduler:v0.3.1",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
"routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod,
"backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries),
"backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64),
"backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration),
"backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64),
"ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64),
"ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket),
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
},
"1.8": {
"dockerEngine": "1.13.*",
"dashboard": "kubernetes-dashboard-amd64:v1.8.3",
"exechealthz": "exechealthz-amd64:1.2",
"addon-resizer": "addon-resizer:1.7",
"heapster": "heapster-amd64:v1.5.1",
"metrics-server": "metrics-server-amd64:v0.2.1",
"kube-dns": "k8s-dns-kube-dns-amd64:1.14.8",
"addon-manager": "kube-addon-manager-amd64:v8.6",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.8",
"pause": "pause-amd64:3.1",
"tiller": "tiller:v2.8.1",
"rescheduler": "rescheduler:v0.3.1",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
"routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod,
"backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries),
"backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64),
"backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration),
"backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64),
"ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64),
"ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket),
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
},
"1.7": {
"dockerEngine": "1.13.*",
"dashboard": "kubernetes-dashboard-amd64:v1.6.3",
"exechealthz": "exechealthz-amd64:1.2",
"addon-resizer": "addon-resizer:1.7",
"heapster": "heapster-amd64:v1.5.1",
"metrics-server": "metrics-server-amd64:v0.2.1",
"kube-dns": "k8s-dns-kube-dns-amd64:1.14.5",
"addon-manager": "kube-addon-manager-amd64:v8.6",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.5",
"pause": "pause-amd64:3.0",
"tiller": "tiller:v2.8.1",
"rescheduler": "rescheduler:v0.3.1",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
"routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod,
"backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries),
"backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64),
"backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration),
"backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64),
"ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64),
"ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket),
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
},
"1.6": {
"dockerEngine": "1.12.*",
"dashboard": "kubernetes-dashboard-amd64:v1.6.3",
"exechealthz": "exechealthz-amd64:1.2",
"addon-resizer": "addon-resizer:1.7",
"heapster": "heapster-amd64:v1.3.0",
"metrics-server": "metrics-server-amd64:v0.2.1",
"kube-dns": "k8s-dns-kube-dns-amd64:1.14.5",
"addon-manager": "kube-addon-manager-amd64:v6.5",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.5",
"pause": "pause-amd64:3.0",
"tiller": "tiller:v2.8.1",
"rescheduler": "rescheduler:v0.3.1",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
"routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod,
"backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries),
"backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64),
"backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration),
"backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64),
"ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64),
"ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket),
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
},
}
// KubeConfigs represents Docker images used for Kubernetes components based on Kubernetes versions (major.minor.patch)
var KubeConfigs = getKubeConfigs()
func getKubeConfigs() map[string]map[string]string {
ret := make(map[string]map[string]string)
for _, version := range common.GetAllSupportedKubernetesVersions() {
ret[version] = getK8sVersionComponents(version, getVersionOverrides(version))
}
return ret
}
func getVersionOverrides(v string) map[string]string {
switch v {
case "1.8.11":
return map[string]string{"kube-dns": "k8s-dns-kube-dns-amd64:1.14.9"}
case "1.8.9":
return map[string]string{"windowszip": "v1.8.9-2int.zip"}
case "1.8.6":
return map[string]string{"windowszip": "v1.8.6-2int.zip"}
case "1.8.2":
return map[string]string{"windowszip": "v1.8.2-2int.zip"}
case "1.8.1":
return map[string]string{"windowszip": "v1.8.1-2int.zip"}
case "1.8.0":
return map[string]string{"windowszip": "v1.8.0-2int.zip"}
case "1.7.16":
return map[string]string{"windowszip": "v1.7.16-1int.zip"}
case "1.7.15":
return map[string]string{"windowszip": "v1.7.15-1int.zip"}
case "1.7.14":
return map[string]string{"windowszip": "v1.7.14-1int.zip"}
case "1.7.13":
return map[string]string{"windowszip": "v1.7.13-1int.zip"}
case "1.7.12":
return map[string]string{"windowszip": "v1.7.12-2int.zip"}
case "1.7.10":
return map[string]string{"windowszip": "v1.7.10-1int.zip"}
case "1.7.9":
return map[string]string{"windowszip": "v1.7.9-2int.zip"}
case "1.7.7":
return map[string]string{"windowszip": "v1.7.7-2int.zip"}
case "1.7.5":
return map[string]string{"windowszip": "v1.7.5-4int.zip"}
case "1.7.4":
return map[string]string{"windowszip": "v1.7.4-2int.zip"}
case "1.7.2":
return map[string]string{"windowszip": "v1.7.2-1int.zip"}
default:
return nil
}
}
func getK8sVersionComponents(version string, overrides map[string]string) map[string]string {
s := strings.Split(version, ".")
majorMinor := strings.Join(s[:2], ".")
var ret map[string]string
switch majorMinor {
case "1.10":
ret = map[string]string{
"hyperkube": "hyperkube-amd64:v" + version,
"ccm": "cloud-controller-manager-amd64:v" + version,
"windowszip": "v" + version + "-1int.zip",
"dockerEngineVersion": k8sComponentVersions["1.10"]["dockerEngine"],
DefaultDashboardAddonName: k8sComponentVersions["1.10"]["dashboard"],
"exechealthz": k8sComponentVersions["1.10"]["exechealthz"],
"addonresizer": k8sComponentVersions["1.10"]["addon-resizer"],
"heapster": k8sComponentVersions["1.10"]["heapster"],
DefaultMetricsServerAddonName: k8sComponentVersions["1.10"]["metrics-server"],
"dns": k8sComponentVersions["1.10"]["kube-dns"],
"addonmanager": k8sComponentVersions["1.10"]["addon-manager"],
"dnsmasq": k8sComponentVersions["1.10"]["dnsmasq"],
"pause": k8sComponentVersions["1.10"]["pause"],
DefaultTillerAddonName: k8sComponentVersions["1.10"]["tiller"],
DefaultReschedulerAddonName: k8sComponentVersions["1.10"]["rescheduler"],
"nodestatusfreq": k8sComponentVersions["1.10"]["nodestatusfreq"],
"nodegraceperiod": k8sComponentVersions["1.10"]["nodegraceperiod"],
"podeviction": k8sComponentVersions["1.10"]["podeviction"],
"routeperiod": k8sComponentVersions["1.10"]["routeperiod"],
"backoffretries": k8sComponentVersions["1.10"]["backoffretries"],
"backoffjitter": k8sComponentVersions["1.10"]["backoffjitter"],
"backoffduration": k8sComponentVersions["1.10"]["backoffduration"],
"backoffexponent": k8sComponentVersions["1.10"]["backoffexponent"],
"ratelimitqps": k8sComponentVersions["1.10"]["ratelimitqps"],
"ratelimitbucket": k8sComponentVersions["1.10"]["ratelimitbucket"],
"gchighthreshold": k8sComponentVersions["1.10"]["gchighthreshold"],
"gclowthreshold": k8sComponentVersions["1.10"]["gclowthreshold"],
}
case "1.9":
ret = map[string]string{
"hyperkube": "hyperkube-amd64:v" + version,
"ccm": "cloud-controller-manager-amd64:v" + version,
"windowszip": "v" + version + "-1int.zip",
"dockerEngineVersion": k8sComponentVersions["1.9"]["dockerEngine"],
DefaultDashboardAddonName: k8sComponentVersions["1.9"]["dashboard"],
"exechealthz": k8sComponentVersions["1.9"]["exechealthz"],
"addonresizer": k8sComponentVersions["1.9"]["addon-resizer"],
"heapster": k8sComponentVersions["1.9"]["heapster"],
DefaultMetricsServerAddonName: k8sComponentVersions["1.9"]["metrics-server"],
"dns": k8sComponentVersions["1.9"]["kube-dns"],
"addonmanager": k8sComponentVersions["1.9"]["addon-manager"],
"dnsmasq": k8sComponentVersions["1.9"]["dnsmasq"],
"pause": k8sComponentVersions["1.9"]["pause"],
DefaultTillerAddonName: k8sComponentVersions["1.9"]["tiller"],
DefaultReschedulerAddonName: k8sComponentVersions["1.9"]["rescheduler"],
"nodestatusfreq": k8sComponentVersions["1.9"]["nodestatusfreq"],
"nodegraceperiod": k8sComponentVersions["1.9"]["nodegraceperiod"],
"podeviction": k8sComponentVersions["1.9"]["podeviction"],
"routeperiod": k8sComponentVersions["1.9"]["routeperiod"],
"backoffretries": k8sComponentVersions["1.9"]["backoffretries"],
"backoffjitter": k8sComponentVersions["1.9"]["backoffjitter"],
"backoffduration": k8sComponentVersions["1.9"]["backoffduration"],
"backoffexponent": k8sComponentVersions["1.9"]["backoffexponent"],
"ratelimitqps": k8sComponentVersions["1.9"]["ratelimitqps"],
"ratelimitbucket": k8sComponentVersions["1.9"]["ratelimitbucket"],
"gchighthreshold": k8sComponentVersions["1.9"]["gchighthreshold"],
"gclowthreshold": k8sComponentVersions["1.9"]["gclowthreshold"],
}
case "1.8":
ret = map[string]string{
"hyperkube": "hyperkube-amd64:v" + version,
"ccm": "cloud-controller-manager-amd64:v" + version,
"windowszip": "v" + version + "-1int.zip",
"dockerEngineVersion": k8sComponentVersions["1.8"]["dockerEngine"],
DefaultDashboardAddonName: k8sComponentVersions["1.8"]["dashboard"],
"exechealthz": k8sComponentVersions["1.8"]["exechealthz"],
"addonresizer": k8sComponentVersions["1.8"]["addon-resizer"],
"heapster": k8sComponentVersions["1.8"]["heapster"],
DefaultMetricsServerAddonName: k8sComponentVersions["1.8"]["metrics-server"],
"dns": k8sComponentVersions["1.8"]["kube-dns"],
"addonmanager": k8sComponentVersions["1.8"]["addon-manager"],
"dnsmasq": k8sComponentVersions["1.8"]["dnsmasq"],
"pause": k8sComponentVersions["1.8"]["pause"],
DefaultTillerAddonName: k8sComponentVersions["1.8"]["tiller"],
DefaultReschedulerAddonName: k8sComponentVersions["1.8"]["rescheduler"],
"nodestatusfreq": k8sComponentVersions["1.8"]["nodestatusfreq"],
"nodegraceperiod": k8sComponentVersions["1.8"]["nodegraceperiod"],
"podeviction": k8sComponentVersions["1.8"]["podeviction"],
"routeperiod": k8sComponentVersions["1.8"]["routeperiod"],
"backoffretries": k8sComponentVersions["1.8"]["backoffretries"],
"backoffjitter": k8sComponentVersions["1.8"]["backoffjitter"],
"backoffduration": k8sComponentVersions["1.8"]["backoffduration"],
"backoffexponent": k8sComponentVersions["1.8"]["backoffexponent"],
"ratelimitqps": k8sComponentVersions["1.8"]["ratelimitqps"],
"ratelimitbucket": k8sComponentVersions["1.8"]["ratelimitbucket"],
"gchighthreshold": k8sComponentVersions["1.8"]["gchighthreshold"],
"gclowthreshold": k8sComponentVersions["1.8"]["gclowthreshold"],
}
case "1.7":
ret = map[string]string{
"hyperkube": "hyperkube-amd64:v" + version,
"dockerEngineVersion": k8sComponentVersions["1.7"]["dockerEngine"],
DefaultDashboardAddonName: k8sComponentVersions["1.7"]["dashboard"],
"exechealthz": k8sComponentVersions["1.7"]["exechealthz"],
"addonresizer": k8sComponentVersions["1.7"]["addon-resizer"],
"heapster": k8sComponentVersions["1.7"]["heapster"],
DefaultMetricsServerAddonName: k8sComponentVersions["1.7"]["metrics-server"],
"dns": k8sComponentVersions["1.7"]["kube-dns"],
"addonmanager": k8sComponentVersions["1.7"]["addon-manager"],
"dnsmasq": k8sComponentVersions["1.7"]["dnsmasq"],
"pause": k8sComponentVersions["1.7"]["pause"],
DefaultTillerAddonName: k8sComponentVersions["1.7"]["tiller"],
DefaultReschedulerAddonName: k8sComponentVersions["1.7"]["rescheduler"],
"nodestatusfreq": k8sComponentVersions["1.7"]["nodestatusfreq"],
"nodegraceperiod": k8sComponentVersions["1.7"]["nodegraceperiod"],
"podeviction": k8sComponentVersions["1.7"]["podeviction"],
"routeperiod": k8sComponentVersions["1.7"]["routeperiod"],
"backoffretries": k8sComponentVersions["1.7"]["backoffretries"],
"backoffjitter": k8sComponentVersions["1.7"]["backoffjitter"],
"backoffduration": k8sComponentVersions["1.7"]["backoffduration"],
"backoffexponent": k8sComponentVersions["1.7"]["backoffexponent"],
"ratelimitqps": k8sComponentVersions["1.7"]["ratelimitqps"],
"ratelimitbucket": k8sComponentVersions["1.7"]["ratelimitbucket"],
"gchighthreshold": k8sComponentVersions["1.7"]["gchighthreshold"],
"gclowthreshold": k8sComponentVersions["1.7"]["gclowthreshold"],
}
case "1.6":
ret = map[string]string{
"hyperkube": "hyperkube-amd64:v" + version,
"dockerEngineVersion": k8sComponentVersions["1.6"]["dockerEngine"],
DefaultDashboardAddonName: k8sComponentVersions["1.6"]["dashboard"],
"exechealthz": k8sComponentVersions["1.6"]["exechealthz"],
"addonresizer": k8sComponentVersions["1.6"]["addon-resizer"],
"heapster": k8sComponentVersions["1.6"]["heapster"],
DefaultMetricsServerAddonName: k8sComponentVersions["1.6"]["metrics-server"],
"dns": k8sComponentVersions["1.6"]["kube-dns"],
"addonmanager": k8sComponentVersions["1.6"]["addon-manager"],
"dnsmasq": k8sComponentVersions["1.6"]["dnsmasq"],
"pause": k8sComponentVersions["1.6"]["pause"],
DefaultTillerAddonName: k8sComponentVersions["1.6"]["tiller"],
DefaultReschedulerAddonName: k8sComponentVersions["1.6"]["rescheduler"],
"nodestatusfreq": k8sComponentVersions["1.6"]["nodestatusfreq"],
"nodegraceperiod": k8sComponentVersions["1.6"]["nodegraceperiod"],
"podeviction": k8sComponentVersions["1.6"]["podeviction"],
"routeperiod": k8sComponentVersions["1.6"]["routeperiod"],
"backoffretries": k8sComponentVersions["1.6"]["backoffretries"],
"backoffjitter": k8sComponentVersions["1.6"]["backoffjitter"],
"backoffduration": k8sComponentVersions["1.6"]["backoffduration"],
"backoffexponent": k8sComponentVersions["1.6"]["backoffexponent"],
"ratelimitqps": k8sComponentVersions["1.6"]["ratelimitqps"],
"ratelimitbucket": k8sComponentVersions["1.6"]["ratelimitbucket"],
"gchighthreshold": k8sComponentVersions["1.6"]["gchighthreshold"],
"gclowthreshold": k8sComponentVersions["1.6"]["gclowthreshold"],
}
default:
ret = nil
}
for k, v := range overrides {
ret[k] = v
}
return ret
}