Skip to content

Commit

Permalink
Fix: dns bug for endpointslices v1beta1 version (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceLiZhixin authored Jan 13, 2023
1 parent 094a273 commit d02dac7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/yurthub/server/nonresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ type NonResourceHandler func(kubeClient *kubernetes.Clientset, sw cachemanager.S

func wrapNonResourceHandler(proxyHandler http.Handler, config *config.YurtHubConfiguration, restMgr *rest.RestConfigManager) http.Handler {
wrapMux := mux.NewRouter()
// register handler for non resource requests
for path := range nonResourceReqPaths {
wrapMux.Handle(path, localCacheHandler(nonResourceHandler, restMgr, config.StorageWrapper, path)).Methods("GET")

if !config.EnableCoordinator {
// register handler for non resource requests
for path := range nonResourceReqPaths {
wrapMux.Handle(path, localCacheHandler(nonResourceHandler, restMgr, config.StorageWrapper, path)).Methods("GET")
}
}

// register handler for other requests
Expand Down

0 comments on commit d02dac7

Please sign in to comment.