Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

do-not-return-deleted-nat-gateways #2892

Merged
merged 3 commits into from
Dec 8, 2020
Merged

Conversation

calvix
Copy link
Contributor

@calvix calvix commented Dec 8, 2020

towards https://github.com/giantswarm/giantswarm/issues/14731

Checklist

  • Update changelog in CHANGELOG.md.

@calvix calvix self-assigned this Dec 8, 2020
@calvix calvix requested a review from a team December 8, 2020 13:02
@calvix
Copy link
Contributor Author

calvix commented Dec 8, 2020

tested by creating a cluster, deleting it, and recreating again, everything worked and the deleted NAT gateways wer ignored

@xh3b4sd
Copy link
Contributor

xh3b4sd commented Dec 8, 2020

Can you elaborate on how you create, delete, create the cluster? I would not know how to even do that. 😅

@xh3b4sd
Copy link
Contributor

xh3b4sd commented Dec 8, 2020

Also, AFAIK it is more dangerous to create clusters with the same ID twice due to the KMS encryption keys. That could have unintended side effects and we never really did or recommend that.

@calvix
Copy link
Contributor Author

calvix commented Dec 8, 2020

I simply created cluster via gsctl create cluster, then waited until cluster was up and ready.

Then dumped all the CRS into YAML file (AWSCOntrolPlane, G8sControlPlane,AWSCluster,Cluster,AWSMachineDeployment,Machinedeployment) and removed the weird values like uuid self-link creationTimestamp and so on, and only kept the pure CR data. Also removed status field.

Then deleted cluster via gsctl delete cluster and waited until the cluster is gone. Checked the AWS console and saw 3 NAT gateways in deleted state.

I recreated the cluster with the YAML files I dumped before, which created a cluster with the same IDs.

After that checked logs of aws-operator to see that it only found 3 NAT Gateways and that it ignored the deleted ones. Also checked cluster and CloudFormation stacks.

All was green

@calvix
Copy link
Contributor Author

calvix commented Dec 8, 2020

Also, AFAIK it is more dangerous to create clusters with the same ID twice due to the KMS encryption keys. That could have unintended side effects and we never really did or recommend that.

We do not recommend it but we know customer do it to keep some specific cluster-ID formula, the KMS seems not to be that much problem so far, only the NAT gateways fucked up the CF.

@calvix calvix merged commit f52019e into master Dec 8, 2020
@calvix calvix deleted the do-not-return-deleted-nat-gateways branch December 8, 2020 15:55
paurosello added a commit that referenced this pull request Feb 2, 2021
* Bump version to 9.3.2-dev (#2858)

Co-authored-by: GitHub Action <[email protected]>

* Bump golang from 1.15.4 to 1.15.5 (#2859)

* Bump golang from 1.15.4 to 1.15.5

Bumps golang from 1.15.4 to 1.15.5.

Signed-off-by: dependabot[bot] <[email protected]>

* Fix go modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* Bump github.com/google/go-cmp from 0.5.2 to 0.5.3 (#2861)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* Bump github.com/giantswarm/apiextensions/v3 from 3.7.0 to 3.8.0 (#2860)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* Bump github.com/aws/aws-sdk-go from 1.35.23 to 1.35.28 (#2862)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* Align files (#2863)

Co-authored-by: github-actions <[email protected]>

* use alike instances injected from the installations repo (#2864)

* Bump github.com/aws/aws-sdk-go from 1.35.28 to 1.35.33 (#2866)

* Bump github.com/aws/aws-sdk-go from 1.35.28 to 1.35.33

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.28 to 1.35.33.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-go@v1.35.28...v1.35.33)

Signed-off-by: dependabot[bot] <[email protected]>

* Fix go modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* Bump sigs.k8s.io/controller-runtime from 0.6.3 to 0.6.4 (#2867)

* Bump sigs.k8s.io/controller-runtime from 0.6.3 to 0.6.4

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.6.3 to 0.6.4.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Commits](kubernetes-sigs/controller-runtime@v0.6.3...v0.6.4)

Signed-off-by: dependabot[bot] <[email protected]>

* Fix go modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* vaclav-bump-k8scc-to-9-1-2 (#2868)

* fix-naming-for-node-termination (#2869)

* vaclav-bump-k8scc-9-1-3 (#2871)

* Release v9.3.2 (#2872)

Co-authored-by: github-actions <[email protected]>

* Bump version to 9.3.3-dev (#2873)

Co-authored-by: GitHub Action <[email protected]>

* Bump github.com/google/go-cmp from 0.5.3 to 0.5.4 (#2876)

Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.3 to 0.5.4.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](google/go-cmp@v0.5.3...v0.5.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/aws/aws-sdk-go from 1.35.33 to 1.35.35 (#2877)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.33 to 1.35.35.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-go@v1.35.33...v1.35.35)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update k8scloudconfig (#2878)

* Update k8scloudconfig

* Fix import

* Release v9.3.3 (#2879)

* Release v9.3.3

* add changelog

Co-authored-by: github-actions <[email protected]>
Co-authored-by: calvix <[email protected]>

* Bump version to 9.3.4-dev (#2880)

Co-authored-by: GitHub Action <[email protected]>

* Bump github.com/giantswarm/apiextensions/v3 from 3.8.0 to 3.9.0 (#2875)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* Using new micrologger 0.4.0 (#2882)

* update go.mod

* update debug functions & sorting go import

* sort go imports

* Bump golang from 1.15.5 to 1.15.6 (#2883)

Bumps golang from 1.15.5 to 1.15.6.

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/giantswarm/microerror from 0.2.1 to 0.3.0 (#2887)

* Bump github.com/giantswarm/microerror from 0.2.1 to 0.3.0

Bumps [github.com/giantswarm/microerror](https://github.com/giantswarm/microerror) from 0.2.1 to 0.3.0.
- [Release notes](https://github.com/giantswarm/microerror/releases)
- [Changelog](https://github.com/giantswarm/microerror/blob/master/CHANGELOG.md)
- [Commits](giantswarm/microerror@v0.2.1...v0.3.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Fix go modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* Bump github.com/aws/amazon-vpc-cni-k8s from 1.7.5 to 1.7.6 (#2886)

* Bump github.com/aws/amazon-vpc-cni-k8s from 1.7.5 to 1.7.6

Bumps [github.com/aws/amazon-vpc-cni-k8s](https://github.com/aws/amazon-vpc-cni-k8s) from 1.7.5 to 1.7.6.
- [Release notes](https://github.com/aws/amazon-vpc-cni-k8s/releases)
- [Changelog](https://github.com/aws/amazon-vpc-cni-k8s/blob/master/CHANGELOG.md)
- [Commits](aws/amazon-vpc-cni-k8s@v1.7.5...v1.7.6)

Signed-off-by: dependabot[bot] <[email protected]>

* Fix go modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>

* Bump github.com/giantswarm/apiextensions/v3 from 3.11.0 to 3.12.0 (#2884)

Bumps [github.com/giantswarm/apiextensions/v3](https://github.com/giantswarm/apiextensions) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/giantswarm/apiextensions/releases)
- [Changelog](https://github.com/giantswarm/apiextensions/blob/master/CHANGELOG.md)
- [Commits](giantswarm/apiextensions@v3.11.0...v3.12.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/aws/aws-sdk-go from 1.35.35 to 1.36.2 (#2885)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nick Jüttner <[email protected]>

* bump-k8scc-to-9-3-0 (#2889)

* enable vpa for aws-operator (#2881)

* enable vpa for aws-operator

* enable vpa for aws-operator

* enable vpa for aws-operator

* Release v9.3.4 (#2890)

Co-authored-by: github-actions <[email protected]>

* Bump version to 9.3.5-dev (#2891)

Co-authored-by: GitHub Action <[email protected]>

* drop go mod tidy workflow (#2888)

* Align files (#2894)

Co-authored-by: github-actions <[email protected]>

* do-not-return-deleted-nat-gateways (#2892)

* Release v9.3.5 (#2895)

Co-authored-by: github-actions <[email protected]>

* Added CNI CIDR to internal ELB

* fix tests

* Check if the cluster is using the default CIDR

* change version

* regenerate tests

* improve description

* fix tests

* change version

* update version to final

* Release v9.3.6

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: ArchitectBot <[email protected]>
Co-authored-by: Tim Schindler <[email protected]>
Co-authored-by: calvix <[email protected]>
Co-authored-by: Bricktop <[email protected]>
Co-authored-by: Jihyuk Bok <[email protected]>
Co-authored-by: Nick Jüttner <[email protected]>
Co-authored-by: Pau Rosello <[email protected]>
Co-authored-by: paurosello <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants