Skip to content

Commit 480dfa1

Browse files
committed
EKS support with TPR2 for TK8
Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com>
1 parent 7fb224a commit 480dfa1

File tree

2 files changed

+131
-0
lines changed

2 files changed

+131
-0
lines changed

cmd/cli/provisioner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
azure "github.com/kubernauts/tk8-provisioner-azure"
2525
baremetal "github.com/kubernauts/tk8-provisioner-baremetal"
2626
cattleaws "github.com/kubernauts/tk8-provisioner-cattle-aws"
27+
cattleeks "github.com/kubernauts/tk8-provisioner-cattle-eks"
2728
eks "github.com/kubernauts/tk8-provisioner-eks"
2829
nutanix "github.com/kubernauts/tk8-provisioner-nutanix"
2930
openstack "github.com/kubernauts/tk8-provisioner-openstack"
@@ -40,6 +41,7 @@ var provisioners = map[string]provisioner.Provisioner{
4041
"azure": azure.NewAzure(),
4142
"baremetal": baremetal.NewBaremetal(),
4243
"cattle-aws": cattleaws.NewCattleAWS(),
44+
"cattle-eks": cattleeks.NewCattleEKS(),
4345
"eks": eks.NewEKS(),
4446
"nutanix": nutanix.NewNutanix(),
4547
"openstack": openstack.NewOpenstack(),

pkg/templates/variables.go

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,135 @@
1414

1515
package templates
1616

17+
var VariablesCattleEKS = `
18+
variable "service_role" {
19+
default = "{{.ServiceRole}}"
20+
description = "Service linked role for EKS"
21+
type = string
22+
}
23+
24+
variable "associate_worker_node_public_ip" {
25+
default = {{.AssociatePublicIp}}
26+
description = "Associate public IP with worker nodes"
27+
type = string
28+
}
29+
30+
variable "kubernetes_version" {
31+
default = "{{.KubernetesVersion}}"
32+
description = "Kubernetes version"
33+
type = string
34+
}
35+
variable "maximum_nodes" {
36+
default = {{.MaximumNodes}}
37+
description = "Maximum worker nodes"
38+
type = string
39+
}
40+
41+
variable "minimum_nodes" {
42+
default = {{.MinimumNodes}}
43+
description = "Minimum size for worker nodes"
44+
type = string
45+
}
46+
47+
variable "instance_type" {
48+
default = "{{.InstanceType}}"
49+
description = "Instance type for worker nodes"
50+
type = string
51+
}
52+
53+
variable "ami_id" {
54+
default = "{{.AmiId}}"
55+
description = "AMI id for the instance"
56+
type = string
57+
}
58+
59+
variable "session_token" {
60+
default = "{{.SessionToken}}"
61+
description = "Session token to use with the client key and secret key if applicable"
62+
type = string
63+
}
64+
65+
variable "disk_size" {
66+
default = "{{.DiskSize}}"
67+
description = "Root disk size for instances in GB"
68+
type = string
69+
}
70+
71+
variable "rancher_api_url" {
72+
default = "{{.RancherApiUrl}}"
73+
description = "Rancher API URL"
74+
type = string
75+
}
76+
77+
variable "rancher_access_key" {
78+
description = "Rancher server's access key"
79+
}
80+
81+
variable "rancher_secret_key" {
82+
description = "Rancher server's secret key"
83+
}
84+
85+
variable "rancher_cluster_name" {
86+
default = "{{.RancherClusterName}}"
87+
description = "Rancher cluster name"
88+
type = string
89+
}
90+
91+
variable "region" {
92+
default = "{{.Region}}"
93+
description = "AWS region"
94+
type = string
95+
}
96+
97+
variable "existing_vpc" {
98+
default = {{.ExistingVpc}}
99+
description = "Use existing VPC for creating clusters"
100+
type = string
101+
}
102+
103+
variable "vpc_id" {
104+
default = "{{.VpcId}}"
105+
description = "VPC ID"
106+
type = string
107+
}
108+
109+
variable "subnet_id1" {
110+
default = "{{.SubnetId1}}"
111+
description = "subnet id"
112+
type = string
113+
}
114+
115+
variable "subnet_id2" {
116+
default = "{{.SubnetId2}}"
117+
description = "Subnet Id 2"
118+
type = string
119+
}
120+
121+
variable "subnet_id3" {
122+
default = "{{.SubnetId3}}"
123+
description = "Subnet Id 3"
124+
type = string
125+
}
126+
127+
variable "security_group_name" {
128+
default = "{{.SecurityGroupName}}"
129+
description = "security group id"
130+
type = string
131+
}
132+
133+
variable "AWS_ACCESS_KEY_ID" {
134+
description = "AWS access key"
135+
}
136+
137+
variable "AWS_SECRET_ACCESS_KEY" {
138+
description = "AWS secret key"
139+
}
140+
141+
variable "AWS_DEFAULT_REGION" {
142+
description = "AWS default region"
143+
}
144+
`
145+
17146
var VariablesRKE = `
18147
variable "cluster_name" {
19148
default = "{{.ClusterName}}"

0 commit comments

Comments
 (0)