Set custom cluster tag on egress stacks [2/2] #4939
Merged
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.
Step 2 of #4910 (Described in detail below)
Currently the controller will set a tag with the format:
kubernetes.io/cluster/<id>=owned
on the stack and this will be propagated down to the subnets. The tag has two purposes:The downside of the tag is that having such a tag on the subnets means that Kubernetes (Service Type Load Balancer logic) will consider the NAT subnets when finding subnets for ELBs. We never want to use the NAT subnets for this purpose so it's desirable to avoid tagging the subnets at all to prevent this from happening no matter how all the other subnets in the account are tagged.
The idea to avoid this issue is to change the tag used to identify the cluster id. Instead of using the tag format:
kubernetes.io/cluster/<id>=owned
we instead use a custom tag format:zalando.org/cluster/<id>=owned
so we still can track the cluster ID ownership, but not interfere with the "Service Type Load Balancer logic" which is in core Kubernetes.The change is done in two steps:
zalando.org/cluster/<id>=owned
zalando.org/cluster/
.We need to do it in two steps to avoid that we loose track of which stacks belong to a cluster as this is identified via the clusterID tag.