Skip to content

Commit

Permalink
Use default gRPC dialer when connecting to satellites (#4115)
Browse files Browse the repository at this point in the history
Uses a new feature in buildkit which forces use of the default grpc
dialer in the client-side connection. The default dialer supports HTTP
connect proxies, which allows earthly to connect with BYOC satellites
that may be behind a VPN like Tailscale.
  • Loading branch information
brandonSc authored May 16, 2024
1 parent 9050356 commit 3ce48b4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion buildkitd/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildkitd:
ARG BUILDKIT_BASE_IMAGE=$BUILDKIT_PROJECT+build
END
ELSE
ARG BUILDKIT_BASE_IMAGE=github.com/earthly/buildkit:594835b598b9140741472bd8f3524cb502aa49f8+build
ARG BUILDKIT_BASE_IMAGE=github.com/earthly/buildkit:531b303aa8ec03c29c2ceaa140eb0a6d32e6f6f3+build
END
ARG EARTHLY_TARGET_TAG_DOCKER
ARG TAG="dev-$EARTHLY_TARGET_TAG_DOCKER"
Expand Down
10 changes: 6 additions & 4 deletions buildkitd/buildkitd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,10 +1012,12 @@ func addRequiredOpts(settings Settings, installationName string, isUsingPodman b
}

if settings.SatelliteName != "" {
opts = append(opts, client.WithAdditionalMetadataContext(
"satellite_name", settings.SatelliteName,
"satellite_org", settings.SatelliteOrgID,
"satellite_token", settings.SatelliteToken),
opts = append(opts,
client.WithDefaultGRPCDialer(),
client.WithAdditionalMetadataContext(
"satellite_name", settings.SatelliteName,
"satellite_org", settings.SatelliteOrgID,
"satellite_token", settings.SatelliteToken),
)
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,6 @@ replace (
github.com/jdxcode/netrc => github.com/mikejholly/netrc v0.0.0-20221121193719-a154cb29ec2a
github.com/jessevdk/go-flags => github.com/alexcb/go-flags v0.0.0-20210722203016-f11d7ecb5ee5

github.com/moby/buildkit => github.com/earthly/buildkit v0.0.0-20240419223558-594835b598b9
github.com/moby/buildkit => github.com/earthly/buildkit v0.0.0-20240515200521-531b303aa8ec
github.com/tonistiigi/fsutil => github.com/earthly/fsutil v0.0.0-20231030221755-644b08355b65
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/earthly/buildkit v0.0.0-20240419223558-594835b598b9 h1:yN1+9T45k+wyzD2Jaf0xSc7bvE0nx09WH2oLb49+vk4=
github.com/earthly/buildkit v0.0.0-20240419223558-594835b598b9/go.mod h1:1/yAC8A0Tu94Bdmv07gaG1pFBp+CetVwO7oB3qvZXUc=
github.com/earthly/buildkit v0.0.0-20240515200521-531b303aa8ec h1:vf6x0fPOWKakjH3n2N1O9Tg5j1HDIJsC3Kkgmuko2U0=
github.com/earthly/buildkit v0.0.0-20240515200521-531b303aa8ec/go.mod h1:1/yAC8A0Tu94Bdmv07gaG1pFBp+CetVwO7oB3qvZXUc=
github.com/earthly/cloud-api v1.0.1-0.20240508215807-a958f373126f h1:8CXT0MQ7dQrtm/IwVIexffosImh4ht0WUiWQAt0UoeQ=
github.com/earthly/cloud-api v1.0.1-0.20240508215807-a958f373126f/go.mod h1:rU/tYJ7GFBjdKAITV2heDbez++glpGSbtJaZcp73rNI=
github.com/earthly/fsutil v0.0.0-20231030221755-644b08355b65 h1:6oyWHoxHXwcTt4EqmMw6361scIV87uEAB1N42+VpIwk=
Expand Down

0 comments on commit 3ce48b4

Please sign in to comment.