-
Notifications
You must be signed in to change notification settings - Fork 83
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
provided an ability to create additional endpoints #284
Conversation
admiral/pkg/clusters/serviceentry.go
Outdated
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") |
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.
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() |
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.
Both create and delete are using common functionality, may be abstract them in a function so both can reuse it.
admiral/pkg/clusters/serviceentry.go
Outdated
} | ||
} | ||
if result == nil { | ||
return nil, fmt.Errorf("no virtualservice found with labels %s and annotation %s=%s", listOptions.LabelSelector, resourceCreatedByAnnotationLabel, resourceCreatedByAnnotationValue) |
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.
Is this a valid scenario where there are no VS created for dependency proxy in a given cluster?
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.
@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 <[email protected]>
Signed-off-by: Shriram Sharma <[email protected]>
Signed-off-by: Shriram Sharma <[email protected]>
Signed-off-by: Shriram Sharma <[email protected]>
Signed-off-by: Shriram Sharma <[email protected]>
5e465d6
to
02ccfcd
Compare
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