Skip to content

Commit 34d7d9b

Browse files
authored
feature: allow relocating images with relok8s lib (#115)
* feature: allow relocating images with relok8s lib
1 parent 938d848 commit 34d7d9b

File tree

8 files changed

+477
-113
lines changed

8 files changed

+477
-113
lines changed

api/config.pb.go

+58-46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/config.proto

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ message Config {
88
SourceRepo source = 1;
99
TargetRepo target = 2;
1010
repeated string charts = 3;
11+
bool relocate_container_images = 4;
1112
}
1213

1314
// SourceRepo contains the required information of the source chart repository

cmd/sync.go

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func newSyncCmd() *cobra.Command {
7777
syncer.WithFromDate(syncFromDate),
7878
syncer.WithWorkdir(syncWorkdir),
7979
syncer.WithInsecure(rootInsecure),
80+
syncer.WithContainerImageRelocation(c.RelocateContainerImages),
8081
)
8182
if err != nil {
8283
return errors.Trace(err)

go.mod

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ module github.com/bitnami-labs/charts-syncer
22

33
go 1.16
44

5+
// Needed so we can require asset-relocation-tool-for-kubernetes packages
6+
// https://github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes/issues/89
7+
replace gopkg.in/yaml.v3 => github.com/atomatt/yaml v0.0.0-20200403124456-7b932d16ab90
8+
59
require (
610
github.com/bitnami-labs/pbjson v1.1.0
711
github.com/containerd/containerd v1.5.8
@@ -18,6 +22,7 @@ require (
1822
github.com/pkg/errors v0.9.1
1923
github.com/spf13/cobra v1.2.1
2024
github.com/spf13/viper v1.8.1
25+
github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes v0.3.45
2126
google.golang.org/protobuf v1.27.1
2227
gopkg.in/yaml.v2 v2.4.0
2328
helm.sh/helm/v3 v3.7.0

0 commit comments

Comments
 (0)