fix: gcp health check fix

This commit is contained in:
Hector Ventura committed 2026-06-03 20:55:06 -05:00
1 parent 4383369a7a
commit e9931123aa
10 files changed
+50 -16

No files matched your search

@@ -54,7 +54,7 @@ public class GcpDoctorCommand implements Callable<Integer> {
checks.add(new ImagePresentCheck("floci/floci-gcp"));
checks.add(new ImageVersionCheck("floci/floci-gcp"));
checks.add(new ContainerRunningCheck());
checks.add(new EndpointReachableCheck());
checks.add(new EndpointReachableCheck(io.floci.cli.GcpGlobalOptions.CONTROL_PREFIX));
ALL_CHECKS = List.copyOf(checks);
}
@@ -25,7 +25,7 @@ public class GcpServicesCommand implements Callable<Integer> {
@Override
public Integer call() {
Printer printer = global.printer();
FlociHttpClient client = new FlociHttpClient(global.endpoint);
FlociHttpClient client = new FlociHttpClient(global.endpoint, GcpGlobalOptions.CONTROL_PREFIX);
List<String> services;
try {
@@ -48,7 +48,7 @@ public class GcpStatusCommand implements Callable<Integer> {
String serverVersion = "unavailable";
String serverEdition = "";
boolean reachable = false;
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint);
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint, GcpGlobalOptions.CONTROL_PREFIX);
try {
var health = client.health();
serverVersion = health.version();
@@ -35,7 +35,7 @@ public class GcpVersionCommand implements Callable<Integer> {
DockerClient docker = new DockerClient();
String effectiveEndpoint = global.resolvedEndpoint(docker);
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint);
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint, GcpGlobalOptions.CONTROL_PREFIX);
try {
var info = client.info();
serverVersion = info.version();
@@ -34,7 +34,7 @@ public class GcpWaitCommand implements Callable<Integer> {
Printer printer = global.printer();
long timeoutMillis = WaitCommand.parseDuration(timeout);
String effectiveEndpoint = global.resolvedEndpoint(new io.floci.cli.docker.DockerClient());
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint);
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint, GcpGlobalOptions.CONTROL_PREFIX);
Instant deadline = Instant.now().plusMillis(timeoutMillis);
while (Instant.now().isBefore(deadline)) {