We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c8539f commit eefc05dCopy full SHA for eefc05d
src/k8s-vault.cr
@@ -35,7 +35,11 @@ module K8sVault
35
cluster_server = kubeconfig.clusters.first.cluster.server.to_s
36
remote_proto = cluster_server.split(/https?:\/\//).first?.to_s
37
remote_proto = remote_proto.empty? ? "https" : remote_proto
38
- remote_host, remote_port = cluster_server.split(/https?:\/\//).last.split(":")
+ remote_host = cluster_server.split(/https?:\/\//).last
39
+ remote_port = "443"
40
+ if (remote_host.index(":"))
41
+ remote_host, remote_port = remote_host.split(":")
42
+ end
43
44
local_port = if config.ssh_forwarding_port.random == true
45
Random.rand(K8sVault::RANDOM_PORT_RANGE) + K8sVault::RANDOM_PORT_OFFSET
0 commit comments