mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
apiaggregation available controller should only hit required endpoint
This commit is contained in:
parent
2c64ef5b71
commit
a84db7e9de
@ -261,9 +261,11 @@ func (c *AvailableConditionController) sync(key string) error {
|
||||
results <- err
|
||||
return
|
||||
}
|
||||
discoveryURL.Path = "/apis/" + apiService.Spec.Group + "/" + apiService.Spec.Version
|
||||
|
||||
errCh := make(chan error)
|
||||
go func() {
|
||||
// be sure to check a URL that the aggregated API server is required to serve
|
||||
newReq, err := http.NewRequest("GET", discoveryURL.String(), nil)
|
||||
if err != nil {
|
||||
errCh <- err
|
||||
|
@ -90,6 +90,8 @@ func newRemoteAPIService(name string) *apiregistration.APIService {
|
||||
return &apiregistration.APIService{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: name},
|
||||
Spec: apiregistration.APIServiceSpec{
|
||||
Group: strings.SplitN(name, ".", 2)[0],
|
||||
Version: strings.SplitN(name, ".", 2)[1],
|
||||
Service: &apiregistration.ServiceReference{
|
||||
Namespace: "foo",
|
||||
Name: "bar",
|
||||
|
Loading…
Reference in New Issue
Block a user