This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 294
0.11.x migration from existing clusters without losing state #1380
Merged
mumoshu
merged 8 commits into
kubernetes-retired:master
from
HotelsDotCom:0.11.x/remove-etcd-dependency-on-nodepools-when-selfhosted-networking-enabled
Jul 7, 2018
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
58fa7a5
Remove the etcd-environment metadata section on the nodepools if Kube…
davidmccormick e16f916
disable fail fast
davidmccormick 215d240
Remove the etcd-environment metadata section on the nodepools if Kube…
davidmccormick 0687f89
Modified etcdadm with special export and import commands that will co…
davidmccormick 42f6029
creating systemd migration units
davidmccormick d8bc8ac
save existing state into etcd's stack config and pass to cloud-config…
davidmccormick 3eb0797
Merge branch 'master' of https://github.com/kubernetes-incubator/kube…
davidmccormick 8ae9190
Resolve tests, 1) package cycle with control plane tests depending on…
davidmccormick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package cfnstack | ||
|
||
import ( | ||
"github.com/aws/aws-sdk-go/service/ec2" | ||
) | ||
|
||
type EC2Interrogator interface { | ||
DescribeInstances(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,6 +158,57 @@ | |
} | ||
} | ||
}, | ||
"SecurityGroupWorker": { | ||
"Properties": { | ||
"GroupDescription": { | ||
"Ref": "AWS::StackName" | ||
}, | ||
"SecurityGroupEgress": [ | ||
{ | ||
"CidrIp": "0.0.0.0/0", | ||
"FromPort": -1, | ||
"IpProtocol": "icmp", | ||
"ToPort": -1 | ||
}, | ||
{ | ||
"CidrIp": "0.0.0.0/0", | ||
"FromPort": 0, | ||
"IpProtocol": "tcp", | ||
"ToPort": 65535 | ||
}, | ||
{ | ||
"CidrIp": "0.0.0.0/0", | ||
"FromPort": 0, | ||
"IpProtocol": "udp", | ||
"ToPort": 65535 | ||
} | ||
], | ||
"SecurityGroupIngress": [ | ||
{{ range $_, $r := $.SSHAccessAllowedSourceCIDRs -}} | ||
{ | ||
"CidrIp": "{{$r}}", | ||
"FromPort": 22, | ||
"IpProtocol": "tcp", | ||
"ToPort": 22 | ||
}, | ||
{{end -}} | ||
{ | ||
"CidrIp": "0.0.0.0/0", | ||
"FromPort": -1, | ||
"IpProtocol": "icmp", | ||
"ToPort": -1 | ||
} | ||
], | ||
"Tags": [ | ||
{ | ||
"Key": "Name", | ||
"Value": "{{$.ClusterName}}-sg-worker" | ||
} | ||
], | ||
"VpcId": {{.VPCRef}} | ||
}, | ||
"Type": "AWS::EC2::SecurityGroup" | ||
}, | ||
{{ if not .Controller.IAMConfig.InstanceProfile.Arn }} | ||
"IAMInstanceProfileController": { | ||
"Properties": { | ||
|
@@ -617,7 +668,6 @@ | |
{{quote $n}}: {{toJSON $r}} | ||
{{end}} | ||
}, | ||
|
||
"Outputs": { | ||
{{ if not .Controller.IAMConfig.InstanceProfile.Arn }} | ||
"ControllerIAMRoleArn": { | ||
|
@@ -626,6 +676,11 @@ | |
"Export": { "Name": { "Fn::Sub": "${AWS::StackName}-ControllerIAMRoleArn" } } | ||
}, | ||
{{end}} | ||
"WorkerSecurityGroup" : { | ||
"Description" : "The security group assigned to worker nodes", | ||
"Value" : { "Ref" : "SecurityGroupWorker" }, | ||
"Export" : { "Name" : {"Fn::Sub": "${AWS::StackName}-WorkerSecurityGroup" }} | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This corresponds to https://github.com/kubernetes-incubator/kube-aws/pull/1380/files#r199216521 |
||
"StackName": { | ||
"Description": "The name of this stack which is used by node pool stacks to import outputs from this stack", | ||
"Value": { "Ref": "AWS::StackName" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This security group needed returning to the control plane. We can remove it again in later releases but without it in the updated control plane stack will throw an error about it being in use by the nodepools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Fine with reviving this then.
// Wish we had something like reference counting to keep AWS resources only while they're used 😆