Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mTLS-over-TCP buildkit #284

Merged
merged 7 commits into from
Sep 18, 2023

Conversation

RealHarshThakur
Copy link
Contributor

@RealHarshThakur RealHarshThakur commented Sep 6, 2023

Adds flags to enable Copa to connect to a remote Buildkit listening on TCP address secured via mTLS.
This is very similar to creating a remote buildx driver as described here.

Closes #285

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch coverage: 37.14% and project coverage change: +0.12% 🎉

Comparison is base (b376b87) 31.80% compared to head (108ac36) 31.93%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
+ Coverage   31.80%   31.93%   +0.12%     
==========================================
  Files          18       18              
  Lines        1597     1622      +25     
==========================================
+ Hits          508      518      +10     
- Misses       1061     1073      +12     
- Partials       28       31       +3     
Files Changed Coverage Δ
pkg/buildkit/buildkit.go 0.00% <ø> (ø)
pkg/patch/patch.go 6.36% <0.00%> (ø)
pkg/patch/cmd.go 48.83% <33.33%> (-4.11%) ⬇️
pkg/buildkit/drivers.go 26.82% <47.36%> (+4.10%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pkg/buildkit/drivers.go Outdated Show resolved Hide resolved
@RealHarshThakur
Copy link
Contributor Author

Guessing the test failures are unrelated to this change? As I see them here as well: #287

Please do let me know if you folks think there is a test you'd like to see. I've followed the same pattern that buildctl CLI has to set up the client.

@salaxander
Copy link
Contributor

Guessing the test failures are unrelated to this change? As I see them here as well: #287

Please do let me know if you folks think there is a test you'd like to see. I've followed the same pattern that buildctl CLI has to set up the client.

Yes it's happening across all PRs at the moment, working on addressing it

@salaxander
Copy link
Contributor

@RealHarshThakur - test issue should be resolved now :)

@salaxander
Copy link
Contributor

This is looking good to me - @sozercan do you have a chance to review?

pkg/patch/cmd.go Outdated
reportFile string
patchedTag string
workingFolder string
buildkitAddr string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of explicitly defining these addr/cert args here, can use buildkit.Opts and set the flags to use &bkopts.<Field>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :D

Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@sozercan sozercan merged commit a4c4abe into project-copacetic:main Sep 18, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[REQ] Support for Copa to connect to remote buildkit
4 participants