Skip to content

Commit 65c12e2

Browse files
authored
Merge pull request #165 from fluxcd/flux-v1.3.0
Update dependencies to Flux v2.3.0
2 parents bf8370d + 3f813e6 commit 65c12e2

File tree

4 files changed

+112
-139
lines changed

4 files changed

+112
-139
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ deploy: manifests
4848

4949
# Generate manifests e.g. CRD, RBAC etc.
5050
manifests: controller-gen
51-
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=source-reader webhook paths="./..." output:crd:artifacts:config=config/crd/bases
51+
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=source-reader paths="./..." output:crd:artifacts:config=config/crd/bases
5252

5353
# Run go tidy to cleanup go.mod
5454
tidy:
@@ -87,7 +87,7 @@ manifests-release:
8787

8888
# Find or download controller-gen
8989
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
90-
CONTROLLER_GEN_VERSION ?= v0.14.0
90+
CONTROLLER_GEN_VERSION ?= v0.15.0
9191
.PHONY: controller-gen
9292
controller-gen: ## Download controller-gen locally if necessary.
9393
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION))

controllers/gitrepository_watcher.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ type GitRepositoryWatcher struct {
3838
}
3939

4040
func (r *GitRepositoryWatcher) SetupWithManager(mgr ctrl.Manager) error {
41-
r.artifactFetcher = fetch.NewArchiveFetcher(
42-
r.HttpRetry,
43-
tar.UnlimitedUntarSize,
44-
tar.UnlimitedUntarSize,
45-
os.Getenv("SOURCE_CONTROLLER_LOCALHOST"),
41+
r.artifactFetcher = fetch.New(
42+
fetch.WithRetries(r.HttpRetry),
43+
fetch.WithMaxDownloadSize(tar.UnlimitedUntarSize),
44+
fetch.WithUntar(tar.WithMaxUntarSize(tar.UnlimitedUntarSize)),
45+
fetch.WithHostnameOverwrite(os.Getenv("SOURCE_CONTROLLER_LOCALHOST")),
46+
fetch.WithLogger(nil),
4647
)
4748

4849
return ctrl.NewControllerManagedBy(mgr).
@@ -70,7 +71,13 @@ func (r *GitRepositoryWatcher) Reconcile(ctx context.Context, req ctrl.Request)
7071
if err != nil {
7172
return ctrl.Result{}, fmt.Errorf("failed to create temp dir, error: %w", err)
7273
}
73-
defer os.RemoveAll(tmpDir)
74+
75+
defer func(path string) {
76+
err := os.RemoveAll(path)
77+
if err != nil {
78+
log.Error(err, "unable to remove temp dir")
79+
}
80+
}(tmpDir)
7481

7582
// download and extract artifact
7683
if err := r.artifactFetcher.Fetch(artifact.URL, artifact.Digest, tmpDir); err != nil {

go.mod

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
module github.com/fluxcd/source-watcher
22

3-
go 1.22
3+
go 1.22.0
44

55
// Replace digest lib to master to gather access to BLAKE3.
66
// xref: https://github.com/opencontainers/go-digest/pull/66
77
replace github.com/opencontainers/go-digest => github.com/opencontainers/go-digest v1.0.1-0.20220411205349-bde1400a84be
88

99
require (
10-
github.com/fluxcd/pkg/http/fetch v0.10.0
11-
github.com/fluxcd/pkg/runtime v0.45.0
12-
github.com/fluxcd/pkg/tar v0.6.0
13-
github.com/fluxcd/source-controller/api v1.2.4
10+
github.com/fluxcd/pkg/http/fetch v0.11.0
11+
github.com/fluxcd/pkg/runtime v0.47.1
12+
github.com/fluxcd/pkg/tar v0.7.0
13+
github.com/fluxcd/source-controller/api v1.3.0
1414
github.com/spf13/pflag v1.0.5
15-
k8s.io/apimachinery v0.29.3
16-
k8s.io/client-go v0.29.3
17-
sigs.k8s.io/controller-runtime v0.17.2
15+
k8s.io/apimachinery v0.30.0
16+
k8s.io/client-go v0.30.0
17+
sigs.k8s.io/controller-runtime v0.18.2
1818
)
1919

2020
require (
2121
github.com/beorn7/perks v1.0.1 // indirect
22-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
22+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2323
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
24-
github.com/davecgh/go-spew v1.1.1 // indirect
25-
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
26-
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
27-
github.com/fluxcd/pkg/apis/meta v1.4.0 // indirect
24+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
25+
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
26+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
27+
github.com/fluxcd/pkg/apis/acl v0.3.0 // indirect
28+
github.com/fluxcd/pkg/apis/meta v1.5.0 // indirect
2829
github.com/fsnotify/fsnotify v1.7.0 // indirect
2930
github.com/go-logr/logr v1.4.1 // indirect
3031
github.com/go-logr/zapr v1.3.0 // indirect
31-
github.com/go-openapi/jsonpointer v0.20.0 // indirect
32-
github.com/go-openapi/jsonreference v0.20.2 // indirect
33-
github.com/go-openapi/swag v0.22.4 // indirect
32+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
33+
github.com/go-openapi/jsonreference v0.21.0 // indirect
34+
github.com/go-openapi/swag v0.23.0 // indirect
3435
github.com/gogo/protobuf v1.3.2 // indirect
3536
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3637
github.com/golang/protobuf v1.5.4 // indirect
@@ -52,30 +53,28 @@ require (
5253
github.com/opencontainers/go-digest/blake3 v0.0.0-20231025023718-d50d2fec9c98 // indirect
5354
github.com/pkg/errors v0.9.1 // indirect
5455
github.com/prometheus/client_golang v1.19.0 // indirect
55-
github.com/prometheus/client_model v0.5.0 // indirect
56-
github.com/prometheus/common v0.48.0 // indirect
57-
github.com/prometheus/procfs v0.12.0 // indirect
56+
github.com/prometheus/client_model v0.6.1 // indirect
57+
github.com/prometheus/common v0.53.0 // indirect
58+
github.com/prometheus/procfs v0.14.0 // indirect
5859
github.com/zeebo/blake3 v0.2.3 // indirect
5960
go.uber.org/multierr v1.11.0 // indirect
6061
go.uber.org/zap v1.27.0 // indirect
61-
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect
62-
golang.org/x/net v0.22.0 // indirect
63-
golang.org/x/oauth2 v0.16.0 // indirect
64-
golang.org/x/sys v0.18.0 // indirect
65-
golang.org/x/term v0.18.0 // indirect
62+
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
63+
golang.org/x/net v0.24.0 // indirect
64+
golang.org/x/oauth2 v0.19.0 // indirect
65+
golang.org/x/sys v0.19.0 // indirect
66+
golang.org/x/term v0.19.0 // indirect
6667
golang.org/x/text v0.14.0 // indirect
6768
golang.org/x/time v0.5.0 // indirect
6869
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
69-
google.golang.org/appengine v1.6.8 // indirect
7070
google.golang.org/protobuf v1.33.0 // indirect
7171
gopkg.in/inf.v0 v0.9.1 // indirect
7272
gopkg.in/yaml.v2 v2.4.0 // indirect
7373
gopkg.in/yaml.v3 v3.0.1 // indirect
74-
k8s.io/api v0.29.3 // indirect
75-
k8s.io/apiextensions-apiserver v0.29.3 // indirect
76-
k8s.io/component-base v0.29.3 // indirect
77-
k8s.io/klog/v2 v2.110.1 // indirect
78-
k8s.io/kube-openapi v0.0.0-20231206194836-bf4651e18aa8 // indirect
74+
k8s.io/api v0.30.0 // indirect
75+
k8s.io/apiextensions-apiserver v0.30.0 // indirect
76+
k8s.io/klog/v2 v2.120.1 // indirect
77+
k8s.io/kube-openapi v0.0.0-20240411171206-dc4e619f62f3 // indirect
7978
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
8079
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
8180
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect

0 commit comments

Comments
 (0)