Add autoscaling policy to master role

This commit is contained in:
Sergio Ballesteros 2017-01-25 10:12:05 +01:00
parent 849815b638
commit 9e9c0c105b
1 changed files with 11 additions and 0 deletions

View File

@ -140,6 +140,17 @@ func (b *IAMPolicyBuilder) BuildAWSIAMPolicy() (*IAMPolicy, error) {
Resource: []string{"*"},
})
p.Statement = append(p.Statement, &IAMStatement{
Effect: IAMStatementEffectAllow,
Action: []string{
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeAutoScalingInstances",
"autoscaling:SetDesiredCapacity",
"autoscaling:TerminateInstanceInAutoScalingGroup",
},
Resource: []string{"*"},
})
// Restrict the KMS permissions to only the keys that are being used
kmsKeyIDs := sets.NewString()
for _, e := range b.Cluster.Spec.EtcdClusters {