mirror of https://github.com/kubernetes/kops.git
Enable lifecycle hook in integration test
This commit is contained in:
parent
67be37e4cb
commit
df902cca65
|
@ -27,6 +27,7 @@
|
|||
{
|
||||
"Action": [
|
||||
"autoscaling:DescribeAutoScalingInstances",
|
||||
"autoscaling:DescribeLifecycleHooks",
|
||||
"ec2:DescribeInstanceTypes",
|
||||
"ec2:DescribeInstances",
|
||||
"iam:GetServerCertificate",
|
||||
|
@ -35,6 +36,16 @@
|
|||
],
|
||||
"Effect": "Allow",
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Action": "autoscaling:CompleteLifecycleAction",
|
||||
"Condition": {
|
||||
"StringEquals": {
|
||||
"aws:ResourceTag/KubernetesCluster": ""
|
||||
}
|
||||
},
|
||||
"Effect": "Allow",
|
||||
"Resource": "*"
|
||||
}
|
||||
],
|
||||
"Version": "2012-10-17"
|
||||
|
|
|
@ -166,7 +166,7 @@ CloudProvider: aws
|
|||
ConfigBase: memfs://clusters.example.com/minimal-warmpool.example.com
|
||||
InstanceGroupName: nodes
|
||||
InstanceGroupRole: Node
|
||||
NodeupConfigHash: xgDmL/trdNoIqYoD9V9u43wESCWFGJ4mb1Do5pv5A7w=
|
||||
NodeupConfigHash: UjegVvxXJ+jbQaNuHnMwHSxxtZLwVHGLrg2vzkYEMtI=
|
||||
|
||||
__EOF_KUBE_ENV
|
||||
|
||||
|
|
|
@ -216,4 +216,5 @@ spec:
|
|||
type: Public
|
||||
masters: public
|
||||
nodes: public
|
||||
warmPool: {}
|
||||
warmPool:
|
||||
enableLifecycleHook: true
|
||||
|
|
|
@ -32,6 +32,7 @@ CAs:
|
|||
9B7UD2ushcVFPtaeoL9Gfu8aY4KJBeqqg5ojl4qmRnThjw==
|
||||
-----END CERTIFICATE-----
|
||||
ClusterName: minimal-warmpool.example.com
|
||||
EnableLifecycleHook: true
|
||||
Hooks:
|
||||
- null
|
||||
- null
|
||||
|
|
|
@ -41,7 +41,8 @@ spec:
|
|||
name: us-test-1a
|
||||
type: Public
|
||||
zone: us-test-1a
|
||||
warmPool: {}
|
||||
warmPool:
|
||||
enableLifecycleHook: true
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -198,6 +198,14 @@ resource "aws_autoscaling_group" "nodes-minimal-warmpool-example-com" {
|
|||
vpc_zone_identifier = [aws_subnet.us-test-1a-minimal-warmpool-example-com.id]
|
||||
}
|
||||
|
||||
resource "aws_autoscaling_lifecycle_hook" "kops-warmpool-nodes" {
|
||||
autoscaling_group_name = aws_autoscaling_group.nodes-minimal-warmpool-example-com.id
|
||||
default_result = "ABANDON"
|
||||
heartbeat_timeout = 600
|
||||
lifecycle_transition = "autoscaling:EC2_INSTANCE_LAUNCHING"
|
||||
name = "kops-warmpool"
|
||||
}
|
||||
|
||||
resource "aws_ebs_volume" "us-test-1a-etcd-events-minimal-warmpool-example-com" {
|
||||
availability_zone = "us-test-1a"
|
||||
encrypted = false
|
||||
|
|
Loading…
Reference in New Issue