Skip to content

Commit

Permalink
Revert "Add suspended_processes attributes to autoscaling_group (kube…
Browse files Browse the repository at this point in the history
  • Loading branch information
max-rocket-internet authored Oct 9, 2018
1 parent c8cc60f commit ba43786
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ project adheres to [Semantic Versioning](http://semver.org/).
- A useful addition (slam dunk, @self 🔥)
- Worker groups can be created with a specified IAM profile. (from @laverya)
- exposed `aws_eks_cluster` create and destroy timeouts (by @RGPosadas)
- Added `suspended_processes` to `worker_groups` input (by @bkmeneguello)
- exposed `placement_tenancy` for autoscaling group (by @monsterxx03)
- Allow port 443 from EKS service to nodes to run `metrics-server`. (by @max-rocket-internet)

Expand Down
1 change: 0 additions & 1 deletion local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ locals {
additional_security_group_ids = "" # A comman delimited list of additional security group ids to include in worker launch config
protect_from_scale_in = false # Prevent AWS from scaling in, so that cluster-autoscaler is solely responsible.
iam_role_id = "${local.default_iam_role_id}" # Use the specified IAM role if set.
suspended_processes = "" # A comma delimited string of processes to to suspend. i.e. AZRebalance,HealthCheck,ReplaceUnhealthy
}

workers_group_defaults = "${merge(local.workers_group_defaults_defaults, var.workers_group_defaults)}"
Expand Down
3 changes: 1 addition & 2 deletions workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ resource "aws_autoscaling_group" "workers" {
launch_configuration = "${element(aws_launch_configuration.workers.*.id, count.index)}"
vpc_zone_identifier = ["${split(",", coalesce(lookup(var.worker_groups[count.index], "subnets", ""), local.workers_group_defaults["subnets"]))}"]
protect_from_scale_in = "${lookup(var.worker_groups[count.index], "protect_from_scale_in", local.workers_group_defaults["protect_from_scale_in"])}"
suspended_processes = ["${split(",", coalesce(lookup(var.worker_groups[count.index], "suspended_processes", ""), local.workers_group_defaults["suspended_processes"]))}"]
count = "${var.worker_group_count}"

tags = ["${concat(
list(
map("key", "Name", "value", "${aws_eks_cluster.this.name}-${lookup(var.worker_groups[count.index], "name", count.index)}-eks_asg", "propagate_at_launch", true),
map("key", "kubernetes.io/cluster/${aws_eks_cluster.this.name}", "value", "owned", "propagate_at_launch", true),
map("key", "k8s.io/cluster-autoscaler/${lookup(var.worker_groups[count.index], "autoscaling_enabled", local.workers_group_defaults["autoscaling_enabled"]) == 1 ? "enabled" : "disabled" }", "value", "true", "propagate_at_launch", false)
map("key", "k8s.io/cluster-autoscaler/${lookup(var.worker_groups[count.index], "autoscaling_enabled", local.workers_group_defaults["autoscaling_enabled"]) == 1 ? "enabled" : "disabled" }", "value", "true", "propagate_at_launch", false),
),
local.asg_tags)
}"]
Expand Down

0 comments on commit ba43786

Please sign in to comment.