This repository has been archived by the owner on Apr 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #600 from alphagov/add-cluster-autoscaler
Add cluster autoscaler
- Loading branch information
Showing
8 changed files
with
83 additions
and
14 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
dependencies: | ||
- name: fluentd-cloudwatch | ||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/ | ||
version: 0.6.4 | ||
- name: cluster-autoscaler | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
version: 5.1.0 | ||
- name: concourse | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
version: 8.2.5 | ||
- name: kiam | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
version: 2.5.1 | ||
- name: fluentd-cloudwatch | ||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/ | ||
version: 0.6.4 | ||
- name: harbor | ||
repository: https://helm.goharbor.io/ | ||
version: 1.1.3 | ||
digest: sha256:2a0c1a7ffb5abc8ef64db2ccae629ff037e75e250cd1dc40ad41836a72d03476 | ||
generated: "2019-09-23T10:02:21.19228+01:00" | ||
- name: kiam | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
version: 2.5.1 | ||
digest: sha256:151b4ed228617b41d7793f2edd1eb92039d9b243f87ee4d2c893406ea3a67e6f | ||
generated: "2019-10-02T10:55:58.447495+01:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
dependencies: | ||
- name: "fluentd-cloudwatch" | ||
version: 0.6.4 | ||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/ | ||
- name: "cluster-autoscaler" | ||
version: 5.1.0 | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
condition: global.runningOnAws | ||
- name: "concourse" | ||
version: 8.2.5 | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
- name: "kiam" | ||
version: 2.5.1 | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
- name: "fluentd-cloudwatch" | ||
version: 0.6.4 | ||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/ | ||
condition: global.runningOnAws | ||
- name: "harbor" | ||
version: 1.1.3 | ||
repository: https://helm.goharbor.io/ | ||
- name: "kiam" | ||
version: 2.5.1 | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
condition: global.runningOnAws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
resource "aws_iam_role" "cluster_autoscaler" { | ||
name = "cluster-autoscaler" | ||
|
||
assume_role_policy = "${data.aws_iam_policy_document.trust_kiam_server.json}" | ||
} | ||
|
||
data "aws_iam_policy_document" "cluster_autoscaler_policy" { | ||
statement { | ||
effect = "Allow" | ||
|
||
actions = [ | ||
"autoscaling:DescribeAutoScalingGroups", | ||
"autoscaling:DescribeAutoScalingInstances", | ||
"autoscaling:DescribeLaunchConfigurations", | ||
"autoscaling:DescribeTags", | ||
] | ||
|
||
resources = ["*"] | ||
} | ||
|
||
statement { | ||
effect = "Allow" | ||
|
||
actions = [ | ||
"autoscaling:SetDesiredCapacity", | ||
"autoscaling:TerminateInstanceInAutoScalingGroup", | ||
] | ||
|
||
condition = { | ||
test = "Null" | ||
variable = "autoscaling:ResourceTag/k8s.io/cluster-autoscaler/${var.cluster_name}" | ||
values = ["false"] | ||
} | ||
|
||
resources = ["*"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters