diff --git a/input.tf b/input.tf index d5c2753..9017570 100644 --- a/input.tf +++ b/input.tf @@ -2,7 +2,7 @@ variable "name" {} variable "ssh_key" {} variable "master_instance_type" { - default = "t2.medium" + default = "t2.small" } variable "node_instance_type" { @@ -41,3 +41,7 @@ variable "additional_certificates" { variable "additional_tags" { default = {} } + +variable "enable_kube2iam" { + default = true +} diff --git a/s3.tf b/s3.tf index 6798bca..46d0859 100644 --- a/s3.tf +++ b/s3.tf @@ -98,6 +98,7 @@ data "template_file" "addons" { node_asg_name = "${aws_autoscaling_group.nodes.name}" node_asg_min = "${var.node_asg_min}" node_asg_max = "${var.node_asg_max}" + enable_kube2iam = "${var.enable_kube2iam}" } } diff --git a/scripts/2_setup_kubernetes.sh b/scripts/2_setup_kubernetes.sh index 4c48b64..afa6c5d 100644 --- a/scripts/2_setup_kubernetes.sh +++ b/scripts/2_setup_kubernetes.sh @@ -31,6 +31,8 @@ function setup_kubectl { mkdir -p /root/.kube cp -i /etc/kubernetes/admin.conf /root/.kube/config + + aws s3 cp /etc/kubernetes/admin.conf s3://$(cat /etc/terraform/s3_bucket) --region eu-central-1 } function setup_network { diff --git a/scripts/3_addons.sh b/scripts/3_addons.sh index 3f5e8e2..a68b92a 100644 --- a/scripts/3_addons.sh +++ b/scripts/3_addons.sh @@ -95,7 +95,9 @@ function setup_heapster { } function setup_kube2iam { - helm install --name kube2iam stable/kube2iam --set=extraArgs.auto-discover-base-arn=true,rbac.create=true,host.iptables=true,host.interface=cni0 --namespace kube-system + if [ "${enable_kube2iam}" == "true" ]; then + helm install --name kube2iam stable/kube2iam --set=extraArgs.auto-discover-base-arn=true,rbac.create=true,host.iptables=true,host.interface=cni0 --namespace kube-system + fi }