Skip to content
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

aws: log when multiple subnets found in the same AZ #659

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexanderYastrebov
Copy link
Member

@AlexanderYastrebov AlexanderYastrebov commented Nov 20, 2023

#0

@AlexanderYastrebov AlexanderYastrebov force-pushed the aws/log-multiple-az-subnets branch 2 times, most recently from a986c77 to 3b00624 Compare November 20, 2023 15:55
@AlexanderYastrebov AlexanderYastrebov marked this pull request as draft November 20, 2023 15:55
aws/adapter.go Outdated Show resolved Hide resolved
@AlexanderYastrebov AlexanderYastrebov force-pushed the aws/log-multiple-az-subnets branch from 3b00624 to 41b0d3c Compare November 20, 2023 16:18
@AlexanderYastrebov AlexanderYastrebov marked this pull request as ready for review November 20, 2023 16:18
@AlexanderYastrebov AlexanderYastrebov marked this pull request as draft November 20, 2023 16:24
@AlexanderYastrebov AlexanderYastrebov force-pushed the aws/log-multiple-az-subnets branch from 41b0d3c to 83f8db9 Compare November 20, 2023 16:30
@AlexanderYastrebov AlexanderYastrebov force-pushed the aws/log-multiple-az-subnets branch from 83f8db9 to 681bb78 Compare November 20, 2023 16:31
@AlexanderYastrebov AlexanderYastrebov marked this pull request as ready for review November 20, 2023 16:31
@szuecs
Copy link
Member

szuecs commented Nov 20, 2023

👍

@AlexanderYastrebov AlexanderYastrebov marked this pull request as draft November 21, 2023 10:07
@AlexanderYastrebov
Copy link
Member Author

AlexanderYastrebov commented Nov 27, 2023

This makes sense to have only when subnets are tagged with cluster id

if _, ok := tags[clusterIDTagPrefix+clusterID]; ok {
retFiltered = append(retFiltered, &subnetDetails{
id: subnetID,
availabilityZone: az,
public: isPublic,
tags: tags,
})
}
}
// Fall back to full list of subnets if none matching expected tagging are found, with a stern warning
// https://github.com/kubernetes/kubernetes/blob/v1.10.3/pkg/cloudprovider/providers/aws/aws.go#L3009
if len(retFiltered) == 0 {
log.Warn("No tagged subnets found; considering all subnets. This is likely to be an error in future versions.")
return retAll, nil
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants