Skip to content

Commit c73cf0b

Browse files
authored
implement correct interface (#1713)
1 parent 22a5d18 commit c73cf0b

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/controller/healthcheck/customroutecontrollerhealth.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ func (hc *CustomRouteControllerHealthCheck) SetLoggerSuffix(provider, extension
9292
hc.deploymentCheck.SetLoggerSuffix(provider, extension)
9393
}
9494

95-
// InjectSeedClient injects the seed client
96-
func (hc *CustomRouteControllerHealthCheck) InjectSeedClient(seedClient client.Client) {
95+
// InjectSourceClient injects the seed client into the health check and also into the underlying deployment health check.
96+
func (hc *CustomRouteControllerHealthCheck) InjectSourceClient(seedClient client.Client) {
9797
if itf, ok := hc.deploymentCheck.(healthcheck.SourceClient); ok {
9898
itf.InjectSourceClient(seedClient)
9999
}
100100
}
101101

102-
// InjectShootClient injects the shoot client
103-
func (hc *CustomRouteControllerHealthCheck) InjectShootClient(shootClient client.Client) {
102+
// InjectTargetClient injects the shoot client into the health check and also into the underlying deployment health check.
103+
func (hc *CustomRouteControllerHealthCheck) InjectTargetClient(shootClient client.Client) {
104104
if itf, ok := hc.deploymentCheck.(healthcheck.TargetClient); ok {
105105
itf.InjectTargetClient(shootClient)
106106
}

pkg/controller/healthcheck/customroutecontrollerhealth_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func runHealthCheckWithEvent(event *corev1.Event, scheme *runtime.Scheme) (*heal
143143
}
144144

145145
hc := chealthcheck.NewCustomRouteControllerHealthCheck(deploymentCheck)
146-
hc.InjectShootClient(shootClient)
146+
hc.InjectTargetClient(shootClient)
147147
hc.Logger = logr.Discard()
148148

149149
return hc.Check(context.Background(), types.NamespacedName{

0 commit comments

Comments
 (0)