This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
main.tf
99 lines (97 loc) · 2.23 KB
/
main.tf
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
provider "gardener" {
kube_file = "${file("<my-gardener-service-account-kubeconfig>")}"
/*kube_file =<<-EOT
kind: Config
clusters:
- cluster:
certificate-authority-data: >-
<certificate-authority-data>
server: "https://gardener.garden.canary.k8s.ondemand.com"
name: garden
users:
- user:
token: >-
<token>
name: robot
contexts:
- context:
cluster: garden
user: robot
namespace: garden-<profile>
name: garden-<profile>-robot
current-context: garden-<profile>-robot
EOT*/
}
resource "gardener_shoot" "gardener_cluster" {
metadata {
name = "test-cluster"
namespace = "garden-<profile>"
}
timeouts {
create = "30m0s"
update = "30m0s"
delete = "20m0s"
}
spec {
cloud_profile_name = "aws"
region = "eu-central-1"
secret_binding_name = "<secret_binding>"
networking {
nodes = "10.250.0.0/16"
pods = ""
services = ""
type = "calico"
}
maintenance {
auto_update {
kubernetes_version = "true"
machine_image_version = "true"
}
time_window {
begin = "030000+0000"
end = "040000+0000"
}
}
provider {
type = "aws"
infrastructure_config {
aws {
networks {
vpc {
cidr = "10.250.0.0/16"
}
zones {
name = "eu-central-1a"
workers = "10.250.0.0/19"
public = "10.250.32.0/20"
internal = "10.250.48.0/20"
}
}
}
}
worker {
name = "cpu-worker"
zones = ["eu-central-1a"]
max_surge = "3"
max_unavailable = "1"
maximum = "4"
minimum = "2"
volume {
size = "30Gi"
type = "gp2"
}
machine {
image {
name = "gardenlinux"
version = "27.1.0"
}
type = "m5.xlarge"
}
}
}
kubernetes {
allow_privileged_containers = true
version = "1.18"
}
}
}