Skip to content
This repository was archived by the owner on Jul 18, 2022. It is now read-only.

Commit 24594eb

Browse files
committed
Update flux pkg components
Signed-off-by: Aurel Canciu <[email protected]>
1 parent 8312c64 commit 24594eb

12 files changed

+799
-532
lines changed

.github/actions/run-tests/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG BASE_VARIANT=bullseye
2-
ARG GO_VERSION=1.17.2
3-
ARG XX_VERSION=1.0.0-rc.2
2+
ARG GO_VERSION=1.17
3+
ARG XX_VERSION=1.1.0
44

55
ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2
66
ARG LIBGIT2_TAG=libgit2-1.1.1-1

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG BASE_VARIANT=bullseye
2-
ARG GO_VERSION=1.17.2
3-
ARG XX_VERSION=1.0.0-rc.2
2+
ARG GO_VERSION=1.17
3+
ARG XX_VERSION=1.1.0
44

55
ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2
66
ARG LIBGIT2_TAG=libgit2-1.1.1-1

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ CACHE := cache
2121

2222
# Version of the source-controller from which to get the GitRepository CRD.
2323
# Change this if you bump the source-controller/api version in go.mod.
24-
SOURCE_VER ?= v0.19.0
24+
SOURCE_VER ?= v0.20.1
2525

2626
# Version of the image-reflector-controller from which to get the ImagePolicy CRD.
2727
# Change this if you bump the image-reflector-controller/api version in go.mod.
28-
REFLECTOR_VER ?= v0.14.0
28+
REFLECTOR_VER ?= v0.15.0
2929

3030
# Version of libgit2 the controller should depend on.
3131
LIBGIT2_VERSION ?= 1.1.1
@@ -203,7 +203,7 @@ ifeq (, $(shell which controller-gen))
203203
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
204204
cd $$CONTROLLER_GEN_TMP_DIR ;\
205205
go mod init tmp ;\
206-
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.5.0 ;\
206+
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0 ;\
207207
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
208208
}
209209
CONTROLLER_GEN=$(GOBIN)/controller-gen

api/go.mod

+16-13
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,27 @@ module github.com/fluxcd/image-automation-controller/api
33
go 1.17
44

55
require (
6-
github.com/fluxcd/pkg/apis/meta v0.10.1
7-
github.com/fluxcd/source-controller/api v0.19.0
8-
k8s.io/apimachinery v0.22.2
9-
sigs.k8s.io/controller-runtime v0.10.2
6+
github.com/fluxcd/pkg/apis/meta v0.10.2
7+
github.com/fluxcd/source-controller/api v0.20.1
8+
k8s.io/apimachinery v0.23.1
9+
sigs.k8s.io/controller-runtime v0.11.0
1010
)
1111

1212
require (
13-
github.com/go-logr/logr v0.4.0 // indirect
13+
github.com/fluxcd/pkg/apis/acl v0.0.3 // indirect
14+
github.com/go-logr/logr v1.2.2 // indirect
1415
github.com/gogo/protobuf v1.3.2 // indirect
15-
github.com/google/go-cmp v0.5.5 // indirect
16-
github.com/google/gofuzz v1.1.0 // indirect
17-
github.com/json-iterator/go v1.1.11 // indirect
16+
github.com/google/go-cmp v0.5.6 // indirect
17+
github.com/google/gofuzz v1.2.0 // indirect
18+
github.com/json-iterator/go v1.1.12 // indirect
1819
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
19-
github.com/modern-go/reflect2 v1.0.1 // indirect
20-
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect
21-
golang.org/x/text v0.3.6 // indirect
20+
github.com/modern-go/reflect2 v1.0.2 // indirect
21+
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9 // indirect
22+
golang.org/x/text v0.3.7 // indirect
2223
gopkg.in/inf.v0 v0.9.1 // indirect
2324
gopkg.in/yaml.v2 v2.4.0 // indirect
24-
k8s.io/klog/v2 v2.8.0 // indirect
25-
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
25+
k8s.io/klog/v2 v2.30.0 // indirect
26+
k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 // indirect
27+
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
28+
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
2629
)

api/go.sum

+238-67
Large diffs are not rendered by default.

config/crd/bases/image.toolkit.fluxcd.io_imageupdateautomations.yaml

+279-92
Large diffs are not rendered by default.

controllers/imageupdateautomation_controller.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ type ImageUpdateAutomationReconcilerOptions struct {
102102
// +kubebuilder:rbac:groups=source.toolkit.fluxcd.io,resources=gitrepositories,verbs=get;list;watch
103103

104104
func (r *ImageUpdateAutomationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
105-
log := logr.FromContext(ctx)
105+
log := ctrl.LoggerFrom(ctx)
106106
debuglog := log.V(logger.DebugLevel)
107107
tracelog := log.V(logger.TraceLevel)
108108
now := time.Now()
@@ -736,12 +736,12 @@ func (r *ImageUpdateAutomationReconciler) event(ctx context.Context, auto imagev
736736
if r.ExternalEventRecorder != nil {
737737
objRef, err := reference.GetReference(r.Scheme, &auto)
738738
if err != nil {
739-
logr.FromContext(ctx).Error(err, "unable to send event")
739+
ctrl.LoggerFrom(ctx).Error(err, "unable to send event")
740740
return
741741
}
742742

743743
if err := r.ExternalEventRecorder.Eventf(*objRef, nil, severity, severity, msg); err != nil {
744-
logr.FromContext(ctx).Error(err, "unable to send event")
744+
ctrl.LoggerFrom(ctx).Error(err, "unable to send event")
745745
return
746746
}
747747
}
@@ -754,7 +754,7 @@ func (r *ImageUpdateAutomationReconciler) recordReadinessMetric(ctx context.Cont
754754

755755
objRef, err := reference.GetReference(r.Scheme, auto)
756756
if err != nil {
757-
logr.FromContext(ctx).Error(err, "unable to record readiness metric")
757+
ctrl.LoggerFrom(ctx).Error(err, "unable to record readiness metric")
758758
return
759759
}
760760
if rc := apimeta.FindStatusCondition(auto.Status.Conditions, meta.ReadyCondition); rc != nil {
@@ -779,7 +779,7 @@ func (r *ImageUpdateAutomationReconciler) recordSuspension(ctx context.Context,
779779
if r.MetricsRecorder == nil {
780780
return
781781
}
782-
log := logr.FromContext(ctx)
782+
log := ctrl.LoggerFrom(ctx)
783783

784784
objRef, err := reference.GetReference(r.Scheme, &auto)
785785
if err != nil {

go.mod

+39-40
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@ require (
1010
github.com/cyphar/filepath-securejoin v0.2.2
1111
github.com/fluxcd/image-automation-controller/api v0.18.0
1212
// If you bump this, change REFLECTOR_VER in the Makefile to match
13-
github.com/fluxcd/image-reflector-controller/api v0.14.0
14-
github.com/fluxcd/pkg/apis/meta v0.10.1
15-
github.com/fluxcd/pkg/gittestserver v0.4.2
16-
github.com/fluxcd/pkg/runtime v0.12.1
17-
github.com/fluxcd/pkg/ssh v0.1.0
13+
github.com/fluxcd/image-reflector-controller/api v0.15.0
14+
github.com/fluxcd/pkg/apis/meta v0.10.2
15+
github.com/fluxcd/pkg/gittestserver v0.5.0
16+
github.com/fluxcd/pkg/runtime v0.12.3
17+
github.com/fluxcd/pkg/ssh v0.2.0
1818
// If you bump this, change SOURCE_VER in the Makefile to match
19-
github.com/fluxcd/source-controller v0.19.0
20-
github.com/fluxcd/source-controller/api v0.19.0
19+
github.com/fluxcd/source-controller v0.20.1
20+
github.com/fluxcd/source-controller/api v0.20.1
2121
github.com/go-git/go-billy/v5 v5.3.1
2222
github.com/go-git/go-git/v5 v5.4.2
23-
github.com/go-logr/logr v0.4.0
23+
github.com/go-logr/logr v1.2.2
2424
github.com/google/go-containerregistry v0.6.0
2525
github.com/libgit2/git2go/v31 v31.6.1
26-
github.com/onsi/ginkgo v1.16.4
27-
github.com/onsi/gomega v1.15.0
26+
github.com/onsi/ginkgo v1.16.5
27+
github.com/onsi/gomega v1.17.0
2828
github.com/otiai10/copy v1.7.0
2929
github.com/spf13/pflag v1.0.5
30-
k8s.io/api v0.22.2
31-
k8s.io/apimachinery v0.22.2
32-
k8s.io/client-go v0.22.2
33-
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e
34-
sigs.k8s.io/controller-runtime v0.10.2
35-
sigs.k8s.io/kustomize/kyaml v0.10.21
30+
k8s.io/api v0.23.1
31+
k8s.io/apimachinery v0.23.1
32+
k8s.io/client-go v0.23.1
33+
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
34+
sigs.k8s.io/controller-runtime v0.11.0
35+
sigs.k8s.io/kustomize/kyaml v0.13.0
3636
)
3737

3838
require (
@@ -48,31 +48,31 @@ require (
4848
github.com/cespare/xxhash/v2 v2.1.1 // indirect
4949
github.com/davecgh/go-spew v1.1.1 // indirect
5050
github.com/emirpasic/gods v1.12.0 // indirect
51-
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
52-
github.com/fluxcd/pkg/apis/acl v0.0.1 // indirect
51+
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
52+
github.com/fluxcd/pkg/apis/acl v0.0.3 // indirect
5353
github.com/fluxcd/pkg/gitutil v0.1.0 // indirect
5454
github.com/fluxcd/pkg/version v0.1.0 // indirect
55-
github.com/fsnotify/fsnotify v1.4.9 // indirect
55+
github.com/fsnotify/fsnotify v1.5.1 // indirect
5656
github.com/go-errors/errors v1.0.1 // indirect
5757
github.com/go-git/gcfg v1.5.0 // indirect
58-
github.com/go-logr/zapr v0.4.0 // indirect
58+
github.com/go-logr/zapr v1.2.0 // indirect
5959
github.com/go-openapi/jsonpointer v0.19.5 // indirect
6060
github.com/go-openapi/jsonreference v0.19.5 // indirect
6161
github.com/go-openapi/swag v0.19.14 // indirect
6262
github.com/gogo/protobuf v1.3.2 // indirect
6363
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
6464
github.com/golang/protobuf v1.5.2 // indirect
6565
github.com/google/go-cmp v0.5.6 // indirect
66-
github.com/google/gofuzz v1.1.0 // indirect
66+
github.com/google/gofuzz v1.2.0 // indirect
6767
github.com/google/uuid v1.2.0 // indirect
6868
github.com/googleapis/gnostic v0.5.5 // indirect
6969
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
7070
github.com/hashicorp/go-retryablehttp v0.6.8 // indirect
71-
github.com/huandu/xstrings v1.3.1 // indirect
71+
github.com/huandu/xstrings v1.3.2 // indirect
7272
github.com/imdario/mergo v0.3.12 // indirect
7373
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
7474
github.com/josharian/intern v1.0.0 // indirect
75-
github.com/json-iterator/go v1.1.11 // indirect
75+
github.com/json-iterator/go v1.1.12 // indirect
7676
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
7777
github.com/mailru/easyjson v0.7.6 // indirect
7878
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
@@ -81,14 +81,14 @@ require (
8181
github.com/mitchellh/mapstructure v1.4.1 // indirect
8282
github.com/mitchellh/reflectwalk v1.0.1 // indirect
8383
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
84-
github.com/modern-go/reflect2 v1.0.1 // indirect
84+
github.com/modern-go/reflect2 v1.0.2 // indirect
8585
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
8686
github.com/nxadm/tail v1.4.8 // indirect
8787
github.com/pkg/errors v0.9.1 // indirect
8888
github.com/pmezard/go-difflib v1.0.0 // indirect
8989
github.com/prometheus/client_golang v1.11.0 // indirect
9090
github.com/prometheus/client_model v0.2.0 // indirect
91-
github.com/prometheus/common v0.26.0 // indirect
91+
github.com/prometheus/common v0.28.0 // indirect
9292
github.com/prometheus/procfs v0.6.0 // indirect
9393
github.com/satori/go.uuid v1.2.0 // indirect
9494
github.com/sergi/go-diff v1.1.0 // indirect
@@ -100,12 +100,12 @@ require (
100100
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
101101
go.uber.org/atomic v1.7.0 // indirect
102102
go.uber.org/multierr v1.6.0 // indirect
103-
go.uber.org/zap v1.19.0 // indirect
104-
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
105-
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
103+
go.uber.org/zap v1.19.1 // indirect
104+
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
105+
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9 // indirect
106106
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
107-
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect
108-
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
107+
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
108+
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
109109
golang.org/x/text v0.3.7 // indirect
110110
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
111111
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
@@ -116,15 +116,14 @@ require (
116116
gopkg.in/warnings.v0 v0.1.2 // indirect
117117
gopkg.in/yaml.v2 v2.4.0 // indirect
118118
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
119-
k8s.io/apiextensions-apiserver v0.22.2 // indirect
120-
k8s.io/component-base v0.22.2 // indirect
121-
k8s.io/klog/v2 v2.9.0 // indirect
122-
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect
123-
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
124-
sigs.k8s.io/yaml v1.2.0 // indirect
119+
k8s.io/apiextensions-apiserver v0.23.0 // indirect
120+
k8s.io/component-base v0.23.0 // indirect
121+
k8s.io/klog/v2 v2.30.0 // indirect
122+
k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 // indirect
123+
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
124+
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
125+
sigs.k8s.io/yaml v1.3.0 // indirect
125126
)
126127

127-
// Side-effect of depending on source-controller;
128-
// required by https://github.com/helm/helm/blob/v3.6.3/go.mod,
129-
// but overwritten with a newer version due to CVE-2017-11468.
130-
replace github.com/docker/distribution => github.com/docker/distribution v2.7.0-rc.0+incompatible
128+
// pink kyaml to prevent indent changes
129+
replace sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.10.21

0 commit comments

Comments
 (0)