-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding additional tags and shared to various AWS components #4489
Conversation
I have some bugs with private topology and this PR, need to figure out why the second route table is misbehaving. |
3d3745d
to
7e2c72e
Compare
@mikesplain @blakebarnett can you double check that the tag renames are correct? I think some of our tags have been named incorrectly. The weave test is passing, for instance, please let me know if we need tweaks to that. /assign @mikesplain @mikesplain I have a few more darn tests to update, but otherwise, the PR is good to review as of now. |
KubernetesCluster = "privatecalico.example.com" | ||
Name = "private-us-test-1a.privatecalico.example.com" | ||
KubernetesCluster = "privatecalico.example.com" | ||
Name = "privatecalico.example.com" |
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.
@blakebarnett / @mikesplain notice the change in the Name
tag. Just want to verify that the change is correct. Do we need the private-us-test-1a.privatecalico.example.com?
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.
@chrislovecnm I think private-us-test-1a.privatecalico.example.com
is actually the correct name, that's how our calico route tables are currently named across the board.
If that's correct, then the tests below are actually incorrect but that all depends on how detailed you want to be in these tests. It looks like the rest of the tests below do not specify the full subnet name, as the name tag, so maybe this is fine for testing with your change?
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.
I am wondering if the names are actually wrong ;(
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.
Let me be more clear. I am wondering if I came across a bug, as I am uncertain why the name is different from every other component.
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.
I believe they are incorrect / bug as well. Any thoughts @robinpercy @blakebarnett?
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.
@mikesplain we may have to maintain two tags not certain. We have to have the correct tag format:
"kubernetes.io/cluster/$CLUSTERNAME" = "owned"
or
"kubernetes.io/cluster/$CLUSTERNAME" = "shared"
These tags allow for not deleting shared resources, which is currently happening in our code :(
So maybe I leave the Name tag alone and just add the new tag kubernetes.io/cluster/
correctly. I think only the private route table is the only one where the Name
tag is different.
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.
They certainly seem to be wrong in the tests, but yeah, it's just the name, not crucial. Consistency is good though.
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.
Besides the test discussion, I believe the rest of the code looks good.
5517ed3
to
18dbc3c
Compare
This PR adds the base tags to DHCP Options, IGW, and Route Tables. These components are not tagged correctly, and this can cause issues with deletion. Name tags are not added to shared resources, as we allow shared resources to have maintained names. A owned/shared tags with the syntax "kubernetes.io/cluster/$CLUSTERNAME" = "owned" is added to the resources as well. We are maintaining the Name tag value for private route tables, as these resources do not use the standard value.
18dbc3c
to
6e32329
Compare
Very nice, good fix. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrislovecnm, mikesplain The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
One nit I ran into - and I'm not 100% sure it's all due to this change, but saw the NAT gateway reference: Cloudformation doesn't actually support tags on all these resources:
So when using [ All other parts for my build deployed fine |
This PR adds the base tags to DHCP Options, IGW, and Route Tables.
These components are not tagged correctly, and this can cause issues
with deletion. Name tags are not added to shared resources, as we allow
shared resources to have maintained names. An owned/shared tags with the
syntax "kubernetes.io/cluster/$CLUSTERNAME" = "owned" is added to the
resources as well. We are maintaining the Name tag value for private
route tables, as these resources do not use the standard value.
We may want to add these tags to NAT GW and Elastic IPs as well....