Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eks-cluster-autoscaler
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
terraform-eks
eks-cluster-autoscaler
Commits
e04ba683
Commit
e04ba683
authored
Mar 05, 2019
by
Danny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a service account and refactored container args for cluster autoscaler
parent
8d77d420
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
1 deletion
+53
-1
eks-cluster-autoscaler.tf
eks-cluster-autoscaler.tf
+1
-1
iam.tf
iam.tf
+50
-0
variables.tf
variables.tf
+2
-0
No files found.
eks-cluster-autoscaler.tf
View file @
e04ba683
...
...
@@ -43,7 +43,7 @@ resource "kubernetes_deployment" "aws_cluster_autoscaler_deployment" {
image
=
"k8s.gcr.io/cluster-autoscaler:v1.13.1"
name
=
"cluster-autoscaler-container"
image_pull_policy
=
"IfNotPresent"
args
=
[
"./cluster-autoscaler"
,
"--cloud-provider=aws"
,
"--n
amespace=default"
,
"--nodes=1:10:
${
var
.
autoscaler_group
}
"
,
"--logtostderr=true"
,
"--stderrthreshold=info
"
,
"--v=4"
]
args
=
[
"./cluster-autoscaler"
,
"--cloud-provider=aws"
,
"--n
ode-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled"
,
"--skip-nodes-with-local-storage=false"
,
"--stderrthreshold=info"
,
"--expander=least-waste
"
,
"--v=4"
]
volume_mount
{
mount_path
=
"/var/run/secrets/kubernetes.io/serviceaccount"
...
...
iam.tf
0 → 100644
View file @
e04ba683
data
"aws_iam_policy_document"
"ec2_assume"
{
statement
{
actions
=
[
"sts:AssumeRole"
,
]
principals
{
type
=
"Service"
identifiers
=
[
"ec2.amazonaws.com"
]
}
}
statement
{
actions
=
[
"sts:AssumeRole"
,
]
principals
{
type
=
"AWS"
identifiers
=
[
"
${
var
.
worker_iam_role_arn
}
"
]
}
}
}
data
"aws_iam_policy_document"
"autoscaler"
{
statement
{
actions
=
[
"autoscaling:DescribeAutoScalingGroups"
,
"autoscaling:DescribeAutoScalingInstances"
,
"autoscaling:SetDesiredCapacity"
,
"autoscaling:TerminateInstanceInAutoScalingGroup"
,
"autoscaling:DescribeTags"
,
]
resources
=
[
"*"
]
}
}
resource
"aws_iam_policy"
"this"
{
policy
=
"
${data
.
aws_iam_policy_document
.
autoscaler
.
json
}
"
}
resource
"aws_iam_role"
"this"
{
name
=
"eks-alb-ingress-controller"
assume_role_policy
=
"
${data
.
aws_iam_policy_document
.
ec2_assume
.
json
}
"
}
resource
"aws_iam_role_policy_attachment"
"this"
{
role
=
"
${
aws_iam_role
.
this
.
name
}
"
policy_arn
=
"
${
aws_iam_policy
.
this
.
arn
}
"
}
variables.tf
View file @
e04ba683
...
...
@@ -5,3 +5,5 @@ variable "customer" {
variable
"envname"
{
default
=
"staging"
}
variable
"worker_iam_role_arn"
{}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment