Skip to content

Commit 974aef6

Browse files
winkingturtle-vmwebroberson
authored andcommitted
Move logic for figuring out sidecarRootFSPath to rep
1 parent 3b06454 commit 974aef6

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

initializer/initializer.go

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,7 @@ func Initialize(
173173
grouper.Members,
174174
error,
175175
) {
176-
var gardenHealthcheckRootFS string
177-
if sidecarRootFSPath == "" {
178-
for _, rootFSPath := range rootFSes {
179-
gardenHealthcheckRootFS = rootFSPath
180-
break
181-
}
182-
} else {
183-
gardenHealthcheckRootFS = sidecarRootFSPath
184-
}
185-
logger.Info("garden-healthcheck-rootfs", lager.Data{"rootfs": gardenHealthcheckRootFS})
176+
logger.Info("garden-healthcheck-rootfs", lager.Data{"rootfs": sidecarRootFSPath})
186177

187178
postSetupHook, err := shlex.Split(config.PostSetupHook)
188179
if err != nil {
@@ -270,7 +261,7 @@ func Initialize(
270261
config.PostSetupUser,
271262
config.EnableDeclarativeHealthcheck,
272263
config.EnableHealtcheckMetrics,
273-
gardenHealthcheckRootFS,
264+
sidecarRootFSPath,
274265
config.EnableContainerProxy,
275266
time.Duration(config.EnvoyDrainTimeout),
276267
)
@@ -382,7 +373,7 @@ func Initialize(
382373
}
383374

384375
gardenHealthcheck := gardenhealth.NewChecker(
385-
gardenHealthcheckRootFS,
376+
sidecarRootFSPath,
386377
config.HealthCheckContainerOwnerName,
387378
time.Duration(config.GardenHealthcheckCommandRetryPause),
388379
healthcheckSpec,

0 commit comments

Comments
 (0)