Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Fix ConfigMap glitches and doc registry caching #58

Merged
merged 2 commits into from
Dec 3, 2020

Conversation

dhiltgen
Copy link
Contributor

@dhiltgen dhiltgen commented Dec 1, 2020

This fixes a few corner cases in how we handle ConfigMaps for the
buildkitd toml config file. It adds integration coverage for those
scenarios. It also adds a brief example showing how to configure
a local registry for caching purposes to speed up incremental
builds on a multi-node cluster.

Closes #31

This fixes a few corner cases in how we handle ConfigMaps for the
buildkitd toml config file.  It adds integration coverage for those
scenarios.  It also adds a brief example showing how to configure
a local registry for caching purposes to speed up incremental
builds on a multi-node cluster.
@codecov-io
Copy link

codecov-io commented Dec 1, 2020

Codecov Report

Merging #58 (4993b42) into main (3821ca0) will increase coverage by 2.81%.
The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
+ Coverage   50.30%   53.11%   +2.81%     
==========================================
  Files          38       39       +1     
  Lines        2465     2517      +52     
==========================================
+ Hits         1240     1337      +97     
+ Misses       1073     1019      -54     
- Partials      152      161       +9     
Flag Coverage Δ
integration-tests 52.61% <78.57%> (+2.83%) ⬆️
unit-tests 4.37% <0.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/driver/kubernetes/podchooser/podchooser.go 67.34% <0.00%> (+3.51%) ⬆️
pkg/driver/kubernetes/driver.go 62.35% <18.18%> (+1.50%) ⬆️
integration/common/kubeclient.go 60.00% <60.00%> (ø)
integration/common/basesuites.go 100.00% <100.00%> (ø)
pkg/build/build.go 27.12% <100.00%> (+1.29%) ⬆️
pkg/cmd/create.go 74.19% <100.00%> (ø)
pkg/driver/kubernetes/factory.go 71.33% <100.00%> (+1.06%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efe365a...4993b42. Read the comment docs.

@@ -35,6 +35,11 @@ Assuming you have a valid kube configuration pointed at a cluster, you can run t
make integration
```

If you want to run a single suite of tests while working on a specific area of the tests or main code, use something like this:
```
make integration EXTRA_GO_TEST_FLAGS="-run TestConfigMapSuite -v"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe include a list of the current suites and what/when it's useful to run those tests? I'm worried the people wouldn't know what to do here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add a hint to find them

README.md Outdated
kubectl buildkit create --config ./examples/local-registry-buildkitd.toml
```

You can then build using the registry cache with something like
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe:

"... using the registry cache with the command:"

Just to be a little more assertive on how to perform the action.

_, err := d.configMapClient.Get(ctx, d.configMap.Name, metav1.GetOptions{})

if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a little unclear to me how this works. What happens if a serious error is passed back here but userSpecifiedConfig is set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point - it would probably be masked - let me refine this a tad more to validate the error specifically.

@dhiltgen dhiltgen merged commit e7e337e into vmware-archive:main Dec 3, 2020
@dhiltgen dhiltgen deleted the registry_example branch December 3, 2020 18:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to set up a local/private registry for caching
4 participants