Skip to content

Commit f00cc0e

Browse files
authored
Merge pull request #113 from kubernauts/eks-tpr2-support
EKS support with TPR2 for TK8
2 parents 7fb224a + 2cd3bdf commit f00cc0e

File tree

2 files changed

+127
-0
lines changed

2 files changed

+127
-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: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,131 @@
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 "TOKEN_KEY" {
78+
description = "Rancher token key"
79+
}
80+
81+
variable "rancher_cluster_name" {
82+
default = "{{.RancherClusterName}}"
83+
description = "Rancher cluster name"
84+
type = string
85+
}
86+
87+
variable "region" {
88+
default = "{{.Region}}"
89+
description = "AWS region"
90+
type = string
91+
}
92+
93+
variable "existing_vpc" {
94+
default = {{.ExistingVpc}}
95+
description = "Use existing VPC for creating clusters"
96+
type = string
97+
}
98+
99+
variable "vpc_id" {
100+
default = "{{.VpcId}}"
101+
description = "VPC ID"
102+
type = string
103+
}
104+
105+
variable "subnet_id1" {
106+
default = "{{.SubnetId1}}"
107+
description = "subnet id"
108+
type = string
109+
}
110+
111+
variable "subnet_id2" {
112+
default = "{{.SubnetId2}}"
113+
description = "Subnet Id 2"
114+
type = string
115+
}
116+
117+
variable "subnet_id3" {
118+
default = "{{.SubnetId3}}"
119+
description = "Subnet Id 3"
120+
type = string
121+
}
122+
123+
variable "security_group_name" {
124+
default = "{{.SecurityGroupName}}"
125+
description = "security group id"
126+
type = string
127+
}
128+
129+
variable "AWS_ACCESS_KEY_ID" {
130+
description = "AWS access key"
131+
}
132+
133+
variable "AWS_SECRET_ACCESS_KEY" {
134+
description = "AWS secret key"
135+
}
136+
137+
variable "AWS_DEFAULT_REGION" {
138+
description = "AWS default region"
139+
}
140+
`
141+
17142
var VariablesRKE = `
18143
variable "cluster_name" {
19144
default = "{{.ClusterName}}"

0 commit comments

Comments
 (0)