in cmd/server.go [112:124]
func overrideEndpointInCfg(log *logrus.Entry, cfg *aws.Config, endpoint string) {
log.Printf("Overriding %s default endpoint with %s\n", eksauth.ServiceID, endpoint)
cfg.EndpointResolverWithOptions = aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
if service == eksauth.ServiceID {
return aws.Endpoint{
PartitionID: "aws",
URL: endpoint,
SigningRegion: region,
}, nil
}
return aws.Endpoint{}, &aws.EndpointNotFoundError{}
})
}