Skip to content

Commit 5c9025a

Browse files
committed
UPSTREAM: <carry>: openshift-kube-apiserver: add openshift-kube-apiserver code
1 parent fdba62b commit 5c9025a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

openshift-kube-apiserver/openshiftkubeapiserver/patch.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func OpenShiftKubeAPIServerConfigPatch(genericConfig *genericapiserver.Config, k
6262
// ADMISSION
6363
clusterQuotaMappingController := newClusterQuotaMappingController(kubeInformers.Core().V1().Namespaces(), openshiftInformers.OpenshiftQuotaInformers.Quota().V1().ClusterResourceQuotas())
6464
genericConfig.AddPostStartHookOrDie("quota.openshift.io-clusterquotamapping", func(context genericapiserver.PostStartHookContext) error {
65-
go clusterQuotaMappingController.Run(5, context.StopCh)
65+
go clusterQuotaMappingController.Run(5, context.Done())
6666
return nil
6767
})
6868

@@ -95,7 +95,7 @@ func OpenShiftKubeAPIServerConfigPatch(genericConfig *genericapiserver.Config, k
9595
}
9696
apiRequestCountController := apirequestcount.NewController(apiserverClient.APIRequestCounts(), nodeFor())
9797
genericConfig.AddPostStartHook("openshift.io-api-request-count-filter", func(context genericapiserver.PostStartHookContext) error {
98-
go apiRequestCountController.Start(context.StopCh)
98+
go apiRequestCountController.Start(context.Done())
9999
return nil
100100
})
101101
genericConfig.BuildHandlerChainFunc, err = BuildHandlerChain(
@@ -113,7 +113,7 @@ func OpenShiftKubeAPIServerConfigPatch(genericConfig *genericapiserver.Config, k
113113
genericConfig.ReadyzChecks = append(genericConfig.ReadyzChecks, openshiftAPIServiceReachabilityCheck, oauthAPIServiceReachabilityCheck)
114114

115115
genericConfig.AddPostStartHookOrDie("openshift.io-startkubeinformers", func(context genericapiserver.PostStartHookContext) error {
116-
go openshiftInformers.Start(context.StopCh)
116+
go openshiftInformers.Start(context.Done())
117117
return nil
118118
})
119119
genericConfig.AddPostStartHookOrDie("openshift.io-openshift-apiserver-reachable", func(context genericapiserver.PostStartHookContext) error {

openshift-kube-apiserver/openshiftkubeapiserver/sdn_readyz_wait.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (c *aggregatedAPIServiceAvailabilityCheck) checkForConnection(context gener
162162
// if we timeout, always return ok so that we can start from a case where all kube-apiservers are down and the SDN isn't coming up
163163
utilruntime.HandleError(fmt.Errorf("%s never reached apiserver", c.Name()))
164164
return
165-
case <-context.StopCh:
165+
case <-context.Done():
166166
utilruntime.HandleError(fmt.Errorf("%s interrupted", c.Name()))
167167
return
168168
case <-noAggregatedAPIServer:

0 commit comments

Comments
 (0)