From 83e3d3c75d1e6db13d4e5ccf0b6b3928b25fecc5 Mon Sep 17 00:00:00 2001 From: Peter Rifel Date: Wed, 29 Sep 2021 19:10:04 -0500 Subject: [PATCH 1/2] Lengthen NTH integration test cluster name --- cmd/kops/integration_test.go | 4 +- cmd/kops/lifecycle_integration_test.go | 5 +- .../nth_sqs_resources/cloudformation.json | 368 +++++------ .../cloudformation.json.extracted.yaml | 19 +- ...me.example.com-ASGLifecycle_event_pattern} | 0 ...ple.com-InstanceStateChange_event_pattern} | 0 ...com-RebalanceRecommendation_event_pattern} | 0 ...xample.com-SpotInterruption_event_pattern} | 0 ...ources.longclustername.example.com_policy} | 0 ...ources.longclustername.example.com_policy} | 0 ...ources.longclustername.example.com_policy} | 14 +- ...ources.longclustername.example.com_policy} | 8 +- ...a6ed9aa889b9e2c39cd663eb9c7157_public_key} | 0 ...ces.longclustername.example.com_user_data} | 10 +- ...ces.longclustername.example.com_user_data} | 4 +- ...cket_object_cluster-completed.spec_content | 24 +- ...bject_manifests-etcdmanager-events_content | 12 +- ..._object_manifests-etcdmanager-main_content | 12 +- ...ect_nodeupconfig-master-us-test-1a_content | 12 +- ...3_bucket_object_nodeupconfig-nodes_content | 4 +- ...name.example.com-addons-bootstrap_content} | 4 +- ...ple.com-addons-core.addons.k8s.io_content} | 0 ...ns-coredns.addons.k8s.io-k8s-1.12_content} | 0 ...controller.addons.k8s.io-k8s-1.12_content} | 0 ...controller.addons.k8s.io-k8s-1.16_content} | 4 +- ...et-api.rbac.addons.k8s.io-k8s-1.9_content} | 0 ...-addons-limit-range.addons.k8s.io_content} | 0 ...-termination-handler.aws-k8s-1.11_content} | 2 +- ...storage-aws.addons.k8s.io-v1.15.0_content} | 0 ...es-longclustername-example-com-nth_policy} | 2 +- .../nth_sqs_resources/in-v1alpha2.yaml | 12 +- .../nth_sqs_resources/kubernetes.tf | 576 +++++++++--------- 32 files changed, 549 insertions(+), 547 deletions(-) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_cloudwatch_event_rule_nthsqsresources.example.com-ASGLifecycle_event_pattern => aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-ASGLifecycle_event_pattern} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_cloudwatch_event_rule_nthsqsresources.example.com-InstanceStateChange_event_pattern => aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-InstanceStateChange_event_pattern} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_cloudwatch_event_rule_nthsqsresources.example.com-RebalanceRecommendation_event_pattern => aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-RebalanceRecommendation_event_pattern} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_cloudwatch_event_rule_nthsqsresources.example.com-SpotInterruption_event_pattern => aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-SpotInterruption_event_pattern} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_iam_role_masters.nthsqsresources.example.com_policy => aws_iam_role_masters.nthsqsresources.longclustername.example.com_policy} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_iam_role_nodes.nthsqsresources.example.com_policy => aws_iam_role_nodes.nthsqsresources.longclustername.example.com_policy} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_iam_role_policy_masters.nthsqsresources.example.com_policy => aws_iam_role_policy_masters.nthsqsresources.longclustername.example.com_policy} (94%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_iam_role_policy_nodes.nthsqsresources.example.com_policy => aws_iam_role_policy_nodes.nthsqsresources.longclustername.example.com_policy} (79%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_key_pair_kubernetes.nthsqsresources.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key => aws_key_pair_kubernetes.nthsqsresources.longclustername.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_launch_template_master-us-test-1a.masters.nthsqsresources.example.com_user_data => aws_launch_template_master-us-test-1a.masters.nthsqsresources.longclustername.example.com_user_data} (94%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_launch_template_nodes.nthsqsresources.example.com_user_data => aws_launch_template_nodes.nthsqsresources.longclustername.example.com_user_data} (96%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-bootstrap_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-bootstrap_content} (91%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-core.addons.k8s.io_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-core.addons.k8s.io_content} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-dns-controller.addons.k8s.io-k8s-1.12_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-dns-controller.addons.k8s.io-k8s-1.12_content} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content} (90%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-limit-range.addons.k8s.io_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-limit-range.addons.k8s.io_content} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-node-termination-handler.aws-k8s-1.11_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-node-termination-handler.aws-k8s-1.11_content} (99%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_s3_bucket_object_nthsqsresources.example.com-addons-storage-aws.addons.k8s.io-v1.15.0_content => aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-storage-aws.addons.k8s.io-v1.15.0_content} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_sqs_queue_nthsqsresources-example-com-nth_policy => aws_sqs_queue_nthsqsresources-longclustername-example-com-nth_policy} (88%) diff --git a/cmd/kops/integration_test.go b/cmd/kops/integration_test.go index 92eef1d8ed..88236978fd 100644 --- a/cmd/kops/integration_test.go +++ b/cmd/kops/integration_test.go @@ -639,11 +639,11 @@ func TestAPIServerNodes(t *testing.T) { // TestNTHQueueProcessor tests the output for resources required by NTH Queue Processor mode func TestNTHQueueProcessor(t *testing.T) { - newIntegrationTest("nthsqsresources.example.com", "nth_sqs_resources"). + newIntegrationTest("nthsqsresources.longclustername.example.com", "nth_sqs_resources"). withNTH(). withAddons(dnsControllerAddon). runTestTerraformAWS(t) - newIntegrationTest("nthsqsresources.example.com", "nth_sqs_resources"). + newIntegrationTest("nthsqsresources.longclustername.example.com", "nth_sqs_resources"). runTestCloudformation(t) } diff --git a/cmd/kops/lifecycle_integration_test.go b/cmd/kops/lifecycle_integration_test.go index 2d5c61763d..b9c27dee40 100644 --- a/cmd/kops/lifecycle_integration_test.go +++ b/cmd/kops/lifecycle_integration_test.go @@ -174,8 +174,9 @@ func TestLifecyclePrivateSharedIP(t *testing.T) { // TestLifecycleNodeTerminationHandlerQueueProcessor runs the test on a cluster with requisite resources for NTH Queue Processor func TestLifecycleNodeTerminationHandlerQueueProcessor(t *testing.T) { runLifecycleTestAWS(&LifecycleTestOptions{ - t: t, - SrcDir: "nth_sqs_resources", + t: t, + SrcDir: "nth_sqs_resources", + ClusterName: "nthsqsresources.longclustername.example.com", }) } diff --git a/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json b/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json index f4fcc1fece..85036afa19 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json +++ b/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json @@ -1,16 +1,16 @@ { "Resources": { - "AWSAutoScalingAutoScalingGroupmasterustest1amastersnthsqsresourcesexamplecom": { + "AWSAutoScalingAutoScalingGroupmasterustest1amastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { - "AutoScalingGroupName": "master-us-test-1a.masters.nthsqsresources.example.com", + "AutoScalingGroupName": "master-us-test-1a.masters.nthsqsresources.longclustername.example.com", "LaunchTemplate": { "LaunchTemplateId": { - "Ref": "AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourceslongclusternameexamplecom" }, "Version": { "Fn::GetAtt": [ - "AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourcesexamplecom", + "AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourceslongclusternameexamplecom", "LatestVersionNumber" ] } @@ -19,18 +19,18 @@ "MinSize": "1", "VPCZoneIdentifier": [ { - "Ref": "AWSEC2Subnetustest1anthsqsresourcesexamplecom" + "Ref": "AWSEC2Subnetustest1anthsqsresourceslongclusternameexamplecom" } ], "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com", + "Value": "nthsqsresources.longclustername.example.com", "PropagateAtLaunch": true }, { "Key": "Name", - "Value": "master-us-test-1a.masters.nthsqsresources.example.com", + "Value": "master-us-test-1a.masters.nthsqsresources.longclustername.example.com", "PropagateAtLaunch": true }, { @@ -74,7 +74,7 @@ "PropagateAtLaunch": true }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned", "PropagateAtLaunch": true } @@ -96,17 +96,17 @@ ] } }, - "AWSAutoScalingAutoScalingGroupnodesnthsqsresourcesexamplecom": { + "AWSAutoScalingAutoScalingGroupnodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { - "AutoScalingGroupName": "nodes.nthsqsresources.example.com", + "AutoScalingGroupName": "nodes.nthsqsresources.longclustername.example.com", "LaunchTemplate": { "LaunchTemplateId": { - "Ref": "AWSEC2LaunchTemplatenodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2LaunchTemplatenodesnthsqsresourceslongclusternameexamplecom" }, "Version": { "Fn::GetAtt": [ - "AWSEC2LaunchTemplatenodesnthsqsresourcesexamplecom", + "AWSEC2LaunchTemplatenodesnthsqsresourceslongclusternameexamplecom", "LatestVersionNumber" ] } @@ -115,18 +115,18 @@ "MinSize": "2", "VPCZoneIdentifier": [ { - "Ref": "AWSEC2Subnetustest1anthsqsresourcesexamplecom" + "Ref": "AWSEC2Subnetustest1anthsqsresourceslongclusternameexamplecom" } ], "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com", + "Value": "nthsqsresources.longclustername.example.com", "PropagateAtLaunch": true }, { "Key": "Name", - "Value": "nodes.nthsqsresources.example.com", + "Value": "nodes.nthsqsresources.longclustername.example.com", "PropagateAtLaunch": true }, { @@ -155,7 +155,7 @@ "PropagateAtLaunch": true }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned", "PropagateAtLaunch": true } @@ -182,7 +182,7 @@ "Properties": { "LifecycleHookName": "master-us-test-1a-NTHLifecycleHook", "AutoScalingGroupName": { - "Ref": "AWSAutoScalingAutoScalingGroupmasterustest1amastersnthsqsresourcesexamplecom" + "Ref": "AWSAutoScalingAutoScalingGroupmasterustest1amastersnthsqsresourceslongclusternameexamplecom" }, "DefaultResult": "CONTINUE", "HeartbeatTimeout": 300, @@ -194,14 +194,14 @@ "Properties": { "LifecycleHookName": "nodes-NTHLifecycleHook", "AutoScalingGroupName": { - "Ref": "AWSAutoScalingAutoScalingGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSAutoScalingAutoScalingGroupnodesnthsqsresourceslongclusternameexamplecom" }, "DefaultResult": "CONTINUE", "HeartbeatTimeout": 300, "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING" } }, - "AWSEC2DHCPOptionsnthsqsresourcesexamplecom": { + "AWSEC2DHCPOptionsnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::DHCPOptions", "Properties": { "DomainName": "us-test-1.compute.internal", @@ -211,42 +211,42 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSEC2InternetGatewaynthsqsresourcesexamplecom": { + "AWSEC2InternetGatewaynthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::InternetGateway", "Properties": { "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourcesexamplecom": { + "AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::LaunchTemplate", "Properties": { - "LaunchTemplateName": "master-us-test-1a.masters.nthsqsresources.example.com", + "LaunchTemplateName": "master-us-test-1a.masters.nthsqsresources.longclustername.example.com", "LaunchTemplateData": { "BlockDeviceMappings": [ { @@ -267,12 +267,12 @@ ], "IamInstanceProfile": { "Name": { - "Ref": "AWSIAMInstanceProfilemastersnthsqsresourcesexamplecom" + "Ref": "AWSIAMInstanceProfilemastersnthsqsresourceslongclusternameexamplecom" } }, "ImageId": "ami-12345678", "InstanceType": "m3.medium", - "KeyName": "kubernetes.nthsqsresources.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57", + "KeyName": "kubernetes.nthsqsresources.longclustername.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57", "MetadataOptions": { "HttpPutResponseHopLimit": 1, "HttpTokens": "optional" @@ -288,7 +288,7 @@ "Ipv6AddressCount": 0, "Groups": [ { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" } ] } @@ -299,11 +299,11 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "master-us-test-1a.masters.nthsqsresources.example.com" + "Value": "master-us-test-1a.masters.nthsqsresources.longclustername.example.com" }, { "Key": "aws-node-termination-handler/managed", @@ -338,7 +338,7 @@ "Value": "master-us-test-1a" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] @@ -348,11 +348,11 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "master-us-test-1a.masters.nthsqsresources.example.com" + "Value": "master-us-test-1a.masters.nthsqsresources.longclustername.example.com" }, { "Key": "aws-node-termination-handler/managed", @@ -387,7 +387,7 @@ "Value": "master-us-test-1a" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] @@ -397,10 +397,10 @@ } } }, - "AWSEC2LaunchTemplatenodesnthsqsresourcesexamplecom": { + "AWSEC2LaunchTemplatenodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::LaunchTemplate", "Properties": { - "LaunchTemplateName": "nodes.nthsqsresources.example.com", + "LaunchTemplateName": "nodes.nthsqsresources.longclustername.example.com", "LaunchTemplateData": { "BlockDeviceMappings": [ { @@ -417,12 +417,12 @@ ], "IamInstanceProfile": { "Name": { - "Ref": "AWSIAMInstanceProfilenodesnthsqsresourcesexamplecom" + "Ref": "AWSIAMInstanceProfilenodesnthsqsresourceslongclusternameexamplecom" } }, "ImageId": "ami-12345678", "InstanceType": "t2.medium", - "KeyName": "kubernetes.nthsqsresources.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57", + "KeyName": "kubernetes.nthsqsresources.longclustername.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57", "MetadataOptions": { "HttpPutResponseHopLimit": 1, "HttpTokens": "optional" @@ -438,7 +438,7 @@ "Ipv6AddressCount": 0, "Groups": [ { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" } ] } @@ -449,11 +449,11 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nodes.nthsqsresources.example.com" + "Value": "nodes.nthsqsresources.longclustername.example.com" }, { "Key": "aws-node-termination-handler/managed", @@ -476,7 +476,7 @@ "Value": "nodes" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] @@ -486,11 +486,11 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nodes.nthsqsresources.example.com" + "Value": "nodes.nthsqsresources.longclustername.example.com" }, { "Key": "aws-node-termination-handler/managed", @@ -513,7 +513,7 @@ "Value": "nodes" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] @@ -527,11 +527,11 @@ "Type": "AWS::EC2::Route", "Properties": { "RouteTableId": { - "Ref": "AWSEC2RouteTablenthsqsresourcesexamplecom" + "Ref": "AWSEC2RouteTablenthsqsresourceslongclusternameexamplecom" }, "DestinationIpv6CidrBlock": "::/0", "GatewayId": { - "Ref": "AWSEC2InternetGatewaynthsqsresourcesexamplecom" + "Ref": "AWSEC2InternetGatewaynthsqsresourceslongclusternameexamplecom" } } }, @@ -539,31 +539,31 @@ "Type": "AWS::EC2::Route", "Properties": { "RouteTableId": { - "Ref": "AWSEC2RouteTablenthsqsresourcesexamplecom" + "Ref": "AWSEC2RouteTablenthsqsresourceslongclusternameexamplecom" }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { - "Ref": "AWSEC2InternetGatewaynthsqsresourcesexamplecom" + "Ref": "AWSEC2InternetGatewaynthsqsresourceslongclusternameexamplecom" } } }, - "AWSEC2RouteTablenthsqsresourcesexamplecom": { + "AWSEC2RouteTablenthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::RouteTable", "Properties": { "VpcId": { - "Ref": "AWSEC2VPCnthsqsresourcesexamplecom" + "Ref": "AWSEC2VPCnthsqsresourceslongclusternameexamplecom" }, "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" }, { @@ -573,11 +573,11 @@ ] } }, - "AWSEC2SecurityGroupEgressfrommastersnthsqsresourcesexamplecomegressall0to00": { + "AWSEC2SecurityGroupEgressfrommastersnthsqsresourceslongclusternameexamplecomegressall0to00": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "FromPort": 0, "ToPort": 0, @@ -585,11 +585,11 @@ "CidrIpv6": "::/0" } }, - "AWSEC2SecurityGroupEgressfrommastersnthsqsresourcesexamplecomegressall0to000000": { + "AWSEC2SecurityGroupEgressfrommastersnthsqsresourceslongclusternameexamplecomegressall0to000000": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "FromPort": 0, "ToPort": 0, @@ -597,11 +597,11 @@ "CidrIp": "0.0.0.0/0" } }, - "AWSEC2SecurityGroupEgressfromnodesnthsqsresourcesexamplecomegressall0to00": { + "AWSEC2SecurityGroupEgressfromnodesnthsqsresourceslongclusternameexamplecomegressall0to00": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "FromPort": 0, "ToPort": 0, @@ -609,11 +609,11 @@ "CidrIpv6": "::/0" } }, - "AWSEC2SecurityGroupEgressfromnodesnthsqsresourcesexamplecomegressall0to000000": { + "AWSEC2SecurityGroupEgressfromnodesnthsqsresourceslongclusternameexamplecomegressall0to000000": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "FromPort": 0, "ToPort": 0, @@ -621,11 +621,11 @@ "CidrIp": "0.0.0.0/0" } }, - "AWSEC2SecurityGroupIngressfrom00000ingresstcp22to22mastersnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfrom00000ingresstcp22to22mastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "FromPort": 22, "ToPort": 22, @@ -633,11 +633,11 @@ "CidrIp": "0.0.0.0/0" } }, - "AWSEC2SecurityGroupIngressfrom00000ingresstcp22to22nodesnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfrom00000ingresstcp22to22nodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "FromPort": 22, "ToPort": 22, @@ -645,11 +645,11 @@ "CidrIp": "0.0.0.0/0" } }, - "AWSEC2SecurityGroupIngressfrom00000ingresstcp443to443mastersnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfrom00000ingresstcp443to443mastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "FromPort": 443, "ToPort": 443, @@ -657,186 +657,186 @@ "CidrIp": "0.0.0.0/0" } }, - "AWSEC2SecurityGroupIngressfrommastersnthsqsresourcesexamplecomingressall0to0mastersnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfrommastersnthsqsresourceslongclusternameexamplecomingressall0to0mastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "SourceSecurityGroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "FromPort": 0, "ToPort": 0, "IpProtocol": "-1" } }, - "AWSEC2SecurityGroupIngressfrommastersnthsqsresourcesexamplecomingressall0to0nodesnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfrommastersnthsqsresourceslongclusternameexamplecomingressall0to0nodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "SourceSecurityGroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "FromPort": 0, "ToPort": 0, "IpProtocol": "-1" } }, - "AWSEC2SecurityGroupIngressfromnodesnthsqsresourcesexamplecomingressall0to0nodesnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfromnodesnthsqsresourceslongclusternameexamplecomingressall0to0nodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "SourceSecurityGroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "FromPort": 0, "ToPort": 0, "IpProtocol": "-1" } }, - "AWSEC2SecurityGroupIngressfromnodesnthsqsresourcesexamplecomingresstcp1to2379mastersnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfromnodesnthsqsresourceslongclusternameexamplecomingresstcp1to2379mastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "SourceSecurityGroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "FromPort": 1, "ToPort": 2379, "IpProtocol": "tcp" } }, - "AWSEC2SecurityGroupIngressfromnodesnthsqsresourcesexamplecomingresstcp2382to4000mastersnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfromnodesnthsqsresourceslongclusternameexamplecomingresstcp2382to4000mastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "SourceSecurityGroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "FromPort": 2382, "ToPort": 4000, "IpProtocol": "tcp" } }, - "AWSEC2SecurityGroupIngressfromnodesnthsqsresourcesexamplecomingresstcp4003to65535mastersnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfromnodesnthsqsresourceslongclusternameexamplecomingresstcp4003to65535mastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "SourceSecurityGroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "FromPort": 4003, "ToPort": 65535, "IpProtocol": "tcp" } }, - "AWSEC2SecurityGroupIngressfromnodesnthsqsresourcesexamplecomingressudp1to65535mastersnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupIngressfromnodesnthsqsresourceslongclusternameexamplecomingressudp1to65535mastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { "GroupId": { - "Ref": "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom" }, "SourceSecurityGroupId": { - "Ref": "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom" + "Ref": "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom" }, "FromPort": 1, "ToPort": 65535, "IpProtocol": "udp" } }, - "AWSEC2SecurityGroupmastersnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupmastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroup", "Properties": { - "GroupName": "masters.nthsqsresources.example.com", + "GroupName": "masters.nthsqsresources.longclustername.example.com", "VpcId": { - "Ref": "AWSEC2VPCnthsqsresourcesexamplecom" + "Ref": "AWSEC2VPCnthsqsresourceslongclusternameexamplecom" }, "GroupDescription": "Security group for masters", "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "masters.nthsqsresources.example.com" + "Value": "masters.nthsqsresources.longclustername.example.com" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSEC2SecurityGroupnodesnthsqsresourcesexamplecom": { + "AWSEC2SecurityGroupnodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SecurityGroup", "Properties": { - "GroupName": "nodes.nthsqsresources.example.com", + "GroupName": "nodes.nthsqsresources.longclustername.example.com", "VpcId": { - "Ref": "AWSEC2VPCnthsqsresourcesexamplecom" + "Ref": "AWSEC2VPCnthsqsresourceslongclusternameexamplecom" }, "GroupDescription": "Security group for nodes", "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nodes.nthsqsresources.example.com" + "Value": "nodes.nthsqsresources.longclustername.example.com" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSEC2SubnetRouteTableAssociationustest1anthsqsresourcesexamplecom": { + "AWSEC2SubnetRouteTableAssociationustest1anthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::SubnetRouteTableAssociation", "Properties": { "SubnetId": { - "Ref": "AWSEC2Subnetustest1anthsqsresourcesexamplecom" + "Ref": "AWSEC2Subnetustest1anthsqsresourceslongclusternameexamplecom" }, "RouteTableId": { - "Ref": "AWSEC2RouteTablenthsqsresourcesexamplecom" + "Ref": "AWSEC2RouteTablenthsqsresourceslongclusternameexamplecom" } } }, - "AWSEC2Subnetustest1anthsqsresourcesexamplecom": { + "AWSEC2Subnetustest1anthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::Subnet", "Properties": { "VpcId": { - "Ref": "AWSEC2VPCnthsqsresourcesexamplecom" + "Ref": "AWSEC2VPCnthsqsresourceslongclusternameexamplecom" }, "CidrBlock": "172.20.32.0/19", "AvailabilityZone": "us-test-1a", "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "us-test-1a.nthsqsresources.example.com" + "Value": "us-test-1a.nthsqsresources.longclustername.example.com" }, { "Key": "SubnetType", "Value": "Public" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" }, { @@ -854,34 +854,34 @@ "Type": "AWS::EC2::VPCCidrBlock", "Properties": { "VpcId": { - "Ref": "AWSEC2VPCnthsqsresourcesexamplecom" + "Ref": "AWSEC2VPCnthsqsresourceslongclusternameexamplecom" }, "AmazonProvidedIpv6CidrBlock": true } }, - "AWSEC2VPCDHCPOptionsAssociationnthsqsresourcesexamplecom": { + "AWSEC2VPCDHCPOptionsAssociationnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::VPCDHCPOptionsAssociation", "Properties": { "VpcId": { - "Ref": "AWSEC2VPCnthsqsresourcesexamplecom" + "Ref": "AWSEC2VPCnthsqsresourceslongclusternameexamplecom" }, "DhcpOptionsId": { - "Ref": "AWSEC2DHCPOptionsnthsqsresourcesexamplecom" + "Ref": "AWSEC2DHCPOptionsnthsqsresourceslongclusternameexamplecom" } } }, - "AWSEC2VPCGatewayAttachmentnthsqsresourcesexamplecom": { + "AWSEC2VPCGatewayAttachmentnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { "VpcId": { - "Ref": "AWSEC2VPCnthsqsresourcesexamplecom" + "Ref": "AWSEC2VPCnthsqsresourceslongclusternameexamplecom" }, "InternetGatewayId": { - "Ref": "AWSEC2InternetGatewaynthsqsresourcesexamplecom" + "Ref": "AWSEC2InternetGatewaynthsqsresourceslongclusternameexamplecom" } } }, - "AWSEC2VPCnthsqsresourcesexamplecom": { + "AWSEC2VPCnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::VPC", "Properties": { "CidrBlock": "172.20.0.0/16", @@ -890,20 +890,20 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSEC2Volumeustest1aetcdeventsnthsqsresourcesexamplecom": { + "AWSEC2Volumeustest1aetcdeventsnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::Volume", "Properties": { "AvailabilityZone": "us-test-1a", @@ -915,11 +915,11 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "us-test-1a.etcd-events.nthsqsresources.example.com" + "Value": "us-test-1a.etcd-events.nthsqsresources.longclustername.example.com" }, { "Key": "k8s.io/etcd/events", @@ -930,13 +930,13 @@ "Value": "1" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSEC2Volumeustest1aetcdmainnthsqsresourcesexamplecom": { + "AWSEC2Volumeustest1aetcdmainnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::EC2::Volume", "Properties": { "AvailabilityZone": "us-test-1a", @@ -948,11 +948,11 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "us-test-1a.etcd-main.nthsqsresources.example.com" + "Value": "us-test-1a.etcd-main.nthsqsresources.longclustername.example.com" }, { "Key": "k8s.io/etcd/main", @@ -963,16 +963,16 @@ "Value": "1" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSEventsRulenthsqsresourcesexamplecomASGLifecycle": { + "AWSEventsRulenthsqsresourceslongclusternameexamplecomASGLifecycle": { "Type": "AWS::Events::Rule", "Properties": { - "Name": "nthsqsresources.example.com-ASGLifecycle", + "Name": "nthsqsresources.longclustername.example.com-ASGLifecycle", "EventPattern": { "detail-type": [ "EC2 Instance-terminate Lifecycle Action" @@ -984,15 +984,15 @@ "Targets": [ { "Id": "1", - "Arn": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" + "Arn": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" } ] } }, - "AWSEventsRulenthsqsresourcesexamplecomInstanceStateChange": { + "AWSEventsRulenthsqsresourceslongclusternameexamplecomInstanceStateChange": { "Type": "AWS::Events::Rule", "Properties": { - "Name": "nthsqsresources.example.com-InstanceStateChange", + "Name": "nthsqsresources.longclustername.example.com-InstanceStateChange", "EventPattern": { "detail-type": [ "EC2 Instance State-change Notification" @@ -1004,15 +1004,15 @@ "Targets": [ { "Id": "1", - "Arn": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" + "Arn": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" } ] } }, - "AWSEventsRulenthsqsresourcesexamplecomRebalanceRecommendation": { + "AWSEventsRulenthsqsresourceslongclusternameexamplecomRebalanceRecommendation": { "Type": "AWS::Events::Rule", "Properties": { - "Name": "nthsqsresources.example.com-RebalanceRecommendation", + "Name": "nthsqsresources.longclustername.example.com-RebalanceRecommendation", "EventPattern": { "detail-type": [ "EC2 Instance Rebalance Recommendation" @@ -1024,15 +1024,15 @@ "Targets": [ { "Id": "1", - "Arn": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" + "Arn": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" } ] } }, - "AWSEventsRulenthsqsresourcesexamplecomSpotInterruption": { + "AWSEventsRulenthsqsresourceslongclusternameexamplecomSpotInterruption": { "Type": "AWS::Events::Rule", "Properties": { - "Name": "nthsqsresources.example.com-SpotInterruption", + "Name": "nthsqsresources.longclustername.example.com-SpotInterruption", "EventPattern": { "detail-type": [ "EC2 Spot Instance Interruption Warning" @@ -1044,40 +1044,40 @@ "Targets": [ { "Id": "1", - "Arn": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" + "Arn": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" } ] } }, - "AWSIAMInstanceProfilemastersnthsqsresourcesexamplecom": { + "AWSIAMInstanceProfilemastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::IAM::InstanceProfile", "Properties": { - "InstanceProfileName": "masters.nthsqsresources.example.com", + "InstanceProfileName": "masters.nthsqsresources.longclustername.example.com", "Roles": [ { - "Ref": "AWSIAMRolemastersnthsqsresourcesexamplecom" + "Ref": "AWSIAMRolemastersnthsqsresourceslongclusternameexamplecom" } ] } }, - "AWSIAMInstanceProfilenodesnthsqsresourcesexamplecom": { + "AWSIAMInstanceProfilenodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::IAM::InstanceProfile", "Properties": { - "InstanceProfileName": "nodes.nthsqsresources.example.com", + "InstanceProfileName": "nodes.nthsqsresources.longclustername.example.com", "Roles": [ { - "Ref": "AWSIAMRolenodesnthsqsresourcesexamplecom" + "Ref": "AWSIAMRolenodesnthsqsresourceslongclusternameexamplecom" } ] } }, - "AWSIAMPolicymastersnthsqsresourcesexamplecom": { + "AWSIAMPolicymastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::IAM::Policy", "Properties": { - "PolicyName": "masters.nthsqsresources.example.com", + "PolicyName": "masters.nthsqsresources.longclustername.example.com", "Roles": [ { - "Ref": "AWSIAMRolemastersnthsqsresourcesexamplecom" + "Ref": "AWSIAMRolemastersnthsqsresourceslongclusternameexamplecom" } ], "PolicyDocument": { @@ -1086,7 +1086,7 @@ "Action": "ec2:AttachVolume", "Condition": { "StringEquals": { - "aws:ResourceTag/KubernetesCluster": "nthsqsresources.example.com", + "aws:ResourceTag/KubernetesCluster": "nthsqsresources.longclustername.example.com", "aws:ResourceTag/k8s.io/role/master": "1" } }, @@ -1100,7 +1100,7 @@ "s3:Get*" ], "Effect": "Allow", - "Resource": "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/*" + "Resource": "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/*" }, { "Action": [ @@ -1110,7 +1110,7 @@ "s3:PutObject" ], "Effect": "Allow", - "Resource": "arn:aws:s3:::placeholder-write-bucket/clusters.example.com/nthsqsresources.example.com/backups/etcd/main/*" + "Resource": "arn:aws:s3:::placeholder-write-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/main/*" }, { "Action": [ @@ -1120,7 +1120,7 @@ "s3:PutObject" ], "Effect": "Allow", - "Resource": "arn:aws:s3:::placeholder-write-bucket/clusters.example.com/nthsqsresources.example.com/backups/etcd/events/*" + "Resource": "arn:aws:s3:::placeholder-write-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/events/*" }, { "Action": [ @@ -1212,7 +1212,7 @@ "Action": "ec2:DeleteTags", "Condition": { "StringEquals": { - "aws:ResourceTag/KubernetesCluster": "nthsqsresources.example.com" + "aws:ResourceTag/KubernetesCluster": "nthsqsresources.longclustername.example.com" } }, "Effect": "Allow", @@ -1291,7 +1291,7 @@ ], "Condition": { "StringEquals": { - "aws:ResourceTag/KubernetesCluster": "nthsqsresources.example.com" + "aws:ResourceTag/KubernetesCluster": "nthsqsresources.longclustername.example.com" } }, "Effect": "Allow", @@ -1309,7 +1309,7 @@ ], "Condition": { "StringEquals": { - "aws:RequestTag/KubernetesCluster": "nthsqsresources.example.com" + "aws:RequestTag/KubernetesCluster": "nthsqsresources.longclustername.example.com" } }, "Effect": "Allow", @@ -1320,13 +1320,13 @@ } } }, - "AWSIAMPolicynodesnthsqsresourcesexamplecom": { + "AWSIAMPolicynodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::IAM::Policy", "Properties": { - "PolicyName": "nodes.nthsqsresources.example.com", + "PolicyName": "nodes.nthsqsresources.longclustername.example.com", "Roles": [ { - "Ref": "AWSIAMRolenodesnthsqsresourcesexamplecom" + "Ref": "AWSIAMRolenodesnthsqsresourceslongclusternameexamplecom" } ], "PolicyDocument": { @@ -1337,10 +1337,10 @@ ], "Effect": "Allow", "Resource": [ - "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/addons/*", - "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/cluster-completed.spec", - "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/igconfig/node/*", - "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/secrets/dockerconfig" + "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/addons/*", + "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/cluster-completed.spec", + "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/igconfig/node/*", + "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/secrets/dockerconfig" ] }, { @@ -1372,10 +1372,10 @@ } } }, - "AWSIAMRolemastersnthsqsresourcesexamplecom": { + "AWSIAMRolemastersnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::IAM::Role", "Properties": { - "RoleName": "masters.nthsqsresources.example.com", + "RoleName": "masters.nthsqsresources.longclustername.example.com", "AssumeRolePolicyDocument": { "Statement": [ { @@ -1391,23 +1391,23 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "masters.nthsqsresources.example.com" + "Value": "masters.nthsqsresources.longclustername.example.com" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSIAMRolenodesnthsqsresourcesexamplecom": { + "AWSIAMRolenodesnthsqsresourceslongclusternameexamplecom": { "Type": "AWS::IAM::Role", "Properties": { - "RoleName": "nodes.nthsqsresources.example.com", + "RoleName": "nodes.nthsqsresources.longclustername.example.com", "AssumeRolePolicyDocument": { "Statement": [ { @@ -1423,25 +1423,25 @@ "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nodes.nthsqsresources.example.com" + "Value": "nodes.nthsqsresources.longclustername.example.com" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] } }, - "AWSSQSQueuePolicynthsqsresourcesexamplecomnthPolicy": { + "AWSSQSQueuePolicynthsqsresourceslongclusternameexamplecomnthPolicy": { "Type": "AWS::SQS::QueuePolicy", "Properties": { "Queues": [ { - "Ref": "AWSSQSQueuenthsqsresourcesexamplecomnth" + "Ref": "AWSSQSQueuenthsqsresourceslongclusternameexamplecomnth" } ], "PolicyDocument": { @@ -1455,29 +1455,29 @@ "sqs.amazonaws.com" ] }, - "Resource": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" + "Resource": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" } ], "Version": "2012-10-17" } } }, - "AWSSQSQueuenthsqsresourcesexamplecomnth": { + "AWSSQSQueuenthsqsresourceslongclusternameexamplecomnth": { "Type": "AWS::SQS::Queue", "Properties": { - "QueueName": "nthsqsresources-example-com-nth", + "QueueName": "nthsqsresources-longclustername-example-com-nth", "MessageRetentionPeriod": 300, "Tags": [ { "Key": "KubernetesCluster", - "Value": "nthsqsresources.example.com" + "Value": "nthsqsresources.longclustername.example.com" }, { "Key": "Name", - "Value": "nthsqsresources-example-com-nth" + "Value": "nthsqsresources-longclustername-example-com-nth" }, { - "Key": "kubernetes.io/cluster/nthsqsresources.example.com", + "Key": "kubernetes.io/cluster/nthsqsresources.longclustername.example.com", "Value": "owned" } ] diff --git a/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json.extracted.yaml b/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json.extracted.yaml index a8f05fbbeb..90c4bef3ec 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json.extracted.yaml +++ b/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json.extracted.yaml @@ -1,4 +1,5 @@ -Resources.AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourcesexamplecom.Properties.LaunchTemplateData.UserData: | +? Resources.AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourceslongclusternameexamplecom.Properties.LaunchTemplateData.UserData +: | #!/bin/bash set -o errexit set -o nounset @@ -179,8 +180,8 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourcesexamplecom.Pro requestheaderUsernameHeaders: - X-Remote-User securePort: 443 - serviceAccountIssuer: https://api.internal.nthsqsresources.example.com - serviceAccountJWKSURI: https://api.internal.nthsqsresources.example.com/openid/v1/jwks + serviceAccountIssuer: https://api.internal.nthsqsresources.longclustername.example.com + serviceAccountJWKSURI: https://api.internal.nthsqsresources.longclustername.example.com/openid/v1/jwks serviceClusterIPRange: 100.64.0.0/13 storageBackend: etcd3 kubeControllerManager: @@ -188,7 +189,7 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourcesexamplecom.Pro attachDetachReconcileSyncPeriod: 1m0s cloudProvider: aws clusterCIDR: 100.96.0.0/11 - clusterName: nthsqsresources.example.com + clusterName: nthsqsresources.longclustername.example.com configureCloudRoutes: false image: k8s.gcr.io/kube-controller-manager:v1.20.0 leaderElection: @@ -242,16 +243,16 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersnthsqsresourcesexamplecom.Pro cat > conf/kube_env.yaml << '__EOF_KUBE_ENV' CloudProvider: aws - ConfigBase: memfs://clusters.example.com/nthsqsresources.example.com + ConfigBase: memfs://clusters.example.com/nthsqsresources.longclustername.example.com InstanceGroupName: master-us-test-1a InstanceGroupRole: Master - NodeupConfigHash: CQPZFIY4im/2GcHbUCIbx6Stn6kfDXPqRsy1xkyjSL0= + NodeupConfigHash: sGrshxpFidkBKocZgsdNwpRH3cwwL2f5KPGr751qKmg= __EOF_KUBE_ENV download-release echo "== nodeup node config done ==" -Resources.AWSEC2LaunchTemplatenodesnthsqsresourcesexamplecom.Properties.LaunchTemplateData.UserData: | +Resources.AWSEC2LaunchTemplatenodesnthsqsresourceslongclusternameexamplecom.Properties.LaunchTemplateData.UserData: | #!/bin/bash set -o errexit set -o nounset @@ -413,10 +414,10 @@ Resources.AWSEC2LaunchTemplatenodesnthsqsresourcesexamplecom.Properties.LaunchTe cat > conf/kube_env.yaml << '__EOF_KUBE_ENV' CloudProvider: aws - ConfigBase: memfs://clusters.example.com/nthsqsresources.example.com + ConfigBase: memfs://clusters.example.com/nthsqsresources.longclustername.example.com InstanceGroupName: nodes InstanceGroupRole: Node - NodeupConfigHash: 5KnqQJ045S8OADWs9ZyNvtubFIYrD55hh4OiqPcn3z8= + NodeupConfigHash: JDdsIp2tzHSnDmPELOQk6uvokC81/DO5ElOEu3937GY= __EOF_KUBE_ENV diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-ASGLifecycle_event_pattern b/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-ASGLifecycle_event_pattern similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-ASGLifecycle_event_pattern rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-ASGLifecycle_event_pattern diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-InstanceStateChange_event_pattern b/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-InstanceStateChange_event_pattern similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-InstanceStateChange_event_pattern rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-InstanceStateChange_event_pattern diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-RebalanceRecommendation_event_pattern b/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-RebalanceRecommendation_event_pattern similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-RebalanceRecommendation_event_pattern rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-RebalanceRecommendation_event_pattern diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-SpotInterruption_event_pattern b/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-SpotInterruption_event_pattern similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-SpotInterruption_event_pattern rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-SpotInterruption_event_pattern diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_masters.nthsqsresources.example.com_policy b/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_masters.nthsqsresources.longclustername.example.com_policy similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_masters.nthsqsresources.example.com_policy rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_masters.nthsqsresources.longclustername.example.com_policy diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_nodes.nthsqsresources.example.com_policy b/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_nodes.nthsqsresources.longclustername.example.com_policy similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_nodes.nthsqsresources.example.com_policy rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_nodes.nthsqsresources.longclustername.example.com_policy diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_masters.nthsqsresources.example.com_policy b/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_masters.nthsqsresources.longclustername.example.com_policy similarity index 94% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_masters.nthsqsresources.example.com_policy rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_masters.nthsqsresources.longclustername.example.com_policy index fa4a2d6227..febd732629 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_masters.nthsqsresources.example.com_policy +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_masters.nthsqsresources.longclustername.example.com_policy @@ -4,7 +4,7 @@ "Action": "ec2:AttachVolume", "Condition": { "StringEquals": { - "aws:ResourceTag/KubernetesCluster": "nthsqsresources.example.com", + "aws:ResourceTag/KubernetesCluster": "nthsqsresources.longclustername.example.com", "aws:ResourceTag/k8s.io/role/master": "1" } }, @@ -18,7 +18,7 @@ "s3:Get*" ], "Effect": "Allow", - "Resource": "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/*" + "Resource": "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/*" }, { "Action": [ @@ -28,7 +28,7 @@ "s3:PutObject" ], "Effect": "Allow", - "Resource": "arn:aws:s3:::placeholder-write-bucket/clusters.example.com/nthsqsresources.example.com/backups/etcd/main/*" + "Resource": "arn:aws:s3:::placeholder-write-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/main/*" }, { "Action": [ @@ -38,7 +38,7 @@ "s3:PutObject" ], "Effect": "Allow", - "Resource": "arn:aws:s3:::placeholder-write-bucket/clusters.example.com/nthsqsresources.example.com/backups/etcd/events/*" + "Resource": "arn:aws:s3:::placeholder-write-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/events/*" }, { "Action": [ @@ -130,7 +130,7 @@ "Action": "ec2:DeleteTags", "Condition": { "StringEquals": { - "aws:ResourceTag/KubernetesCluster": "nthsqsresources.example.com" + "aws:ResourceTag/KubernetesCluster": "nthsqsresources.longclustername.example.com" } }, "Effect": "Allow", @@ -209,7 +209,7 @@ ], "Condition": { "StringEquals": { - "aws:ResourceTag/KubernetesCluster": "nthsqsresources.example.com" + "aws:ResourceTag/KubernetesCluster": "nthsqsresources.longclustername.example.com" } }, "Effect": "Allow", @@ -227,7 +227,7 @@ ], "Condition": { "StringEquals": { - "aws:RequestTag/KubernetesCluster": "nthsqsresources.example.com" + "aws:RequestTag/KubernetesCluster": "nthsqsresources.longclustername.example.com" } }, "Effect": "Allow", diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_nodes.nthsqsresources.example.com_policy b/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_nodes.nthsqsresources.longclustername.example.com_policy similarity index 79% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_nodes.nthsqsresources.example.com_policy rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_nodes.nthsqsresources.longclustername.example.com_policy index 78781c8221..df6095658e 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_nodes.nthsqsresources.example.com_policy +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_iam_role_policy_nodes.nthsqsresources.longclustername.example.com_policy @@ -6,10 +6,10 @@ ], "Effect": "Allow", "Resource": [ - "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/addons/*", - "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/cluster-completed.spec", - "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/igconfig/node/*", - "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.example.com/secrets/dockerconfig" + "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/addons/*", + "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/cluster-completed.spec", + "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/igconfig/node/*", + "arn:aws:s3:::placeholder-read-bucket/clusters.example.com/nthsqsresources.longclustername.example.com/secrets/dockerconfig" ] }, { diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_key_pair_kubernetes.nthsqsresources.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key b/tests/integration/update_cluster/nth_sqs_resources/data/aws_key_pair_kubernetes.nthsqsresources.longclustername.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_key_pair_kubernetes.nthsqsresources.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_key_pair_kubernetes.nthsqsresources.longclustername.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_master-us-test-1a.masters.nthsqsresources.example.com_user_data b/tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_master-us-test-1a.masters.nthsqsresources.longclustername.example.com_user_data similarity index 94% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_master-us-test-1a.masters.nthsqsresources.example.com_user_data rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_master-us-test-1a.masters.nthsqsresources.longclustername.example.com_user_data index 8375c82fb5..24f888491f 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_master-us-test-1a.masters.nthsqsresources.example.com_user_data +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_master-us-test-1a.masters.nthsqsresources.longclustername.example.com_user_data @@ -178,8 +178,8 @@ kubeAPIServer: requestheaderUsernameHeaders: - X-Remote-User securePort: 443 - serviceAccountIssuer: https://api.internal.nthsqsresources.example.com - serviceAccountJWKSURI: https://api.internal.nthsqsresources.example.com/openid/v1/jwks + serviceAccountIssuer: https://api.internal.nthsqsresources.longclustername.example.com + serviceAccountJWKSURI: https://api.internal.nthsqsresources.longclustername.example.com/openid/v1/jwks serviceClusterIPRange: 100.64.0.0/13 storageBackend: etcd3 kubeControllerManager: @@ -187,7 +187,7 @@ kubeControllerManager: attachDetachReconcileSyncPeriod: 1m0s cloudProvider: aws clusterCIDR: 100.96.0.0/11 - clusterName: nthsqsresources.example.com + clusterName: nthsqsresources.longclustername.example.com configureCloudRoutes: false image: k8s.gcr.io/kube-controller-manager:v1.20.0 leaderElection: @@ -241,10 +241,10 @@ __EOF_CLUSTER_SPEC cat > conf/kube_env.yaml << '__EOF_KUBE_ENV' CloudProvider: aws -ConfigBase: memfs://clusters.example.com/nthsqsresources.example.com +ConfigBase: memfs://clusters.example.com/nthsqsresources.longclustername.example.com InstanceGroupName: master-us-test-1a InstanceGroupRole: Master -NodeupConfigHash: CQPZFIY4im/2GcHbUCIbx6Stn6kfDXPqRsy1xkyjSL0= +NodeupConfigHash: sGrshxpFidkBKocZgsdNwpRH3cwwL2f5KPGr751qKmg= __EOF_KUBE_ENV diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_nodes.nthsqsresources.example.com_user_data b/tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_nodes.nthsqsresources.longclustername.example.com_user_data similarity index 96% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_nodes.nthsqsresources.example.com_user_data rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_nodes.nthsqsresources.longclustername.example.com_user_data index c6f8e657a9..65af4209de 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_nodes.nthsqsresources.example.com_user_data +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_launch_template_nodes.nthsqsresources.longclustername.example.com_user_data @@ -159,10 +159,10 @@ __EOF_CLUSTER_SPEC cat > conf/kube_env.yaml << '__EOF_KUBE_ENV' CloudProvider: aws -ConfigBase: memfs://clusters.example.com/nthsqsresources.example.com +ConfigBase: memfs://clusters.example.com/nthsqsresources.longclustername.example.com InstanceGroupName: nodes InstanceGroupRole: Node -NodeupConfigHash: 5KnqQJ045S8OADWs9ZyNvtubFIYrD55hh4OiqPcn3z8= +NodeupConfigHash: JDdsIp2tzHSnDmPELOQk6uvokC81/DO5ElOEu3937GY= __EOF_KUBE_ENV diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_cluster-completed.spec_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_cluster-completed.spec_content index 9a1764cd78..f3e867d34d 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_cluster-completed.spec_content @@ -2,7 +2,7 @@ apiVersion: kops.k8s.io/v1alpha2 kind: Cluster metadata: creationTimestamp: "2016-12-10T22:42:27Z" - name: nthsqsresources.example.com + name: nthsqsresources.longclustername.example.com spec: api: dns: {} @@ -15,8 +15,8 @@ spec: manageStorageClasses: true cloudProvider: aws clusterDNSDomain: cluster.local - configBase: memfs://clusters.example.com/nthsqsresources.example.com - configStore: memfs://clusters.example.com/nthsqsresources.example.com + configBase: memfs://clusters.example.com/nthsqsresources.longclustername.example.com + configStore: memfs://clusters.example.com/nthsqsresources.longclustername.example.com containerRuntime: containerd containerd: logLevel: info @@ -26,7 +26,7 @@ spec: skipInstall: true etcdClusters: - backups: - backupStore: memfs://clusters.example.com/nthsqsresources.example.com/backups/etcd/main + backupStore: memfs://clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/main enableEtcdTLS: true enableTLSAuth: true etcdMembers: @@ -36,7 +36,7 @@ spec: provider: Manager version: 3.4.13 - backups: - backupStore: memfs://clusters.example.com/nthsqsresources.example.com/backups/etcd/events + backupStore: memfs://clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/events enableEtcdTLS: true enableTLSAuth: true etcdMembers: @@ -49,7 +49,7 @@ spec: provider: dns-controller iam: legacy: false - keyStore: memfs://clusters.example.com/nthsqsresources.example.com/pki + keyStore: memfs://clusters.example.com/nthsqsresources.longclustername.example.com/pki kubeAPIServer: allowPrivileged: true anonymousAuth: false @@ -89,8 +89,8 @@ spec: requestheaderUsernameHeaders: - X-Remote-User securePort: 443 - serviceAccountIssuer: https://api.internal.nthsqsresources.example.com - serviceAccountJWKSURI: https://api.internal.nthsqsresources.example.com/openid/v1/jwks + serviceAccountIssuer: https://api.internal.nthsqsresources.longclustername.example.com + serviceAccountJWKSURI: https://api.internal.nthsqsresources.longclustername.example.com/openid/v1/jwks serviceClusterIPRange: 100.64.0.0/13 storageBackend: etcd3 kubeControllerManager: @@ -98,7 +98,7 @@ spec: attachDetachReconcileSyncPeriod: 1m0s cloudProvider: aws clusterCIDR: 100.96.0.0/11 - clusterName: nthsqsresources.example.com + clusterName: nthsqsresources.longclustername.example.com configureCloudRoutes: false image: k8s.gcr.io/kube-controller-manager:v1.20.0 leaderElection: @@ -149,7 +149,7 @@ spec: kubernetesApiAccess: - 0.0.0.0/0 kubernetesVersion: 1.20.0 - masterInternalName: api.internal.nthsqsresources.example.com + masterInternalName: api.internal.nthsqsresources.longclustername.example.com masterKubelet: anonymousAuth: false cgroupDriver: systemd @@ -166,7 +166,7 @@ spec: nonMasqueradeCIDR: 100.64.0.0/10 podManifestPath: /etc/kubernetes/manifests registerSchedulable: false - masterPublicName: api.nthsqsresources.example.com + masterPublicName: api.nthsqsresources.longclustername.example.com networkCIDR: 172.20.0.0/16 networking: cni: {} @@ -183,7 +183,7 @@ spec: prometheusEnable: false nonMasqueradeCIDR: 100.64.0.0/10 podCIDR: 100.96.0.0/11 - secretStore: memfs://clusters.example.com/nthsqsresources.example.com/secrets + secretStore: memfs://clusters.example.com/nthsqsresources.longclustername.example.com/secrets serviceClusterIPRange: 100.64.0.0/13 sshAccess: - 0.0.0.0/0 diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_manifests-etcdmanager-events_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_manifests-etcdmanager-events_content index 6b0a4d5759..5f458c3f36 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_manifests-etcdmanager-events_content +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_manifests-etcdmanager-events_content @@ -12,13 +12,13 @@ spec: - /bin/sh - -c - mkfifo /tmp/pipe; (tee -a /var/log/etcd.log < /tmp/pipe & ) ; exec /etcd-manager - --backup-store=memfs://clusters.example.com/nthsqsresources.example.com/backups/etcd/events + --backup-store=memfs://clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/events --client-urls=https://__name__:4002 --cluster-name=etcd-events --containerized=true - --dns-suffix=.internal.nthsqsresources.example.com --grpc-port=3997 --peer-urls=https://__name__:2381 - --quarantine-client-urls=https://__name__:3995 --v=6 --volume-name-tag=k8s.io/etcd/events - --volume-provider=aws --volume-tag=k8s.io/etcd/events --volume-tag=k8s.io/role/master=1 - --volume-tag=kubernetes.io/cluster/nthsqsresources.example.com=owned > /tmp/pipe - 2>&1 + --dns-suffix=.internal.nthsqsresources.longclustername.example.com --grpc-port=3997 + --peer-urls=https://__name__:2381 --quarantine-client-urls=https://__name__:3995 + --v=6 --volume-name-tag=k8s.io/etcd/events --volume-provider=aws --volume-tag=k8s.io/etcd/events + --volume-tag=k8s.io/role/master=1 --volume-tag=kubernetes.io/cluster/nthsqsresources.longclustername.example.com=owned + > /tmp/pipe 2>&1 image: k8s.gcr.io/etcdadm/etcd-manager:3.0.20210707 name: etcd-manager resources: diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_manifests-etcdmanager-main_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_manifests-etcdmanager-main_content index 1212e3caa9..df67f0c601 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_manifests-etcdmanager-main_content +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_manifests-etcdmanager-main_content @@ -12,13 +12,13 @@ spec: - /bin/sh - -c - mkfifo /tmp/pipe; (tee -a /var/log/etcd.log < /tmp/pipe & ) ; exec /etcd-manager - --backup-store=memfs://clusters.example.com/nthsqsresources.example.com/backups/etcd/main + --backup-store=memfs://clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/main --client-urls=https://__name__:4001 --cluster-name=etcd --containerized=true - --dns-suffix=.internal.nthsqsresources.example.com --grpc-port=3996 --peer-urls=https://__name__:2380 - --quarantine-client-urls=https://__name__:3994 --v=6 --volume-name-tag=k8s.io/etcd/main - --volume-provider=aws --volume-tag=k8s.io/etcd/main --volume-tag=k8s.io/role/master=1 - --volume-tag=kubernetes.io/cluster/nthsqsresources.example.com=owned > /tmp/pipe - 2>&1 + --dns-suffix=.internal.nthsqsresources.longclustername.example.com --grpc-port=3996 + --peer-urls=https://__name__:2380 --quarantine-client-urls=https://__name__:3994 + --v=6 --volume-name-tag=k8s.io/etcd/main --volume-provider=aws --volume-tag=k8s.io/etcd/main + --volume-tag=k8s.io/role/master=1 --volume-tag=kubernetes.io/cluster/nthsqsresources.longclustername.example.com=owned + > /tmp/pipe 2>&1 image: k8s.gcr.io/etcdadm/etcd-manager:3.0.20210707 name: etcd-manager resources: diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nodeupconfig-master-us-test-1a_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nodeupconfig-master-us-test-1a_content index 4bce7124df..52b91add80 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nodeupconfig-master-us-test-1a_content +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nodeupconfig-master-us-test-1a_content @@ -38,8 +38,8 @@ APIServerConfig: requestheaderUsernameHeaders: - X-Remote-User securePort: 443 - serviceAccountIssuer: https://api.internal.nthsqsresources.example.com - serviceAccountJWKSURI: https://api.internal.nthsqsresources.example.com/openid/v1/jwks + serviceAccountIssuer: https://api.internal.nthsqsresources.longclustername.example.com + serviceAccountJWKSURI: https://api.internal.nthsqsresources.longclustername.example.com/openid/v1/jwks serviceClusterIPRange: 100.64.0.0/13 storageBackend: etcd3 ServiceAccountPublicKeys: | @@ -218,7 +218,7 @@ CAs: MA0GCSqGSIb3DQEBCwUAA0EAVQVx5MUtuAIeePuP9o51xtpT2S6Fvfi8J4ICxnlA 9B7UD2ushcVFPtaeoL9Gfu8aY4KJBeqqg5ojl4qmRnThjw== -----END CERTIFICATE----- -ClusterName: nthsqsresources.example.com +ClusterName: nthsqsresources.longclustername.example.com Hooks: - null - null @@ -255,13 +255,13 @@ KubeletConfig: registerSchedulable: false UpdatePolicy: automatic channels: -- memfs://clusters.example.com/nthsqsresources.example.com/addons/bootstrap-channel.yaml +- memfs://clusters.example.com/nthsqsresources.longclustername.example.com/addons/bootstrap-channel.yaml containerdConfig: logLevel: info version: 1.4.9 etcdManifests: -- memfs://clusters.example.com/nthsqsresources.example.com/manifests/etcd/main.yaml -- memfs://clusters.example.com/nthsqsresources.example.com/manifests/etcd/events.yaml +- memfs://clusters.example.com/nthsqsresources.longclustername.example.com/manifests/etcd/main.yaml +- memfs://clusters.example.com/nthsqsresources.longclustername.example.com/manifests/etcd/events.yaml staticManifests: - key: kube-apiserver-healthcheck path: manifests/static/kube-apiserver-healthcheck.yaml diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nodeupconfig-nodes_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nodeupconfig-nodes_content index 4ab8381993..30bed12d7b 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nodeupconfig-nodes_content +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nodeupconfig-nodes_content @@ -31,7 +31,7 @@ CAs: MA0GCSqGSIb3DQEBCwUAA0EAVQVx5MUtuAIeePuP9o51xtpT2S6Fvfi8J4ICxnlA 9B7UD2ushcVFPtaeoL9Gfu8aY4KJBeqqg5ojl4qmRnThjw== -----END CERTIFICATE----- -ClusterName: nthsqsresources.example.com +ClusterName: nthsqsresources.longclustername.example.com Hooks: - null - null @@ -57,7 +57,7 @@ KubeletConfig: podManifestPath: /etc/kubernetes/manifests UpdatePolicy: automatic channels: -- memfs://clusters.example.com/nthsqsresources.example.com/addons/bootstrap-channel.yaml +- memfs://clusters.example.com/nthsqsresources.longclustername.example.com/addons/bootstrap-channel.yaml containerdConfig: logLevel: info version: 1.4.9 diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-bootstrap_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-bootstrap_content similarity index 91% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-bootstrap_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-bootstrap_content index ffddef5077..d023c591c0 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-bootstrap_content @@ -6,7 +6,7 @@ spec: addons: - id: k8s-1.16 manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml - manifestHash: 8656b419fca43a10d6dde2c752a4807dad2ad1864da5a5fec0271b76e9c867ff + manifestHash: 18c72d62b12d7360b45e9d8e858e62e0f74be2f546427bdd05aad65958a3c443 name: kops-controller.addons.k8s.io needsRollingUpdate: control-plane selector: @@ -41,7 +41,7 @@ spec: k8s-addon: dns-controller.addons.k8s.io - id: k8s-1.11 manifest: node-termination-handler.aws/k8s-1.11.yaml - manifestHash: c03c13e87cb8c6a7731fdbc08c9f99e1c960a9da71696fd33b781eca51de22dc + manifestHash: 424354959edcf24bcc3e1a3099b5b0a4525d59e2336a36940995ae51ead4ab08 name: node-termination-handler.aws selector: k8s-addon: node-termination-handler.aws diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-core.addons.k8s.io_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-core.addons.k8s.io_content similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-core.addons.k8s.io_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-core.addons.k8s.io_content diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-dns-controller.addons.k8s.io-k8s-1.12_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-dns-controller.addons.k8s.io-k8s-1.12_content similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-dns-controller.addons.k8s.io-k8s-1.12_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-dns-controller.addons.k8s.io-k8s-1.12_content diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content similarity index 90% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content index db2206c186..f835f69f02 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content @@ -1,7 +1,7 @@ apiVersion: v1 data: config.yaml: | - {"cloud":"aws","configBase":"memfs://clusters.example.com/nthsqsresources.example.com","server":{"Listen":":3988","provider":{"aws":{"nodesRoles":["nodes.nthsqsresources.example.com"],"Region":"us-test-1"}},"serverKeyPath":"/etc/kubernetes/kops-controller/pki/kops-controller.key","serverCertificatePath":"/etc/kubernetes/kops-controller/pki/kops-controller.crt","caBasePath":"/etc/kubernetes/kops-controller/pki","signingCAs":["kubernetes-ca"],"certNames":["kubelet","kubelet-server","kube-proxy"]}} + {"cloud":"aws","configBase":"memfs://clusters.example.com/nthsqsresources.longclustername.example.com","server":{"Listen":":3988","provider":{"aws":{"nodesRoles":["nodes.nthsqsresources.longclustername.example.com"],"Region":"us-test-1"}},"serverKeyPath":"/etc/kubernetes/kops-controller/pki/kops-controller.key","serverCertificatePath":"/etc/kubernetes/kops-controller/pki/kops-controller.crt","caBasePath":"/etc/kubernetes/kops-controller/pki","signingCAs":["kubernetes-ca"],"certNames":["kubelet","kubelet-server","kube-proxy"]}} kind: ConfigMap metadata: creationTimestamp: null @@ -33,7 +33,7 @@ spec: template: metadata: annotations: - dns.alpha.kubernetes.io/internal: kops-controller.internal.nthsqsresources.example.com + dns.alpha.kubernetes.io/internal: kops-controller.internal.nthsqsresources.longclustername.example.com labels: k8s-addon: kops-controller.addons.k8s.io k8s-app: kops-controller diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-limit-range.addons.k8s.io_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-limit-range.addons.k8s.io_content similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-limit-range.addons.k8s.io_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-limit-range.addons.k8s.io_content diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-node-termination-handler.aws-k8s-1.11_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-node-termination-handler.aws-k8s-1.11_content similarity index 99% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-node-termination-handler.aws-k8s-1.11_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-node-termination-handler.aws-k8s-1.11_content index 4a727a7de7..fffc3c2804 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-node-termination-handler.aws-k8s-1.11_content +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-node-termination-handler.aws-k8s-1.11_content @@ -186,7 +186,7 @@ spec: - name: ENABLE_SQS_TERMINATION_DRAINING value: "true" - name: QUEUE_URL - value: https://sqs.us-test-1.amazonaws.com/123456789012/nthsqsresources-example-com-nth + value: https://sqs.us-test-1.amazonaws.com/123456789012/nthsqsresources-longclustername-example-com-nth - name: PROMETHEUS_SERVER_PORT value: "9092" - name: AWS_REGION diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-storage-aws.addons.k8s.io-v1.15.0_content b/tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-storage-aws.addons.k8s.io-v1.15.0_content similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-storage-aws.addons.k8s.io-v1.15.0_content rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-storage-aws.addons.k8s.io-v1.15.0_content diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_sqs_queue_nthsqsresources-example-com-nth_policy b/tests/integration/update_cluster/nth_sqs_resources/data/aws_sqs_queue_nthsqsresources-longclustername-example-com-nth_policy similarity index 88% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_sqs_queue_nthsqsresources-example-com-nth_policy rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_sqs_queue_nthsqsresources-longclustername-example-com-nth_policy index b854bb0188..06b0619ae8 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/data/aws_sqs_queue_nthsqsresources-example-com-nth_policy +++ b/tests/integration/update_cluster/nth_sqs_resources/data/aws_sqs_queue_nthsqsresources-longclustername-example-com-nth_policy @@ -6,6 +6,6 @@ "Service": ["events.amazonaws.com", "sqs.amazonaws.com"] }, "Action": "sqs:SendMessage", - "Resource": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" + "Resource": "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" }] } diff --git a/tests/integration/update_cluster/nth_sqs_resources/in-v1alpha2.yaml b/tests/integration/update_cluster/nth_sqs_resources/in-v1alpha2.yaml index 50357a13b4..b91c94fc52 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/in-v1alpha2.yaml +++ b/tests/integration/update_cluster/nth_sqs_resources/in-v1alpha2.yaml @@ -2,13 +2,13 @@ apiVersion: kops.k8s.io/v1alpha2 kind: Cluster metadata: creationTimestamp: "2016-12-10T22:42:27Z" - name: nthsqsresources.example.com + name: nthsqsresources.longclustername.example.com spec: kubernetesApiAccess: - 0.0.0.0/0 channel: stable cloudProvider: aws - configBase: memfs://clusters.example.com/nthsqsresources.example.com + configBase: memfs://clusters.example.com/nthsqsresources.longclustername.example.com etcdClusters: - etcdMembers: - instanceGroup: master-us-test-1a @@ -22,8 +22,8 @@ spec: kubelet: anonymousAuth: false kubernetesVersion: v1.20.0 - masterInternalName: api.internal.nthsqsresources.example.com - masterPublicName: api.nthsqsresources.example.com + masterInternalName: api.internal.nthsqsresources.longclustername.example.com + masterPublicName: api.nthsqsresources.longclustername.example.com networkCIDR: 172.20.0.0/16 networking: cni: {} @@ -50,7 +50,7 @@ metadata: creationTimestamp: "2016-12-10T22:42:28Z" name: nodes labels: - kops.k8s.io/cluster: nthsqsresources.example.com + kops.k8s.io/cluster: nthsqsresources.longclustername.example.com spec: associatePublicIp: true image: kope.io/k8s-1.4-debian-jessie-amd64-hvm-ebs-2016-10-21 @@ -69,7 +69,7 @@ metadata: creationTimestamp: "2016-12-10T22:42:28Z" name: master-us-test-1a labels: - kops.k8s.io/cluster: nthsqsresources.example.com + kops.k8s.io/cluster: nthsqsresources.longclustername.example.com spec: associatePublicIp: true image: kope.io/k8s-1.4-debian-jessie-amd64-hvm-ebs-2016-10-21 diff --git a/tests/integration/update_cluster/nth_sqs_resources/kubernetes.tf b/tests/integration/update_cluster/nth_sqs_resources/kubernetes.tf index 29e3d09a54..e97a61fe27 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/kubernetes.tf +++ b/tests/integration/update_cluster/nth_sqs_resources/kubernetes.tf @@ -1,59 +1,59 @@ locals { - cluster_name = "nthsqsresources.example.com" - master_autoscaling_group_ids = [aws_autoscaling_group.master-us-test-1a-masters-nthsqsresources-example-com.id] - master_security_group_ids = [aws_security_group.masters-nthsqsresources-example-com.id] - masters_role_arn = aws_iam_role.masters-nthsqsresources-example-com.arn - masters_role_name = aws_iam_role.masters-nthsqsresources-example-com.name - node_autoscaling_group_ids = [aws_autoscaling_group.nodes-nthsqsresources-example-com.id] - node_security_group_ids = [aws_security_group.nodes-nthsqsresources-example-com.id] - node_subnet_ids = [aws_subnet.us-test-1a-nthsqsresources-example-com.id] - nodes_role_arn = aws_iam_role.nodes-nthsqsresources-example-com.arn - nodes_role_name = aws_iam_role.nodes-nthsqsresources-example-com.name + cluster_name = "nthsqsresources.longclustername.example.com" + master_autoscaling_group_ids = [aws_autoscaling_group.master-us-test-1a-masters-nthsqsresources-longclustername-example-com.id] + master_security_group_ids = [aws_security_group.masters-nthsqsresources-longclustername-example-com.id] + masters_role_arn = aws_iam_role.masters-nthsqsresources-longclustername-example-com.arn + masters_role_name = aws_iam_role.masters-nthsqsresources-longclustername-example-com.name + node_autoscaling_group_ids = [aws_autoscaling_group.nodes-nthsqsresources-longclustername-example-com.id] + node_security_group_ids = [aws_security_group.nodes-nthsqsresources-longclustername-example-com.id] + node_subnet_ids = [aws_subnet.us-test-1a-nthsqsresources-longclustername-example-com.id] + nodes_role_arn = aws_iam_role.nodes-nthsqsresources-longclustername-example-com.arn + nodes_role_name = aws_iam_role.nodes-nthsqsresources-longclustername-example-com.name region = "us-test-1" - route_table_public_id = aws_route_table.nthsqsresources-example-com.id - subnet_us-test-1a_id = aws_subnet.us-test-1a-nthsqsresources-example-com.id - vpc_cidr_block = aws_vpc.nthsqsresources-example-com.cidr_block - vpc_id = aws_vpc.nthsqsresources-example-com.id + route_table_public_id = aws_route_table.nthsqsresources-longclustername-example-com.id + subnet_us-test-1a_id = aws_subnet.us-test-1a-nthsqsresources-longclustername-example-com.id + vpc_cidr_block = aws_vpc.nthsqsresources-longclustername-example-com.cidr_block + vpc_id = aws_vpc.nthsqsresources-longclustername-example-com.id } output "cluster_name" { - value = "nthsqsresources.example.com" + value = "nthsqsresources.longclustername.example.com" } output "master_autoscaling_group_ids" { - value = [aws_autoscaling_group.master-us-test-1a-masters-nthsqsresources-example-com.id] + value = [aws_autoscaling_group.master-us-test-1a-masters-nthsqsresources-longclustername-example-com.id] } output "master_security_group_ids" { - value = [aws_security_group.masters-nthsqsresources-example-com.id] + value = [aws_security_group.masters-nthsqsresources-longclustername-example-com.id] } output "masters_role_arn" { - value = aws_iam_role.masters-nthsqsresources-example-com.arn + value = aws_iam_role.masters-nthsqsresources-longclustername-example-com.arn } output "masters_role_name" { - value = aws_iam_role.masters-nthsqsresources-example-com.name + value = aws_iam_role.masters-nthsqsresources-longclustername-example-com.name } output "node_autoscaling_group_ids" { - value = [aws_autoscaling_group.nodes-nthsqsresources-example-com.id] + value = [aws_autoscaling_group.nodes-nthsqsresources-longclustername-example-com.id] } output "node_security_group_ids" { - value = [aws_security_group.nodes-nthsqsresources-example-com.id] + value = [aws_security_group.nodes-nthsqsresources-longclustername-example-com.id] } output "node_subnet_ids" { - value = [aws_subnet.us-test-1a-nthsqsresources-example-com.id] + value = [aws_subnet.us-test-1a-nthsqsresources-longclustername-example-com.id] } output "nodes_role_arn" { - value = aws_iam_role.nodes-nthsqsresources-example-com.arn + value = aws_iam_role.nodes-nthsqsresources-longclustername-example-com.arn } output "nodes_role_name" { - value = aws_iam_role.nodes-nthsqsresources-example-com.name + value = aws_iam_role.nodes-nthsqsresources-longclustername-example-com.name } output "region" { @@ -61,19 +61,19 @@ output "region" { } output "route_table_public_id" { - value = aws_route_table.nthsqsresources-example-com.id + value = aws_route_table.nthsqsresources-longclustername-example-com.id } output "subnet_us-test-1a_id" { - value = aws_subnet.us-test-1a-nthsqsresources-example-com.id + value = aws_subnet.us-test-1a-nthsqsresources-longclustername-example-com.id } output "vpc_cidr_block" { - value = aws_vpc.nthsqsresources-example-com.cidr_block + value = aws_vpc.nthsqsresources-longclustername-example-com.cidr_block } output "vpc_id" { - value = aws_vpc.nthsqsresources-example-com.id + value = aws_vpc.nthsqsresources-longclustername-example-com.id } provider "aws" { @@ -85,26 +85,26 @@ provider "aws" { region = "us-test-1" } -resource "aws_autoscaling_group" "master-us-test-1a-masters-nthsqsresources-example-com" { +resource "aws_autoscaling_group" "master-us-test-1a-masters-nthsqsresources-longclustername-example-com" { enabled_metrics = ["GroupDesiredCapacity", "GroupInServiceInstances", "GroupMaxSize", "GroupMinSize", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances"] launch_template { - id = aws_launch_template.master-us-test-1a-masters-nthsqsresources-example-com.id - version = aws_launch_template.master-us-test-1a-masters-nthsqsresources-example-com.latest_version + id = aws_launch_template.master-us-test-1a-masters-nthsqsresources-longclustername-example-com.id + version = aws_launch_template.master-us-test-1a-masters-nthsqsresources-longclustername-example-com.latest_version } max_size = 1 metrics_granularity = "1Minute" min_size = 1 - name = "master-us-test-1a.masters.nthsqsresources.example.com" + name = "master-us-test-1a.masters.nthsqsresources.longclustername.example.com" protect_from_scale_in = false tag { key = "KubernetesCluster" propagate_at_launch = true - value = "nthsqsresources.example.com" + value = "nthsqsresources.longclustername.example.com" } tag { key = "Name" propagate_at_launch = true - value = "master-us-test-1a.masters.nthsqsresources.example.com" + value = "master-us-test-1a.masters.nthsqsresources.longclustername.example.com" } tag { key = "aws-node-termination-handler/managed" @@ -147,33 +147,33 @@ resource "aws_autoscaling_group" "master-us-test-1a-masters-nthsqsresources-exam value = "master-us-test-1a" } tag { - key = "kubernetes.io/cluster/nthsqsresources.example.com" + key = "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" propagate_at_launch = true value = "owned" } - vpc_zone_identifier = [aws_subnet.us-test-1a-nthsqsresources-example-com.id] + vpc_zone_identifier = [aws_subnet.us-test-1a-nthsqsresources-longclustername-example-com.id] } -resource "aws_autoscaling_group" "nodes-nthsqsresources-example-com" { +resource "aws_autoscaling_group" "nodes-nthsqsresources-longclustername-example-com" { enabled_metrics = ["GroupDesiredCapacity", "GroupInServiceInstances", "GroupMaxSize", "GroupMinSize", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances"] launch_template { - id = aws_launch_template.nodes-nthsqsresources-example-com.id - version = aws_launch_template.nodes-nthsqsresources-example-com.latest_version + id = aws_launch_template.nodes-nthsqsresources-longclustername-example-com.id + version = aws_launch_template.nodes-nthsqsresources-longclustername-example-com.latest_version } max_size = 2 metrics_granularity = "1Minute" min_size = 2 - name = "nodes.nthsqsresources.example.com" + name = "nodes.nthsqsresources.longclustername.example.com" protect_from_scale_in = false tag { key = "KubernetesCluster" propagate_at_launch = true - value = "nthsqsresources.example.com" + value = "nthsqsresources.longclustername.example.com" } tag { key = "Name" propagate_at_launch = true - value = "nodes.nthsqsresources.example.com" + value = "nodes.nthsqsresources.longclustername.example.com" } tag { key = "aws-node-termination-handler/managed" @@ -201,15 +201,15 @@ resource "aws_autoscaling_group" "nodes-nthsqsresources-example-com" { value = "nodes" } tag { - key = "kubernetes.io/cluster/nthsqsresources.example.com" + key = "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" propagate_at_launch = true value = "owned" } - vpc_zone_identifier = [aws_subnet.us-test-1a-nthsqsresources-example-com.id] + vpc_zone_identifier = [aws_subnet.us-test-1a-nthsqsresources-longclustername-example-com.id] } resource "aws_autoscaling_lifecycle_hook" "master-us-test-1a-NTHLifecycleHook" { - autoscaling_group_name = aws_autoscaling_group.master-us-test-1a-masters-nthsqsresources-example-com.id + autoscaling_group_name = aws_autoscaling_group.master-us-test-1a-masters-nthsqsresources-longclustername-example-com.id default_result = "CONTINUE" heartbeat_timeout = 300 lifecycle_transition = "autoscaling:EC2_INSTANCE_TERMINATING" @@ -217,177 +217,177 @@ resource "aws_autoscaling_lifecycle_hook" "master-us-test-1a-NTHLifecycleHook" { } resource "aws_autoscaling_lifecycle_hook" "nodes-NTHLifecycleHook" { - autoscaling_group_name = aws_autoscaling_group.nodes-nthsqsresources-example-com.id + autoscaling_group_name = aws_autoscaling_group.nodes-nthsqsresources-longclustername-example-com.id default_result = "CONTINUE" heartbeat_timeout = 300 lifecycle_transition = "autoscaling:EC2_INSTANCE_TERMINATING" name = "nodes-NTHLifecycleHook" } -resource "aws_cloudwatch_event_rule" "nthsqsresources-example-com-ASGLifecycle" { - event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-ASGLifecycle_event_pattern") - name = "nthsqsresources.example.com-ASGLifecycle" +resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-example-com-ASGLifecycle" { + event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-ASGLifecycle_event_pattern") + name = "nthsqsresources.longclustername.example.com-ASGLifecycle" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com-ASGLifecycle" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com-ASGLifecycle" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_cloudwatch_event_rule" "nthsqsresources-example-com-InstanceStateChange" { - event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-InstanceStateChange_event_pattern") - name = "nthsqsresources.example.com-InstanceStateChange" +resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-example-com-InstanceStateChange" { + event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-InstanceStateChange_event_pattern") + name = "nthsqsresources.longclustername.example.com-InstanceStateChange" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com-InstanceStateChange" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com-InstanceStateChange" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_cloudwatch_event_rule" "nthsqsresources-example-com-RebalanceRecommendation" { - event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-RebalanceRecommendation_event_pattern") - name = "nthsqsresources.example.com-RebalanceRecommendation" +resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-example-com-RebalanceRecommendation" { + event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-RebalanceRecommendation_event_pattern") + name = "nthsqsresources.longclustername.example.com-RebalanceRecommendation" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com-RebalanceRecommendation" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com-RebalanceRecommendation" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_cloudwatch_event_rule" "nthsqsresources-example-com-SpotInterruption" { - event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.example.com-SpotInterruption_event_pattern") - name = "nthsqsresources.example.com-SpotInterruption" +resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-example-com-SpotInterruption" { + event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-SpotInterruption_event_pattern") + name = "nthsqsresources.longclustername.example.com-SpotInterruption" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com-SpotInterruption" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com-SpotInterruption" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_cloudwatch_event_target" "nthsqsresources-example-com-ASGLifecycle-Target" { - arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" - rule = aws_cloudwatch_event_rule.nthsqsresources-example-com-ASGLifecycle.id +resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-example-com-ASGLifecycle-Target" { + arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" + rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-example-com-ASGLifecycle.id } -resource "aws_cloudwatch_event_target" "nthsqsresources-example-com-InstanceStateChange-Target" { - arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" - rule = aws_cloudwatch_event_rule.nthsqsresources-example-com-InstanceStateChange.id +resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-example-com-InstanceStateChange-Target" { + arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" + rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-example-com-InstanceStateChange.id } -resource "aws_cloudwatch_event_target" "nthsqsresources-example-com-RebalanceRecommendation-Target" { - arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" - rule = aws_cloudwatch_event_rule.nthsqsresources-example-com-RebalanceRecommendation.id +resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-example-com-RebalanceRecommendation-Target" { + arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" + rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-example-com-RebalanceRecommendation.id } -resource "aws_cloudwatch_event_target" "nthsqsresources-example-com-SpotInterruption-Target" { - arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-example-com-nth" - rule = aws_cloudwatch_event_rule.nthsqsresources-example-com-SpotInterruption.id +resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-example-com-SpotInterruption-Target" { + arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" + rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-example-com-SpotInterruption.id } -resource "aws_ebs_volume" "us-test-1a-etcd-events-nthsqsresources-example-com" { +resource "aws_ebs_volume" "us-test-1a-etcd-events-nthsqsresources-longclustername-example-com" { availability_zone = "us-test-1a" encrypted = false iops = 3000 size = 20 tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "us-test-1a.etcd-events.nthsqsresources.example.com" - "k8s.io/etcd/events" = "us-test-1a/us-test-1a" - "k8s.io/role/master" = "1" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "us-test-1a.etcd-events.nthsqsresources.longclustername.example.com" + "k8s.io/etcd/events" = "us-test-1a/us-test-1a" + "k8s.io/role/master" = "1" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } throughput = 125 type = "gp3" } -resource "aws_ebs_volume" "us-test-1a-etcd-main-nthsqsresources-example-com" { +resource "aws_ebs_volume" "us-test-1a-etcd-main-nthsqsresources-longclustername-example-com" { availability_zone = "us-test-1a" encrypted = false iops = 3000 size = 20 tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "us-test-1a.etcd-main.nthsqsresources.example.com" - "k8s.io/etcd/main" = "us-test-1a/us-test-1a" - "k8s.io/role/master" = "1" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "us-test-1a.etcd-main.nthsqsresources.longclustername.example.com" + "k8s.io/etcd/main" = "us-test-1a/us-test-1a" + "k8s.io/role/master" = "1" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } throughput = 125 type = "gp3" } -resource "aws_iam_instance_profile" "masters-nthsqsresources-example-com" { - name = "masters.nthsqsresources.example.com" - role = aws_iam_role.masters-nthsqsresources-example-com.name +resource "aws_iam_instance_profile" "masters-nthsqsresources-longclustername-example-com" { + name = "masters.nthsqsresources.longclustername.example.com" + role = aws_iam_role.masters-nthsqsresources-longclustername-example-com.name tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "masters.nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "masters.nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_iam_instance_profile" "nodes-nthsqsresources-example-com" { - name = "nodes.nthsqsresources.example.com" - role = aws_iam_role.nodes-nthsqsresources-example-com.name +resource "aws_iam_instance_profile" "nodes-nthsqsresources-longclustername-example-com" { + name = "nodes.nthsqsresources.longclustername.example.com" + role = aws_iam_role.nodes-nthsqsresources-longclustername-example-com.name tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nodes.nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nodes.nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_iam_role" "masters-nthsqsresources-example-com" { - assume_role_policy = file("${path.module}/data/aws_iam_role_masters.nthsqsresources.example.com_policy") - name = "masters.nthsqsresources.example.com" +resource "aws_iam_role" "masters-nthsqsresources-longclustername-example-com" { + assume_role_policy = file("${path.module}/data/aws_iam_role_masters.nthsqsresources.longclustername.example.com_policy") + name = "masters.nthsqsresources.longclustername.example.com" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "masters.nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "masters.nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_iam_role" "nodes-nthsqsresources-example-com" { - assume_role_policy = file("${path.module}/data/aws_iam_role_nodes.nthsqsresources.example.com_policy") - name = "nodes.nthsqsresources.example.com" +resource "aws_iam_role" "nodes-nthsqsresources-longclustername-example-com" { + assume_role_policy = file("${path.module}/data/aws_iam_role_nodes.nthsqsresources.longclustername.example.com_policy") + name = "nodes.nthsqsresources.longclustername.example.com" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nodes.nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nodes.nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_iam_role_policy" "masters-nthsqsresources-example-com" { - name = "masters.nthsqsresources.example.com" - policy = file("${path.module}/data/aws_iam_role_policy_masters.nthsqsresources.example.com_policy") - role = aws_iam_role.masters-nthsqsresources-example-com.name +resource "aws_iam_role_policy" "masters-nthsqsresources-longclustername-example-com" { + name = "masters.nthsqsresources.longclustername.example.com" + policy = file("${path.module}/data/aws_iam_role_policy_masters.nthsqsresources.longclustername.example.com_policy") + role = aws_iam_role.masters-nthsqsresources-longclustername-example-com.name } -resource "aws_iam_role_policy" "nodes-nthsqsresources-example-com" { - name = "nodes.nthsqsresources.example.com" - policy = file("${path.module}/data/aws_iam_role_policy_nodes.nthsqsresources.example.com_policy") - role = aws_iam_role.nodes-nthsqsresources-example-com.name +resource "aws_iam_role_policy" "nodes-nthsqsresources-longclustername-example-com" { + name = "nodes.nthsqsresources.longclustername.example.com" + policy = file("${path.module}/data/aws_iam_role_policy_nodes.nthsqsresources.longclustername.example.com_policy") + role = aws_iam_role.nodes-nthsqsresources-longclustername-example-com.name } -resource "aws_internet_gateway" "nthsqsresources-example-com" { +resource "aws_internet_gateway" "nthsqsresources-longclustername-example-com" { tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } - vpc_id = aws_vpc.nthsqsresources-example-com.id + vpc_id = aws_vpc.nthsqsresources-longclustername-example-com.id } -resource "aws_key_pair" "kubernetes-nthsqsresources-example-com-c4a6ed9aa889b9e2c39cd663eb9c7157" { - key_name = "kubernetes.nthsqsresources.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57" - public_key = file("${path.module}/data/aws_key_pair_kubernetes.nthsqsresources.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key") +resource "aws_key_pair" "kubernetes-nthsqsresources-longclustername-example-com-c4a6ed9aa889b9e2c39cd663eb9c7157" { + key_name = "kubernetes.nthsqsresources.longclustername.example.com-c4:a6:ed:9a:a8:89:b9:e2:c3:9c:d6:63:eb:9c:71:57" + public_key = file("${path.module}/data/aws_key_pair_kubernetes.nthsqsresources.longclustername.example.com-c4a6ed9aa889b9e2c39cd663eb9c7157_public_key") tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_launch_template" "master-us-test-1a-masters-nthsqsresources-example-com" { +resource "aws_launch_template" "master-us-test-1a-masters-nthsqsresources-longclustername-example-com" { block_device_mappings { device_name = "/dev/xvda" ebs { @@ -404,11 +404,11 @@ resource "aws_launch_template" "master-us-test-1a-masters-nthsqsresources-exampl virtual_name = "ephemeral0" } iam_instance_profile { - name = aws_iam_instance_profile.masters-nthsqsresources-example-com.id + name = aws_iam_instance_profile.masters-nthsqsresources-longclustername-example-com.id } image_id = "ami-12345678" instance_type = "m3.medium" - key_name = aws_key_pair.kubernetes-nthsqsresources-example-com-c4a6ed9aa889b9e2c39cd663eb9c7157.id + key_name = aws_key_pair.kubernetes-nthsqsresources-longclustername-example-com-c4a6ed9aa889b9e2c39cd663eb9c7157.id lifecycle { create_before_destroy = true } @@ -421,18 +421,18 @@ resource "aws_launch_template" "master-us-test-1a-masters-nthsqsresources-exampl monitoring { enabled = false } - name = "master-us-test-1a.masters.nthsqsresources.example.com" + name = "master-us-test-1a.masters.nthsqsresources.longclustername.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true ipv6_address_count = 0 - security_groups = [aws_security_group.masters-nthsqsresources-example-com.id] + security_groups = [aws_security_group.masters-nthsqsresources-longclustername-example-com.id] } tag_specifications { resource_type = "instance" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "master-us-test-1a.masters.nthsqsresources.example.com" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "master-us-test-1a.masters.nthsqsresources.longclustername.example.com" "aws-node-termination-handler/managed" = "" "k8s.io/cluster-autoscaler/node-template/label/kops.k8s.io/kops-controller-pki" = "" "k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "master" @@ -441,14 +441,14 @@ resource "aws_launch_template" "master-us-test-1a-masters-nthsqsresources-exampl "k8s.io/cluster-autoscaler/node-template/label/node.kubernetes.io/exclude-from-external-load-balancers" = "" "k8s.io/role/master" = "1" "kops.k8s.io/instancegroup" = "master-us-test-1a" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } tag_specifications { resource_type = "volume" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "master-us-test-1a.masters.nthsqsresources.example.com" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "master-us-test-1a.masters.nthsqsresources.longclustername.example.com" "aws-node-termination-handler/managed" = "" "k8s.io/cluster-autoscaler/node-template/label/kops.k8s.io/kops-controller-pki" = "" "k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "master" @@ -457,12 +457,12 @@ resource "aws_launch_template" "master-us-test-1a-masters-nthsqsresources-exampl "k8s.io/cluster-autoscaler/node-template/label/node.kubernetes.io/exclude-from-external-load-balancers" = "" "k8s.io/role/master" = "1" "kops.k8s.io/instancegroup" = "master-us-test-1a" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "master-us-test-1a.masters.nthsqsresources.example.com" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "master-us-test-1a.masters.nthsqsresources.longclustername.example.com" "aws-node-termination-handler/managed" = "" "k8s.io/cluster-autoscaler/node-template/label/kops.k8s.io/kops-controller-pki" = "" "k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "master" @@ -471,12 +471,12 @@ resource "aws_launch_template" "master-us-test-1a-masters-nthsqsresources-exampl "k8s.io/cluster-autoscaler/node-template/label/node.kubernetes.io/exclude-from-external-load-balancers" = "" "k8s.io/role/master" = "1" "kops.k8s.io/instancegroup" = "master-us-test-1a" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } - user_data = filebase64("${path.module}/data/aws_launch_template_master-us-test-1a.masters.nthsqsresources.example.com_user_data") + user_data = filebase64("${path.module}/data/aws_launch_template_master-us-test-1a.masters.nthsqsresources.longclustername.example.com_user_data") } -resource "aws_launch_template" "nodes-nthsqsresources-example-com" { +resource "aws_launch_template" "nodes-nthsqsresources-longclustername-example-com" { block_device_mappings { device_name = "/dev/xvda" ebs { @@ -489,11 +489,11 @@ resource "aws_launch_template" "nodes-nthsqsresources-example-com" { } } iam_instance_profile { - name = aws_iam_instance_profile.nodes-nthsqsresources-example-com.id + name = aws_iam_instance_profile.nodes-nthsqsresources-longclustername-example-com.id } image_id = "ami-12345678" instance_type = "t2.medium" - key_name = aws_key_pair.kubernetes-nthsqsresources-example-com-c4a6ed9aa889b9e2c39cd663eb9c7157.id + key_name = aws_key_pair.kubernetes-nthsqsresources-longclustername-example-com-c4a6ed9aa889b9e2c39cd663eb9c7157.id lifecycle { create_before_destroy = true } @@ -506,83 +506,83 @@ resource "aws_launch_template" "nodes-nthsqsresources-example-com" { monitoring { enabled = false } - name = "nodes.nthsqsresources.example.com" + name = "nodes.nthsqsresources.longclustername.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true ipv6_address_count = 0 - security_groups = [aws_security_group.nodes-nthsqsresources-example-com.id] + security_groups = [aws_security_group.nodes-nthsqsresources-longclustername-example-com.id] } tag_specifications { resource_type = "instance" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nodes.nthsqsresources.example.com" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nodes.nthsqsresources.longclustername.example.com" "aws-node-termination-handler/managed" = "" "k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node" "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = "" "k8s.io/role/node" = "1" "kops.k8s.io/instancegroup" = "nodes" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } tag_specifications { resource_type = "volume" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nodes.nthsqsresources.example.com" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nodes.nthsqsresources.longclustername.example.com" "aws-node-termination-handler/managed" = "" "k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node" "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = "" "k8s.io/role/node" = "1" "kops.k8s.io/instancegroup" = "nodes" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nodes.nthsqsresources.example.com" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nodes.nthsqsresources.longclustername.example.com" "aws-node-termination-handler/managed" = "" "k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/role" = "node" "k8s.io/cluster-autoscaler/node-template/label/node-role.kubernetes.io/node" = "" "k8s.io/role/node" = "1" "kops.k8s.io/instancegroup" = "nodes" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } - user_data = filebase64("${path.module}/data/aws_launch_template_nodes.nthsqsresources.example.com_user_data") + user_data = filebase64("${path.module}/data/aws_launch_template_nodes.nthsqsresources.longclustername.example.com_user_data") } resource "aws_route" "route-0-0-0-0--0" { destination_cidr_block = "0.0.0.0/0" - gateway_id = aws_internet_gateway.nthsqsresources-example-com.id - route_table_id = aws_route_table.nthsqsresources-example-com.id + gateway_id = aws_internet_gateway.nthsqsresources-longclustername-example-com.id + route_table_id = aws_route_table.nthsqsresources-longclustername-example-com.id } resource "aws_route" "route-__--0" { destination_ipv6_cidr_block = "::/0" - gateway_id = aws_internet_gateway.nthsqsresources-example-com.id - route_table_id = aws_route_table.nthsqsresources-example-com.id + gateway_id = aws_internet_gateway.nthsqsresources-longclustername-example-com.id + route_table_id = aws_route_table.nthsqsresources-longclustername-example-com.id } -resource "aws_route_table" "nthsqsresources-example-com" { +resource "aws_route_table" "nthsqsresources-longclustername-example-com" { tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" - "kubernetes.io/kops/role" = "public" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" + "kubernetes.io/kops/role" = "public" } - vpc_id = aws_vpc.nthsqsresources-example-com.id + vpc_id = aws_vpc.nthsqsresources-longclustername-example-com.id } -resource "aws_route_table_association" "us-test-1a-nthsqsresources-example-com" { - route_table_id = aws_route_table.nthsqsresources-example-com.id - subnet_id = aws_subnet.us-test-1a-nthsqsresources-example-com.id +resource "aws_route_table_association" "us-test-1a-nthsqsresources-longclustername-example-com" { + route_table_id = aws_route_table.nthsqsresources-longclustername-example-com.id + subnet_id = aws_subnet.us-test-1a-nthsqsresources-longclustername-example-com.id } resource "aws_s3_bucket_object" "cluster-completed-spec" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_cluster-completed.spec_content") - key = "clusters.example.com/nthsqsresources.example.com/cluster-completed.spec" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/cluster-completed.spec" provider = aws.files server_side_encryption = "AES256" } @@ -590,7 +590,7 @@ resource "aws_s3_bucket_object" "cluster-completed-spec" { resource "aws_s3_bucket_object" "etcd-cluster-spec-events" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_etcd-cluster-spec-events_content") - key = "clusters.example.com/nthsqsresources.example.com/backups/etcd/events/control/etcd-cluster-spec" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/events/control/etcd-cluster-spec" provider = aws.files server_side_encryption = "AES256" } @@ -598,7 +598,7 @@ resource "aws_s3_bucket_object" "etcd-cluster-spec-events" { resource "aws_s3_bucket_object" "etcd-cluster-spec-main" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_etcd-cluster-spec-main_content") - key = "clusters.example.com/nthsqsresources.example.com/backups/etcd/main/control/etcd-cluster-spec" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/backups/etcd/main/control/etcd-cluster-spec" provider = aws.files server_side_encryption = "AES256" } @@ -606,7 +606,7 @@ resource "aws_s3_bucket_object" "etcd-cluster-spec-main" { resource "aws_s3_bucket_object" "kops-version-txt" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_kops-version.txt_content") - key = "clusters.example.com/nthsqsresources.example.com/kops-version.txt" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/kops-version.txt" provider = aws.files server_side_encryption = "AES256" } @@ -614,7 +614,7 @@ resource "aws_s3_bucket_object" "kops-version-txt" { resource "aws_s3_bucket_object" "manifests-etcdmanager-events" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_manifests-etcdmanager-events_content") - key = "clusters.example.com/nthsqsresources.example.com/manifests/etcd/events.yaml" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/manifests/etcd/events.yaml" provider = aws.files server_side_encryption = "AES256" } @@ -622,7 +622,7 @@ resource "aws_s3_bucket_object" "manifests-etcdmanager-events" { resource "aws_s3_bucket_object" "manifests-etcdmanager-main" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_manifests-etcdmanager-main_content") - key = "clusters.example.com/nthsqsresources.example.com/manifests/etcd/main.yaml" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/manifests/etcd/main.yaml" provider = aws.files server_side_encryption = "AES256" } @@ -630,7 +630,7 @@ resource "aws_s3_bucket_object" "manifests-etcdmanager-main" { resource "aws_s3_bucket_object" "manifests-static-kube-apiserver-healthcheck" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_manifests-static-kube-apiserver-healthcheck_content") - key = "clusters.example.com/nthsqsresources.example.com/manifests/static/kube-apiserver-healthcheck.yaml" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/manifests/static/kube-apiserver-healthcheck.yaml" provider = aws.files server_side_encryption = "AES256" } @@ -638,7 +638,7 @@ resource "aws_s3_bucket_object" "manifests-static-kube-apiserver-healthcheck" { resource "aws_s3_bucket_object" "nodeupconfig-master-us-test-1a" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_nodeupconfig-master-us-test-1a_content") - key = "clusters.example.com/nthsqsresources.example.com/igconfig/master/master-us-test-1a/nodeupconfig.yaml" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/igconfig/master/master-us-test-1a/nodeupconfig.yaml" provider = aws.files server_side_encryption = "AES256" } @@ -646,281 +646,281 @@ resource "aws_s3_bucket_object" "nodeupconfig-master-us-test-1a" { resource "aws_s3_bucket_object" "nodeupconfig-nodes" { bucket = "testingBucket" content = file("${path.module}/data/aws_s3_bucket_object_nodeupconfig-nodes_content") - key = "clusters.example.com/nthsqsresources.example.com/igconfig/node/nodes/nodeupconfig.yaml" + key = "clusters.example.com/nthsqsresources.longclustername.example.com/igconfig/node/nodes/nodeupconfig.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-bootstrap" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-bootstrap" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-bootstrap_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/bootstrap-channel.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-bootstrap_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/bootstrap-channel.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-core-addons-k8s-io" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-core-addons-k8s-io" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-core.addons.k8s.io_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/core.addons.k8s.io/v1.4.0.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-core.addons.k8s.io_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/core.addons.k8s.io/v1.4.0.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-coredns-addons-k8s-io-k8s-1-12" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-coredns-addons-k8s-io-k8s-1-12" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/coredns.addons.k8s.io/k8s-1.12.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-coredns.addons.k8s.io-k8s-1.12_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/coredns.addons.k8s.io/k8s-1.12.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-dns-controller-addons-k8s-io-k8s-1-12" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-dns-controller-addons-k8s-io-k8s-1-12" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-dns-controller.addons.k8s.io-k8s-1.12_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/dns-controller.addons.k8s.io/k8s-1.12.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-dns-controller.addons.k8s.io-k8s-1.12_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/dns-controller.addons.k8s.io/k8s-1.12.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-kops-controller-addons-k8s-io-k8s-1-16" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-kops-controller-addons-k8s-io-k8s-1-16" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/kops-controller.addons.k8s.io/k8s-1.16.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kops-controller.addons.k8s.io-k8s-1.16_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/kops-controller.addons.k8s.io/k8s-1.16.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-kubelet-api-rbac-addons-k8s-io-k8s-1-9" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-kubelet-api-rbac-addons-k8s-io-k8s-1-9" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/kubelet-api.rbac.addons.k8s.io/k8s-1.9.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-kubelet-api.rbac.addons.k8s.io-k8s-1.9_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/kubelet-api.rbac.addons.k8s.io/k8s-1.9.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-limit-range-addons-k8s-io" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-limit-range-addons-k8s-io" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-limit-range.addons.k8s.io_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/limit-range.addons.k8s.io/v1.5.0.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-limit-range.addons.k8s.io_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/limit-range.addons.k8s.io/v1.5.0.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-node-termination-handler-aws-k8s-1-11" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-node-termination-handler-aws-k8s-1-11" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-node-termination-handler.aws-k8s-1.11_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/node-termination-handler.aws/k8s-1.11.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-node-termination-handler.aws-k8s-1.11_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/node-termination-handler.aws/k8s-1.11.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_s3_bucket_object" "nthsqsresources-example-com-addons-storage-aws-addons-k8s-io-v1-15-0" { +resource "aws_s3_bucket_object" "nthsqsresources-longclustername-example-com-addons-storage-aws-addons-k8s-io-v1-15-0" { bucket = "testingBucket" - content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.example.com-addons-storage-aws.addons.k8s.io-v1.15.0_content") - key = "clusters.example.com/nthsqsresources.example.com/addons/storage-aws.addons.k8s.io/v1.15.0.yaml" + content = file("${path.module}/data/aws_s3_bucket_object_nthsqsresources.longclustername.example.com-addons-storage-aws.addons.k8s.io-v1.15.0_content") + key = "clusters.example.com/nthsqsresources.longclustername.example.com/addons/storage-aws.addons.k8s.io/v1.15.0.yaml" provider = aws.files server_side_encryption = "AES256" } -resource "aws_security_group" "masters-nthsqsresources-example-com" { +resource "aws_security_group" "masters-nthsqsresources-longclustername-example-com" { description = "Security group for masters" - name = "masters.nthsqsresources.example.com" + name = "masters.nthsqsresources.longclustername.example.com" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "masters.nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "masters.nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } - vpc_id = aws_vpc.nthsqsresources-example-com.id + vpc_id = aws_vpc.nthsqsresources-longclustername-example-com.id } -resource "aws_security_group" "nodes-nthsqsresources-example-com" { +resource "aws_security_group" "nodes-nthsqsresources-longclustername-example-com" { description = "Security group for nodes" - name = "nodes.nthsqsresources.example.com" + name = "nodes.nthsqsresources.longclustername.example.com" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nodes.nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nodes.nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } - vpc_id = aws_vpc.nthsqsresources-example-com.id + vpc_id = aws_vpc.nthsqsresources-longclustername-example-com.id } -resource "aws_security_group_rule" "from-0-0-0-0--0-ingress-tcp-22to22-masters-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-0-0-0-0--0-ingress-tcp-22to22-masters-nthsqsresources-longclustername-example-com" { cidr_blocks = ["0.0.0.0/0"] from_port = 22 protocol = "tcp" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id to_port = 22 type = "ingress" } -resource "aws_security_group_rule" "from-0-0-0-0--0-ingress-tcp-22to22-nodes-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-0-0-0-0--0-ingress-tcp-22to22-nodes-nthsqsresources-longclustername-example-com" { cidr_blocks = ["0.0.0.0/0"] from_port = 22 protocol = "tcp" - security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id + security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id to_port = 22 type = "ingress" } -resource "aws_security_group_rule" "from-0-0-0-0--0-ingress-tcp-443to443-masters-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-0-0-0-0--0-ingress-tcp-443to443-masters-nthsqsresources-longclustername-example-com" { cidr_blocks = ["0.0.0.0/0"] from_port = 443 protocol = "tcp" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id to_port = 443 type = "ingress" } -resource "aws_security_group_rule" "from-masters-nthsqsresources-example-com-egress-all-0to0-0-0-0-0--0" { +resource "aws_security_group_rule" "from-masters-nthsqsresources-longclustername-example-com-egress-all-0to0-0-0-0-0--0" { cidr_blocks = ["0.0.0.0/0"] from_port = 0 protocol = "-1" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id to_port = 0 type = "egress" } -resource "aws_security_group_rule" "from-masters-nthsqsresources-example-com-egress-all-0to0-__--0" { +resource "aws_security_group_rule" "from-masters-nthsqsresources-longclustername-example-com-egress-all-0to0-__--0" { from_port = 0 ipv6_cidr_blocks = ["::/0"] protocol = "-1" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id to_port = 0 type = "egress" } -resource "aws_security_group_rule" "from-masters-nthsqsresources-example-com-ingress-all-0to0-masters-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-masters-nthsqsresources-longclustername-example-com-ingress-all-0to0-masters-nthsqsresources-longclustername-example-com" { from_port = 0 protocol = "-1" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id - source_security_group_id = aws_security_group.masters-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id + source_security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id to_port = 0 type = "ingress" } -resource "aws_security_group_rule" "from-masters-nthsqsresources-example-com-ingress-all-0to0-nodes-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-masters-nthsqsresources-longclustername-example-com-ingress-all-0to0-nodes-nthsqsresources-longclustername-example-com" { from_port = 0 protocol = "-1" - security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id - source_security_group_id = aws_security_group.masters-nthsqsresources-example-com.id + security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id + source_security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id to_port = 0 type = "ingress" } -resource "aws_security_group_rule" "from-nodes-nthsqsresources-example-com-egress-all-0to0-0-0-0-0--0" { +resource "aws_security_group_rule" "from-nodes-nthsqsresources-longclustername-example-com-egress-all-0to0-0-0-0-0--0" { cidr_blocks = ["0.0.0.0/0"] from_port = 0 protocol = "-1" - security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id + security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id to_port = 0 type = "egress" } -resource "aws_security_group_rule" "from-nodes-nthsqsresources-example-com-egress-all-0to0-__--0" { +resource "aws_security_group_rule" "from-nodes-nthsqsresources-longclustername-example-com-egress-all-0to0-__--0" { from_port = 0 ipv6_cidr_blocks = ["::/0"] protocol = "-1" - security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id + security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id to_port = 0 type = "egress" } -resource "aws_security_group_rule" "from-nodes-nthsqsresources-example-com-ingress-all-0to0-nodes-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-nodes-nthsqsresources-longclustername-example-com-ingress-all-0to0-nodes-nthsqsresources-longclustername-example-com" { from_port = 0 protocol = "-1" - security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id - source_security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id + security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id + source_security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id to_port = 0 type = "ingress" } -resource "aws_security_group_rule" "from-nodes-nthsqsresources-example-com-ingress-tcp-1to2379-masters-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-nodes-nthsqsresources-longclustername-example-com-ingress-tcp-1to2379-masters-nthsqsresources-longclustername-example-com" { from_port = 1 protocol = "tcp" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id - source_security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id + source_security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id to_port = 2379 type = "ingress" } -resource "aws_security_group_rule" "from-nodes-nthsqsresources-example-com-ingress-tcp-2382to4000-masters-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-nodes-nthsqsresources-longclustername-example-com-ingress-tcp-2382to4000-masters-nthsqsresources-longclustername-example-com" { from_port = 2382 protocol = "tcp" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id - source_security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id + source_security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id to_port = 4000 type = "ingress" } -resource "aws_security_group_rule" "from-nodes-nthsqsresources-example-com-ingress-tcp-4003to65535-masters-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-nodes-nthsqsresources-longclustername-example-com-ingress-tcp-4003to65535-masters-nthsqsresources-longclustername-example-com" { from_port = 4003 protocol = "tcp" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id - source_security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id + source_security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id to_port = 65535 type = "ingress" } -resource "aws_security_group_rule" "from-nodes-nthsqsresources-example-com-ingress-udp-1to65535-masters-nthsqsresources-example-com" { +resource "aws_security_group_rule" "from-nodes-nthsqsresources-longclustername-example-com-ingress-udp-1to65535-masters-nthsqsresources-longclustername-example-com" { from_port = 1 protocol = "udp" - security_group_id = aws_security_group.masters-nthsqsresources-example-com.id - source_security_group_id = aws_security_group.nodes-nthsqsresources-example-com.id + security_group_id = aws_security_group.masters-nthsqsresources-longclustername-example-com.id + source_security_group_id = aws_security_group.nodes-nthsqsresources-longclustername-example-com.id to_port = 65535 type = "ingress" } -resource "aws_sqs_queue" "nthsqsresources-example-com-nth" { +resource "aws_sqs_queue" "nthsqsresources-longclustername-example-com-nth" { message_retention_seconds = 300 - name = "nthsqsresources-example-com-nth" - policy = file("${path.module}/data/aws_sqs_queue_nthsqsresources-example-com-nth_policy") + name = "nthsqsresources-longclustername-example-com-nth" + policy = file("${path.module}/data/aws_sqs_queue_nthsqsresources-longclustername-example-com-nth_policy") tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources-example-com-nth" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources-longclustername-example-com-nth" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_subnet" "us-test-1a-nthsqsresources-example-com" { +resource "aws_subnet" "us-test-1a-nthsqsresources-longclustername-example-com" { availability_zone = "us-test-1a" cidr_block = "172.20.32.0/19" tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "us-test-1a.nthsqsresources.example.com" - "SubnetType" = "Public" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" - "kubernetes.io/role/elb" = "1" - "kubernetes.io/role/internal-elb" = "1" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "us-test-1a.nthsqsresources.longclustername.example.com" + "SubnetType" = "Public" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" + "kubernetes.io/role/elb" = "1" + "kubernetes.io/role/internal-elb" = "1" } - vpc_id = aws_vpc.nthsqsresources-example-com.id + vpc_id = aws_vpc.nthsqsresources-longclustername-example-com.id } -resource "aws_vpc" "nthsqsresources-example-com" { +resource "aws_vpc" "nthsqsresources-longclustername-example-com" { assign_generated_ipv6_cidr_block = true cidr_block = "172.20.0.0/16" enable_dns_hostnames = true enable_dns_support = true tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_vpc_dhcp_options" "nthsqsresources-example-com" { +resource "aws_vpc_dhcp_options" "nthsqsresources-longclustername-example-com" { domain_name = "us-test-1.compute.internal" domain_name_servers = ["AmazonProvidedDNS"] tags = { - "KubernetesCluster" = "nthsqsresources.example.com" - "Name" = "nthsqsresources.example.com" - "kubernetes.io/cluster/nthsqsresources.example.com" = "owned" + "KubernetesCluster" = "nthsqsresources.longclustername.example.com" + "Name" = "nthsqsresources.longclustername.example.com" + "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_vpc_dhcp_options_association" "nthsqsresources-example-com" { - dhcp_options_id = aws_vpc_dhcp_options.nthsqsresources-example-com.id - vpc_id = aws_vpc.nthsqsresources-example-com.id +resource "aws_vpc_dhcp_options_association" "nthsqsresources-longclustername-example-com" { + dhcp_options_id = aws_vpc_dhcp_options.nthsqsresources-longclustername-example-com.id + vpc_id = aws_vpc.nthsqsresources-longclustername-example-com.id } terraform { From 3311e457671f5e5270b86f12204a4441fbf0d169 Mon Sep 17 00:00:00 2001 From: Peter Rifel Date: Wed, 29 Sep 2021 19:12:49 -0500 Subject: [PATCH 2/2] Truncate cluster name prefix used in event bridge rules --- cmd/kops/integration_test.go | 9 ++-- pkg/model/awsmodel/nodeterminationhandler.go | 4 +- pkg/resources/aws/eventbridge.go | 3 +- .../nth_sqs_resources/cloudformation.json | 16 +++---- ...rname.e-fkbaoh-ASGLifecycle_event_pattern} | 0 ...-fkbaoh-InstanceStateChange_event_pattern} | 0 ...aoh-RebalanceRecommendation_event_pattern} | 0 ...e.e-fkbaoh-SpotInterruption_event_pattern} | 0 .../nth_sqs_resources/kubernetes.tf | 48 +++++++++---------- upup/pkg/fi/cloudup/awsup/aws_utils.go | 7 +++ 10 files changed, 49 insertions(+), 38 deletions(-) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-ASGLifecycle_event_pattern => aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-ASGLifecycle_event_pattern} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-InstanceStateChange_event_pattern => aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-InstanceStateChange_event_pattern} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-RebalanceRecommendation_event_pattern => aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-RebalanceRecommendation_event_pattern} (100%) rename tests/integration/update_cluster/nth_sqs_resources/data/{aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-SpotInterruption_event_pattern => aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-SpotInterruption_event_pattern} (100%) diff --git a/cmd/kops/integration_test.go b/cmd/kops/integration_test.go index 88236978fd..30b7c3aa97 100644 --- a/cmd/kops/integration_test.go +++ b/cmd/kops/integration_test.go @@ -47,6 +47,7 @@ import ( "k8s.io/kops/pkg/testutils/golden" "k8s.io/kops/upup/pkg/fi" "k8s.io/kops/upup/pkg/fi/cloudup" + "k8s.io/kops/upup/pkg/fi/cloudup/awsup" "k8s.io/kops/upup/pkg/fi/cloudup/gce" "sigs.k8s.io/yaml" ) @@ -1028,10 +1029,10 @@ func (i *integrationTest) runTestTerraformAWS(t *testing.T) { if i.nth { expectedFilenames = append(expectedFilenames, []string{ "aws_s3_bucket_object_" + i.clusterName + "-addons-node-termination-handler.aws-k8s-1.11_content", - "aws_cloudwatch_event_rule_" + i.clusterName + "-ASGLifecycle_event_pattern", - "aws_cloudwatch_event_rule_" + i.clusterName + "-RebalanceRecommendation_event_pattern", - "aws_cloudwatch_event_rule_" + i.clusterName + "-SpotInterruption_event_pattern", - "aws_cloudwatch_event_rule_" + i.clusterName + "-InstanceStateChange_event_pattern", + "aws_cloudwatch_event_rule_" + awsup.GetClusterName40(i.clusterName) + "-ASGLifecycle_event_pattern", + "aws_cloudwatch_event_rule_" + awsup.GetClusterName40(i.clusterName) + "-RebalanceRecommendation_event_pattern", + "aws_cloudwatch_event_rule_" + awsup.GetClusterName40(i.clusterName) + "-SpotInterruption_event_pattern", + "aws_cloudwatch_event_rule_" + awsup.GetClusterName40(i.clusterName) + "-InstanceStateChange_event_pattern", "aws_sqs_queue_" + strings.Replace(i.clusterName, ".", "-", -1) + "-nth_policy", }...) } diff --git a/pkg/model/awsmodel/nodeterminationhandler.go b/pkg/model/awsmodel/nodeterminationhandler.go index 84a3abb296..b2c2f13267 100644 --- a/pkg/model/awsmodel/nodeterminationhandler.go +++ b/pkg/model/awsmodel/nodeterminationhandler.go @@ -22,6 +22,7 @@ import ( "k8s.io/kops/pkg/model" "k8s.io/kops/upup/pkg/fi/cloudup/awstasks" + "k8s.io/kops/upup/pkg/fi/cloudup/awsup" "github.com/aws/aws-sdk-go/aws" "k8s.io/kops/pkg/apis/kops" @@ -143,9 +144,10 @@ func (b *NodeTerminationHandlerBuilder) buildEventBridgeRules(c *fi.ModelBuilder accountID := b.AWSAccountID targetArn := "arn:aws:sqs:" + region + ":" + accountID + ":" + queueName + clusterNamePrefix := awsup.GetClusterName40(clusterName) for _, event := range events { // build rule - ruleName := aws.String(clusterName + "-" + event.name) + ruleName := aws.String(clusterNamePrefix + "-" + event.name) pattern := event.pattern ruleTask := &awstasks.EventBridgeRule{ diff --git a/pkg/resources/aws/eventbridge.go b/pkg/resources/aws/eventbridge.go index cda0a9da6e..e89909afdb 100644 --- a/pkg/resources/aws/eventbridge.go +++ b/pkg/resources/aws/eventbridge.go @@ -78,12 +78,13 @@ func ListEventBridgeRules(cloud fi.Cloud, clusterName string) ([]*resources.Reso c := cloud.(awsup.AWSCloud) klog.V(2).Infof("Listing EventBridge rules") + clusterNamePrefix := awsup.GetClusterName40(clusterName) // rule names start with the cluster name so that we can search for them request := &eventbridge.ListRulesInput{ EventBusName: nil, Limit: nil, - NamePrefix: aws.String(clusterName), + NamePrefix: aws.String(clusterNamePrefix), } response, err := c.EventBridge().ListRules(request) if err != nil { diff --git a/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json b/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json index 85036afa19..ffdb117ad3 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json +++ b/tests/integration/update_cluster/nth_sqs_resources/cloudformation.json @@ -969,10 +969,10 @@ ] } }, - "AWSEventsRulenthsqsresourceslongclusternameexamplecomASGLifecycle": { + "AWSEventsRulenthsqsresourceslongclusternameefkbaohASGLifecycle": { "Type": "AWS::Events::Rule", "Properties": { - "Name": "nthsqsresources.longclustername.example.com-ASGLifecycle", + "Name": "nthsqsresources.longclustername.e-fkbaoh-ASGLifecycle", "EventPattern": { "detail-type": [ "EC2 Instance-terminate Lifecycle Action" @@ -989,10 +989,10 @@ ] } }, - "AWSEventsRulenthsqsresourceslongclusternameexamplecomInstanceStateChange": { + "AWSEventsRulenthsqsresourceslongclusternameefkbaohInstanceStateChange": { "Type": "AWS::Events::Rule", "Properties": { - "Name": "nthsqsresources.longclustername.example.com-InstanceStateChange", + "Name": "nthsqsresources.longclustername.e-fkbaoh-InstanceStateChange", "EventPattern": { "detail-type": [ "EC2 Instance State-change Notification" @@ -1009,10 +1009,10 @@ ] } }, - "AWSEventsRulenthsqsresourceslongclusternameexamplecomRebalanceRecommendation": { + "AWSEventsRulenthsqsresourceslongclusternameefkbaohRebalanceRecommendation": { "Type": "AWS::Events::Rule", "Properties": { - "Name": "nthsqsresources.longclustername.example.com-RebalanceRecommendation", + "Name": "nthsqsresources.longclustername.e-fkbaoh-RebalanceRecommendation", "EventPattern": { "detail-type": [ "EC2 Instance Rebalance Recommendation" @@ -1029,10 +1029,10 @@ ] } }, - "AWSEventsRulenthsqsresourceslongclusternameexamplecomSpotInterruption": { + "AWSEventsRulenthsqsresourceslongclusternameefkbaohSpotInterruption": { "Type": "AWS::Events::Rule", "Properties": { - "Name": "nthsqsresources.longclustername.example.com-SpotInterruption", + "Name": "nthsqsresources.longclustername.e-fkbaoh-SpotInterruption", "EventPattern": { "detail-type": [ "EC2 Spot Instance Interruption Warning" diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-ASGLifecycle_event_pattern b/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-ASGLifecycle_event_pattern similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-ASGLifecycle_event_pattern rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-ASGLifecycle_event_pattern diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-InstanceStateChange_event_pattern b/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-InstanceStateChange_event_pattern similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-InstanceStateChange_event_pattern rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-InstanceStateChange_event_pattern diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-RebalanceRecommendation_event_pattern b/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-RebalanceRecommendation_event_pattern similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-RebalanceRecommendation_event_pattern rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-RebalanceRecommendation_event_pattern diff --git a/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-SpotInterruption_event_pattern b/tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-SpotInterruption_event_pattern similarity index 100% rename from tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-SpotInterruption_event_pattern rename to tests/integration/update_cluster/nth_sqs_resources/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-SpotInterruption_event_pattern diff --git a/tests/integration/update_cluster/nth_sqs_resources/kubernetes.tf b/tests/integration/update_cluster/nth_sqs_resources/kubernetes.tf index e97a61fe27..4aeb855784 100644 --- a/tests/integration/update_cluster/nth_sqs_resources/kubernetes.tf +++ b/tests/integration/update_cluster/nth_sqs_resources/kubernetes.tf @@ -224,64 +224,64 @@ resource "aws_autoscaling_lifecycle_hook" "nodes-NTHLifecycleHook" { name = "nodes-NTHLifecycleHook" } -resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-example-com-ASGLifecycle" { - event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-ASGLifecycle_event_pattern") - name = "nthsqsresources.longclustername.example.com-ASGLifecycle" +resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-e-fkbaoh-ASGLifecycle" { + event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-ASGLifecycle_event_pattern") + name = "nthsqsresources.longclustername.e-fkbaoh-ASGLifecycle" tags = { "KubernetesCluster" = "nthsqsresources.longclustername.example.com" - "Name" = "nthsqsresources.longclustername.example.com-ASGLifecycle" + "Name" = "nthsqsresources.longclustername.e-fkbaoh-ASGLifecycle" "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-example-com-InstanceStateChange" { - event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-InstanceStateChange_event_pattern") - name = "nthsqsresources.longclustername.example.com-InstanceStateChange" +resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-e-fkbaoh-InstanceStateChange" { + event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-InstanceStateChange_event_pattern") + name = "nthsqsresources.longclustername.e-fkbaoh-InstanceStateChange" tags = { "KubernetesCluster" = "nthsqsresources.longclustername.example.com" - "Name" = "nthsqsresources.longclustername.example.com-InstanceStateChange" + "Name" = "nthsqsresources.longclustername.e-fkbaoh-InstanceStateChange" "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-example-com-RebalanceRecommendation" { - event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-RebalanceRecommendation_event_pattern") - name = "nthsqsresources.longclustername.example.com-RebalanceRecommendation" +resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-e-fkbaoh-RebalanceRecommendation" { + event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-RebalanceRecommendation_event_pattern") + name = "nthsqsresources.longclustername.e-fkbaoh-RebalanceRecommendation" tags = { "KubernetesCluster" = "nthsqsresources.longclustername.example.com" - "Name" = "nthsqsresources.longclustername.example.com-RebalanceRecommendation" + "Name" = "nthsqsresources.longclustername.e-fkbaoh-RebalanceRecommendation" "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-example-com-SpotInterruption" { - event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.example.com-SpotInterruption_event_pattern") - name = "nthsqsresources.longclustername.example.com-SpotInterruption" +resource "aws_cloudwatch_event_rule" "nthsqsresources-longclustername-e-fkbaoh-SpotInterruption" { + event_pattern = file("${path.module}/data/aws_cloudwatch_event_rule_nthsqsresources.longclustername.e-fkbaoh-SpotInterruption_event_pattern") + name = "nthsqsresources.longclustername.e-fkbaoh-SpotInterruption" tags = { "KubernetesCluster" = "nthsqsresources.longclustername.example.com" - "Name" = "nthsqsresources.longclustername.example.com-SpotInterruption" + "Name" = "nthsqsresources.longclustername.e-fkbaoh-SpotInterruption" "kubernetes.io/cluster/nthsqsresources.longclustername.example.com" = "owned" } } -resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-example-com-ASGLifecycle-Target" { +resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-e-fkbaoh-ASGLifecycle-Target" { arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" - rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-example-com-ASGLifecycle.id + rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-e-fkbaoh-ASGLifecycle.id } -resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-example-com-InstanceStateChange-Target" { +resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-e-fkbaoh-InstanceStateChange-Target" { arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" - rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-example-com-InstanceStateChange.id + rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-e-fkbaoh-InstanceStateChange.id } -resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-example-com-RebalanceRecommendation-Target" { +resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-e-fkbaoh-RebalanceRecommendation-Target" { arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" - rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-example-com-RebalanceRecommendation.id + rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-e-fkbaoh-RebalanceRecommendation.id } -resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-example-com-SpotInterruption-Target" { +resource "aws_cloudwatch_event_target" "nthsqsresources-longclustername-e-fkbaoh-SpotInterruption-Target" { arn = "arn:aws:sqs:us-test-1:123456789012:nthsqsresources-longclustername-example-com-nth" - rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-example-com-SpotInterruption.id + rule = aws_cloudwatch_event_rule.nthsqsresources-longclustername-e-fkbaoh-SpotInterruption.id } resource "aws_ebs_volume" "us-test-1a-etcd-events-nthsqsresources-longclustername-example-com" { diff --git a/upup/pkg/fi/cloudup/awsup/aws_utils.go b/upup/pkg/fi/cloudup/awsup/aws_utils.go index 22f8da039d..32c97a0e9a 100644 --- a/upup/pkg/fi/cloudup/awsup/aws_utils.go +++ b/upup/pkg/fi/cloudup/awsup/aws_utils.go @@ -221,6 +221,13 @@ func ELBv2Tags(tags map[string]string) []*elbv2.Tag { return elbv2Tags } +// GetClusterName40 will attempt to calculate a meaningful cluster name with a max length of 40 +func GetClusterName40(cluster string) string { + return TruncateString(cluster, TruncateStringOptions{ + MaxLength: 40, + }) +} + // GetResourceName32 will attempt to calculate a meaningful name for a resource given a prefix // Will never return a string longer than 32 chars func GetResourceName32(cluster string, prefix string) string {