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

provided an ability to create additional endpoints #284

Merged

Conversation

shriramsharma
Copy link
Collaborator

Provides an ability to generate additional endpoints for a service

The additional endpoints will be generated based on the additional_endpoints_suffixes array passed as the command line param.
Admiral will use the passed suffixes to generate the endpoints by creating a VirtualService, which will route the corresponding ServiceEntry endpoint

@shriramsharma shriramsharma marked this pull request as ready for review February 16, 2023 00:30
return fmt.Errorf("failed deleting additional endpoints for serviceentry for SE host: '%s' and additional endpoint suffixes %s", destinationHostName, additionalEndpointSuffixes)
}

defaultVSName := getIstioResourceName(virtualServiceHostnames[0], "-vs")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there another way we can identify such virtual services? May be using identity of the asset or something (which is added as a label), without deriving it from the service entry?

// The list suffixes defined in admiralparams.AdditionalEndpointSuffixes will used to generate the endpoints
func createAdditionalEndpoints(ctx context.Context, serviceEntry *networking.ServiceEntry, namespace string, rc *RemoteController) error {

additionalEndpointSuffixes := common.GetAdditionalEndpointSuffixes()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both create and delete are using common functionality, may be abstract them in a function so both can reuse it.

}
}
if result == nil {
return nil, fmt.Errorf("no virtualservice found with labels %s and annotation %s=%s", listOptions.LabelSelector, resourceCreatedByAnnotationLabel, resourceCreatedByAnnotationValue)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a valid scenario where there are no VS created for dependency proxy in a given cluster?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nirvanagit , this is independent of DependencyProxy. This is the case where the services are part of mesh and communication is not being proxied through a proxy mesh service.

Signed-off-by: Shriram Sharma <shriram_sharma@intuit.com>
Signed-off-by: Shriram Sharma <shriram_sharma@intuit.com>
Signed-off-by: Shriram Sharma <shriram_sharma@intuit.com>
Signed-off-by: Shriram Sharma <shriram_sharma@intuit.com>
Signed-off-by: Shriram Sharma <shriram_sharma@intuit.com>
@shriramsharma shriramsharma merged commit cabf266 into istio-ecosystem:master Feb 24, 2023
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.

None yet

2 participants