Skip to content

Commit

Permalink
Needed for temporal and workers to connect to each other via IPv6.
Browse files Browse the repository at this point in the history
  • Loading branch information
xorl committed Mar 19, 2024
1 parent 3b6b6d2 commit 7d31875
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public KubeProcessFactory(final WorkerConfigsProvider workerConfigsProvider,
this.serviceAccount = serviceAccount;
this.fabricClient = fabricClient;
this.kubeHeartbeatUrl = kubeHeartbeatUrl;
this.processRunnerHost = processRunnerHost;
this.processRunnerHost = processRunnerHost.contains(":") ? "[" + processRunnerHost + "]" : processRunnerHost;;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ProcessFactory kubeProcessFactory(
@Value("${airbyte.worker.job.kube.serviceAccount}") final String serviceAccount)
throws UnknownHostException {
final var localIp = InetAddress.getLocalHost().getHostAddress();
final var kubeHeartbeatUrl = localIp + ":" + serverPort;
final String kubeHeartbeatUrl = localIp.contains(":") ? "[" + localIp + "]:" + serverPort : localIp + ":" + serverPort;

// this needs to have two ports for the source and two ports for the destination (all four must be
// exposed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public ProcessFactory createKubernetesProcessFactory(final WorkerConfigsProvider
throws UnknownHostException {
final KubernetesClient fabricClient = new DefaultKubernetesClient();
final String localIp = InetAddress.getLocalHost().getHostAddress();
final String kubeHeartbeatUrl = localIp + ":" + serverPort;
final String kubeHeartbeatUrl = localIp.contains(":") ? "[" + localIp + "]:" + serverPort : localIp + ":" + serverPort;
return new KubeProcessFactory(workerConfigsProvider,
featureFlagClient,
kubernetesNamespace,
Expand Down

0 comments on commit 7d31875

Please sign in to comment.