mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #79895 from deads2k/aggregated-fix-endpont
apiaggregation available controller should only hit required endpoint
This commit is contained in:
commit
262e59b2c0
@ -261,9 +261,11 @@ func (c *AvailableConditionController) sync(key string) error {
|
|||||||
results <- err
|
results <- err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
discoveryURL.Path = "/apis/" + apiService.Spec.Group + "/" + apiService.Spec.Version
|
||||||
|
|
||||||
errCh := make(chan error)
|
errCh := make(chan error)
|
||||||
go func() {
|
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)
|
newReq, err := http.NewRequest("GET", discoveryURL.String(), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errCh <- err
|
errCh <- err
|
||||||
|
@ -90,6 +90,8 @@ func newRemoteAPIService(name string) *apiregistration.APIService {
|
|||||||
return &apiregistration.APIService{
|
return &apiregistration.APIService{
|
||||||
ObjectMeta: metav1.ObjectMeta{Name: name},
|
ObjectMeta: metav1.ObjectMeta{Name: name},
|
||||||
Spec: apiregistration.APIServiceSpec{
|
Spec: apiregistration.APIServiceSpec{
|
||||||
|
Group: strings.SplitN(name, ".", 2)[0],
|
||||||
|
Version: strings.SplitN(name, ".", 2)[1],
|
||||||
Service: &apiregistration.ServiceReference{
|
Service: &apiregistration.ServiceReference{
|
||||||
Namespace: "foo",
|
Namespace: "foo",
|
||||||
Name: "bar",
|
Name: "bar",
|
||||||
|
Loading…
Reference in New Issue
Block a user