Skip to content

Commit

Permalink
update-expected.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers committed Jul 19, 2020
1 parent f8262aa commit 764851e
Show file tree
Hide file tree
Showing 39 changed files with 2,294 additions and 380 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ resource "aws_autoscaling_group" "bastion-bastionuserdata-example-com" {
propagate_at_launch = true
value = "bastion"
}
tag {
key = "kops.k8s.io/label/kubernetes.io/role"
propagate_at_launch = true
value = "node"
}
tag {
key = "kops.k8s.io/label/node-role.kubernetes.io/node"
propagate_at_launch = true
value = ""
}
tag {
key = "kubernetes.io/cluster/bastionuserdata.example.com"
propagate_at_launch = true
Expand Down Expand Up @@ -188,6 +198,16 @@ resource "aws_autoscaling_group" "master-us-test-1a-masters-bastionuserdata-exam
propagate_at_launch = true
value = "master-us-test-1a"
}
tag {
key = "kops.k8s.io/label/kubernetes.io/role"
propagate_at_launch = true
value = "master"
}
tag {
key = "kops.k8s.io/label/node-role.kubernetes.io/master"
propagate_at_launch = true
value = ""
}
tag {
key = "kubernetes.io/cluster/bastionuserdata.example.com"
propagate_at_launch = true
Expand Down Expand Up @@ -226,6 +246,16 @@ resource "aws_autoscaling_group" "nodes-bastionuserdata-example-com" {
propagate_at_launch = true
value = "nodes"
}
tag {
key = "kops.k8s.io/label/kubernetes.io/role"
propagate_at_launch = true
value = "node"
}
tag {
key = "kops.k8s.io/label/node-role.kubernetes.io/node"
propagate_at_launch = true
value = ""
}
tag {
key = "kubernetes.io/cluster/bastionuserdata.example.com"
propagate_at_launch = true
Expand Down Expand Up @@ -417,6 +447,8 @@ resource "aws_launch_template" "bastion-bastionuserdata-example-com" {
"Name" = "bastion.bastionuserdata.example.com"
"k8s.io/role/bastion" = "1"
"kops.k8s.io/instancegroup" = "bastion"
"kops.k8s.io/label/kubernetes.io/role" = "node"
"kops.k8s.io/label/node-role.kubernetes.io/node" = ""
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
}
}
Expand All @@ -427,6 +459,8 @@ resource "aws_launch_template" "bastion-bastionuserdata-example-com" {
"Name" = "bastion.bastionuserdata.example.com"
"k8s.io/role/bastion" = "1"
"kops.k8s.io/instancegroup" = "bastion"
"kops.k8s.io/label/kubernetes.io/role" = "node"
"kops.k8s.io/label/node-role.kubernetes.io/node" = ""
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
}
}
Expand Down Expand Up @@ -468,6 +502,8 @@ resource "aws_launch_template" "master-us-test-1a-masters-bastionuserdata-exampl
"Name" = "master-us-test-1a.masters.bastionuserdata.example.com"
"k8s.io/role/master" = "1"
"kops.k8s.io/instancegroup" = "master-us-test-1a"
"kops.k8s.io/label/kubernetes.io/role" = "master"
"kops.k8s.io/label/node-role.kubernetes.io/master" = ""
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
}
}
Expand All @@ -478,6 +514,8 @@ resource "aws_launch_template" "master-us-test-1a-masters-bastionuserdata-exampl
"Name" = "master-us-test-1a.masters.bastionuserdata.example.com"
"k8s.io/role/master" = "1"
"kops.k8s.io/instancegroup" = "master-us-test-1a"
"kops.k8s.io/label/kubernetes.io/role" = "master"
"kops.k8s.io/label/node-role.kubernetes.io/master" = ""
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
}
}
Expand Down Expand Up @@ -515,6 +553,8 @@ resource "aws_launch_template" "nodes-bastionuserdata-example-com" {
"Name" = "nodes.bastionuserdata.example.com"
"k8s.io/role/node" = "1"
"kops.k8s.io/instancegroup" = "nodes"
"kops.k8s.io/label/kubernetes.io/role" = "node"
"kops.k8s.io/label/node-role.kubernetes.io/node" = ""
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
}
}
Expand All @@ -525,6 +565,8 @@ resource "aws_launch_template" "nodes-bastionuserdata-example-com" {
"Name" = "nodes.bastionuserdata.example.com"
"k8s.io/role/node" = "1"
"kops.k8s.io/instancegroup" = "nodes"
"kops.k8s.io/label/kubernetes.io/role" = "node"
"kops.k8s.io/label/node-role.kubernetes.io/node" = ""
"kubernetes.io/cluster/bastionuserdata.example.com" = "owned"
}
}
Expand Down
52 changes: 52 additions & 0 deletions tests/integration/update_cluster/complex/cloudformation.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@
"Value": "master-us-test-1a",
"PropagateAtLaunch": true
},
{
"Key": "kops.k8s.io/label/kubernetes.io/role",
"Value": "master",
"PropagateAtLaunch": true
},
{
"Key": "kops.k8s.io/label/node-role.kubernetes.io/master",
"Value": "",
"PropagateAtLaunch": true
},
{
"Key": "kubernetes.io/cluster/complex.example.com",
"Value": "owned",
Expand Down Expand Up @@ -134,6 +144,16 @@
"Value": "nodes",
"PropagateAtLaunch": true
},
{
"Key": "kops.k8s.io/label/kubernetes.io/role",
"Value": "node",
"PropagateAtLaunch": true
},
{
"Key": "kops.k8s.io/label/node-role.kubernetes.io/node",
"Value": "",
"PropagateAtLaunch": true
},
{
"Key": "kubernetes.io/cluster/complex.example.com",
"Value": "owned",
Expand Down Expand Up @@ -281,6 +301,14 @@
"Key": "kops.k8s.io/instancegroup",
"Value": "master-us-test-1a"
},
{
"Key": "kops.k8s.io/label/kubernetes.io/role",
"Value": "master"
},
{
"Key": "kops.k8s.io/label/node-role.kubernetes.io/master",
"Value": ""
},
{
"Key": "kubernetes.io/cluster/complex.example.com",
"Value": "owned"
Expand Down Expand Up @@ -314,6 +342,14 @@
"Key": "kops.k8s.io/instancegroup",
"Value": "master-us-test-1a"
},
{
"Key": "kops.k8s.io/label/kubernetes.io/role",
"Value": "master"
},
{
"Key": "kops.k8s.io/label/node-role.kubernetes.io/master",
"Value": ""
},
{
"Key": "kubernetes.io/cluster/complex.example.com",
"Value": "owned"
Expand Down Expand Up @@ -397,6 +433,14 @@
"Key": "kops.k8s.io/instancegroup",
"Value": "nodes"
},
{
"Key": "kops.k8s.io/label/kubernetes.io/role",
"Value": "node"
},
{
"Key": "kops.k8s.io/label/node-role.kubernetes.io/node",
"Value": ""
},
{
"Key": "kubernetes.io/cluster/complex.example.com",
"Value": "owned"
Expand Down Expand Up @@ -430,6 +474,14 @@
"Key": "kops.k8s.io/instancegroup",
"Value": "nodes"
},
{
"Key": "kops.k8s.io/label/kubernetes.io/role",
"Value": "node"
},
{
"Key": "kops.k8s.io/label/node-role.kubernetes.io/node",
"Value": ""
},
{
"Key": "kubernetes.io/cluster/complex.example.com",
"Value": "owned"
Expand Down
84 changes: 56 additions & 28 deletions tests/integration/update_cluster/complex/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ resource "aws_autoscaling_group" "master-us-test-1a-masters-complex-example-com"
propagate_at_launch = true
value = "master-us-test-1a"
}
tag {
key = "kops.k8s.io/label/kubernetes.io/role"
propagate_at_launch = true
value = "master"
}
tag {
key = "kops.k8s.io/label/node-role.kubernetes.io/master"
propagate_at_launch = true
value = ""
}
tag {
key = "kubernetes.io/cluster/complex.example.com"
propagate_at_launch = true
Expand Down Expand Up @@ -174,6 +184,16 @@ resource "aws_autoscaling_group" "nodes-complex-example-com" {
propagate_at_launch = true
value = "nodes"
}
tag {
key = "kops.k8s.io/label/kubernetes.io/role"
propagate_at_launch = true
value = "node"
}
tag {
key = "kops.k8s.io/label/node-role.kubernetes.io/node"
propagate_at_launch = true
value = ""
}
tag {
key = "kubernetes.io/cluster/complex.example.com"
propagate_at_launch = true
Expand Down Expand Up @@ -316,25 +336,29 @@ resource "aws_launch_template" "master-us-test-1a-masters-complex-example-com" {
tag_specifications {
resource_type = "instance"
tags = {
"KubernetesCluster" = "complex.example.com"
"Name" = "master-us-test-1a.masters.complex.example.com"
"Owner" = "John Doe"
"foo/bar" = "fib+baz"
"k8s.io/role/master" = "1"
"kops.k8s.io/instancegroup" = "master-us-test-1a"
"kubernetes.io/cluster/complex.example.com" = "owned"
"KubernetesCluster" = "complex.example.com"
"Name" = "master-us-test-1a.masters.complex.example.com"
"Owner" = "John Doe"
"foo/bar" = "fib+baz"
"k8s.io/role/master" = "1"
"kops.k8s.io/instancegroup" = "master-us-test-1a"
"kops.k8s.io/label/kubernetes.io/role" = "master"
"kops.k8s.io/label/node-role.kubernetes.io/master" = ""
"kubernetes.io/cluster/complex.example.com" = "owned"
}
}
tag_specifications {
resource_type = "volume"
tags = {
"KubernetesCluster" = "complex.example.com"
"Name" = "master-us-test-1a.masters.complex.example.com"
"Owner" = "John Doe"
"foo/bar" = "fib+baz"
"k8s.io/role/master" = "1"
"kops.k8s.io/instancegroup" = "master-us-test-1a"
"kubernetes.io/cluster/complex.example.com" = "owned"
"KubernetesCluster" = "complex.example.com"
"Name" = "master-us-test-1a.masters.complex.example.com"
"Owner" = "John Doe"
"foo/bar" = "fib+baz"
"k8s.io/role/master" = "1"
"kops.k8s.io/instancegroup" = "master-us-test-1a"
"kops.k8s.io/label/kubernetes.io/role" = "master"
"kops.k8s.io/label/node-role.kubernetes.io/master" = ""
"kubernetes.io/cluster/complex.example.com" = "owned"
}
}
user_data = filebase64("${path.module}/data/aws_launch_template_master-us-test-1a.masters.complex.example.com_user_data")
Expand Down Expand Up @@ -374,25 +398,29 @@ resource "aws_launch_template" "nodes-complex-example-com" {
tag_specifications {
resource_type = "instance"
tags = {
"KubernetesCluster" = "complex.example.com"
"Name" = "nodes.complex.example.com"
"Owner" = "John Doe"
"foo/bar" = "fib+baz"
"k8s.io/role/node" = "1"
"kops.k8s.io/instancegroup" = "nodes"
"kubernetes.io/cluster/complex.example.com" = "owned"
"KubernetesCluster" = "complex.example.com"
"Name" = "nodes.complex.example.com"
"Owner" = "John Doe"
"foo/bar" = "fib+baz"
"k8s.io/role/node" = "1"
"kops.k8s.io/instancegroup" = "nodes"
"kops.k8s.io/label/kubernetes.io/role" = "node"
"kops.k8s.io/label/node-role.kubernetes.io/node" = ""
"kubernetes.io/cluster/complex.example.com" = "owned"
}
}
tag_specifications {
resource_type = "volume"
tags = {
"KubernetesCluster" = "complex.example.com"
"Name" = "nodes.complex.example.com"
"Owner" = "John Doe"
"foo/bar" = "fib+baz"
"k8s.io/role/node" = "1"
"kops.k8s.io/instancegroup" = "nodes"
"kubernetes.io/cluster/complex.example.com" = "owned"
"KubernetesCluster" = "complex.example.com"
"Name" = "nodes.complex.example.com"
"Owner" = "John Doe"
"foo/bar" = "fib+baz"
"k8s.io/role/node" = "1"
"kops.k8s.io/instancegroup" = "nodes"
"kops.k8s.io/label/kubernetes.io/role" = "node"
"kops.k8s.io/label/node-role.kubernetes.io/node" = ""
"kubernetes.io/cluster/complex.example.com" = "owned"
}
}
user_data = filebase64("${path.module}/data/aws_launch_template_nodes.complex.example.com_user_data")
Expand Down
Loading

0 comments on commit 764851e

Please sign in to comment.