forked from bsteciuk/kismatic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplan_patterns.go
155 lines (152 loc) · 5.05 KB
/
plan_patterns.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
package integration
type NFSVolume struct {
Host string
}
type PlanAWS struct {
Etcd []NodeDeets
Master []NodeDeets
Worker []NodeDeets
Ingress []NodeDeets
Storage []NodeDeets
NFSVolume []NFSVolume
MasterNodeFQDN string
MasterNodeShortName string
SSHUser string
SSHKeyFile string
HomeDirectory string
DisablePackageInstallation bool
DisconnectedInstallation bool
DockerRegistryServer string
DockerRegistryCAPath string
DockerRegistryUsername string
DockerRegistryPassword string
ModifyHostsFiles bool
HTTPProxy string
HTTPSProxy string
NoProxy string
UseDirectLVM bool
ServiceCIDR string
DisableCNI bool
CNIProvider string
DisableHelm bool
HeapsterReplicas int
HeapsterInfluxdbPVC string
CloudProvider string
KubeAPIServerOptions map[string]string
KubeControllerManagerOptions map[string]string
KubeSchedulerOptions map[string]string
KubeProxyOptions map[string]string
KubeletOptions map[string]string
}
// Certain fields are still present for backwards compatabilty when testing upgrades
const planAWSOverlay = `cluster:
name: kubernetes
admin_password: abbazabba
disable_package_installation: {{.DisablePackageInstallation}}
disconnected_installation: {{.DisconnectedInstallation}}
networking:
type: overlay # Required for KET <= v1.4.1
pod_cidr_block: 172.16.0.0/16
service_cidr_block: {{if .ServiceCIDR}}{{.ServiceCIDR}}{{else}}172.20.0.0/16{{end}}
update_hosts_files: {{.ModifyHostsFiles}}
http_proxy: {{.HTTPProxy}}
https_proxy: {{.HTTPSProxy}}
no_proxy: {{.NoProxy}}
certificates:
expiry: 17520h
ca_expiry: 17520h
ssh:
user: {{.SSHUser}}
ssh_key: {{.SSHKeyFile}}
ssh_port: 22
kube_apiserver:
option_overrides: { {{ if .KubeAPIServerOptions }}{{ range $k, $v := .KubeAPIServerOptions }}"{{ $k }}": "{{ $v }}"{{end}}{{end}} }
kube_controller_manager:
option_overrides: { {{if .KubeControllerManagerOptions}}{{ range $k, $v := .KubeControllerManagerOptions }}"{{ $k }}": "{{ $v }}"{{end}}{{end}} }
kube_scheduler:
option_overrides: { {{if .KubeSchedulerOptions}}{{ range $k, $v := .KubeSchedulerOptions }}"{{ $k }}": "{{ $v }}"{{end}}{{end}} }
kube_proxy:
option_overrides: { {{if .KubeProxyOptions}}{{ range $k, $v := .KubeProxyOptions }}"{{ $k }}": "{{ $v }}"{{end}}{{end}} }
kubelet:
option_overrides: { {{if .KubeletOptions}}{{ range $k, $v := .KubeletOptions }}"{{ $k }}": "{{ $v }}"{{end}}{{end}} }
cloud_provider:
provider: {{.CloudProvider}}{{if .UseDirectLVM}}
docker:
storage:
direct_lvm:
enabled: true
block_device: "/dev/xvdb"
enable_deferred_deletion: false{{end}}
docker_registry:
server: {{.DockerRegistryServer}}
CA: {{.DockerRegistryCAPath}}
username: {{.DockerRegistryUsername}}
password: {{.DockerRegistryPassword}}
add_ons:
cni:
disable: {{.DisableCNI}}
provider: {{if .CNIProvider}}{{.CNIProvider}}{{else}}calico{{end}}
options:
calico:
mode: overlay
log_level: info
heapster:
disable: false
options:
heapster_replicas: {{if eq .HeapsterReplicas 0}}2{{else}}{{.HeapsterReplicas}}{{end}}
heapster:
replicas: {{if eq .HeapsterReplicas 0}}2{{else}}{{.HeapsterReplicas}}{{end}}
service_type: ClusterIP
sink: influxdb:http://heapster-influxdb.kube-system.svc:8086
influxdb:
pvc_name: {{.HeapsterInfluxdbPVC}}
package_manager:
disable: {{.DisableHelm}}
provider: helm
rescheduler:
disable: false
etcd:
expected_count: {{len .Etcd}}
nodes:{{range .Etcd}}
- host: {{.Hostname}}
ip: {{.PublicIP}}
internalip: {{.PrivateIP}}{{end}}
master:
expected_count: {{len .Master}}
nodes:{{range .Master}}
- host: {{.Hostname}}
ip: {{.PublicIP}}
internalip: {{.PrivateIP}}
labels:
com.integrationtest/master: true{{end}}
load_balanced_fqdn: {{.MasterNodeFQDN}}
load_balanced_short_name: {{.MasterNodeShortName}}
worker:
expected_count: {{len .Worker}}
nodes:{{range .Worker}}
- host: {{.Hostname}}
ip: {{.PublicIP}}
internalip: {{.PrivateIP}}
labels:
com.integrationtest/worker: true{{end}}
ingress:
expected_count: {{len .Ingress}}
nodes:{{range .Ingress}}
- host: {{.Hostname}}
ip: {{.PublicIP}}
internalip: {{.PrivateIP}}
labels:
com.integrationtest/ingress: true{{end}}
storage:
expected_count: {{len .Storage}}
nodes:{{range .Storage}}
- host: {{.Hostname}}
ip: {{.PublicIP}}
internalip: {{.PrivateIP}}
labels:
com.integrationtest/storage: true{{end}}
nfs:
nfs_volume:{{range .NFSVolume}}
- nfs_host: {{.Host}}
mount_path: /{{end}}
`