Skip to content

Commit

Permalink
make kube2iam configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jnig committed Apr 15, 2018
1 parent 8f6a466 commit 95f7aa0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion input.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ variable "name" {}
variable "ssh_key" {}

variable "master_instance_type" {
default = "t2.medium"
default = "t2.small"
}

variable "node_instance_type" {
Expand Down Expand Up @@ -41,3 +41,7 @@ variable "additional_certificates" {
variable "additional_tags" {
default = {}
}

variable "enable_kube2iam" {
default = true
}
1 change: 1 addition & 0 deletions s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
}

Expand Down
2 changes: 2 additions & 0 deletions scripts/2_setup_kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion scripts/3_addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}


Expand Down

0 comments on commit 95f7aa0

Please sign in to comment.