Skip to content

Commit

Permalink
provide SSH settings to crc
Browse files Browse the repository at this point in the history
  • Loading branch information
cfergeau committed Aug 1, 2024
1 parent a7829f5 commit 5bbc364
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,5 @@ require (
)

replace github.com/containers/podman/v5 => github.com/cfergeau/podman/v5 v5.0.0-20240801075250-2ad0fc8f3126

replace github.com/crc-org/machine => github.com/cfergeau/machine v0.0.0-20240731114918-7c24500be902
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cfergeau/podman/v5 v5.0.0-20240801075250-2ad0fc8f3126 h1:vSSWjjZDIhyAZdbyA9tgGoVpe6g82Wn9URLlhdzJ9k0=
github.com/cfergeau/podman/v5 v5.0.0-20240801075250-2ad0fc8f3126/go.mod h1:tEvvwANzHLEd9B6Vf+mF76piaQtbDYrGl3YXGZkq17s=
github.com/cfergeau/machine v0.0.0-20240731114918-7c24500be902 h1:Uh/Wt4KnAhPBd8VPY2shOeTYlmyXnOR2yycPMEKkfDI=
github.com/cfergeau/machine v0.0.0-20240731114918-7c24500be902/go.mod h1:trWeQimjfE3dJ8qWOxI4ePtYm13aecK42bf01s6h/Nc=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0=
Expand Down Expand Up @@ -92,8 +94,6 @@ github.com/coreos/go-systemd/v22 v22.5.1-0.20231103132048-7d375ecc2b09/go.mod h1
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/crc-org/crc/v2 v2.38.0 h1:8QcoH4hYksfKUQOLXHZw4jIY1aNS162WraZR4mzQzC8=
github.com/crc-org/crc/v2 v2.38.0/go.mod h1:HPY6grOaExM4Bhmd3T4RSkP0eizWsb8wSgoSwNsV5+k=
github.com/crc-org/machine v0.0.0-20221028075518-f9b43442196b h1:VPbW5D21B1WToPvEA/EGwhi4e3lXevmRff9M1lUTc5g=
github.com/crc-org/machine v0.0.0-20221028075518-f9b43442196b/go.mod h1:9bEsvgLE3LIPfvGATt9Mo73gG1CKKS6A/++VqOONKqc=
github.com/crc-org/vfkit v0.5.1 h1:r1zNf1g1bLbgu5BgIQodirvYaIGWJQ91eS/PIgNO6lo=
github.com/crc-org/vfkit v0.5.1/go.mod h1:Hqi20zQcqXMk6JqvByvOidHYv+KzPx3G+cjkdGSWv60=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
Expand Down
8 changes: 8 additions & 0 deletions pkg/machinedriver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,3 +484,11 @@ func (d *Driver) Stop() error {
// podman machine stop
return fmt.Errorf("Stop() unimplemented")
}

func (d *Driver) SSH() drivers.SSHConfig {
return drivers.SSHConfig{
IdentityPath: d.vmConfig.SSH.IdentityPath,
Port: d.vmConfig.SSH.Port,
RemoteUsername: d.vmConfig.SSH.RemoteUsername,
}
}
14 changes: 14 additions & 0 deletions vendor/github.com/crc-org/machine/libmachine/drivers/base.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ github.com/coreos/go-systemd/v22/dbus
## explicit; go 1.21
github.com/crc-org/crc/v2/pkg/crc/logging
github.com/crc-org/crc/v2/pkg/os
# github.com/crc-org/machine v0.0.0-20221028075518-f9b43442196b
# github.com/crc-org/machine v0.0.0-20221028075518-f9b43442196b => github.com/cfergeau/machine v0.0.0-20240731114918-7c24500be902
## explicit; go 1.17
github.com/crc-org/machine/libmachine/drivers
github.com/crc-org/machine/libmachine/state
Expand Down Expand Up @@ -1071,3 +1071,4 @@ gopkg.in/yaml.v3
## explicit; go 1.20
tags.cncf.io/container-device-interface/pkg/parser
# github.com/containers/podman/v5 => github.com/cfergeau/podman/v5 v5.0.0-20240801075250-2ad0fc8f3126
# github.com/crc-org/machine => github.com/cfergeau/machine v0.0.0-20240731114918-7c24500be902

0 comments on commit 5bbc364

Please sign in to comment.