Skip to content

Commit b477df3

Browse files
author
Paulo Gomes
authored
Merge pull request #337 from pjbgf/update-sc-v0.22.4
Update source-controller to v0.22.4
2 parents c8b0907 + 859a6ca commit b477df3

File tree

6 files changed

+70
-20
lines changed

6 files changed

+70
-20
lines changed

ATTRIBUTIONS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,46 @@ worldwide. This software is distributed without any warranty.
12151215

12161216
See <http://creativecommons.org/publicdomain/zero/1.0/>.
12171217

1218+
----------------------------------------------------------------------
1219+
1220+
The built-in SHA256 support (src/hash/rfc6234) is taken from RFC 6234
1221+
under the following license:
1222+
1223+
Copyright (c) 2011 IETF Trust and the persons identified as
1224+
authors of the code. All rights reserved.
1225+
1226+
Redistribution and use in source and binary forms, with or
1227+
without modification, are permitted provided that the following
1228+
conditions are met:
1229+
1230+
- Redistributions of source code must retain the above
1231+
copyright notice, this list of conditions and
1232+
the following disclaimer.
1233+
1234+
- Redistributions in binary form must reproduce the above
1235+
copyright notice, this list of conditions and the following
1236+
disclaimer in the documentation and/or other materials provided
1237+
with the distribution.
1238+
1239+
- Neither the name of Internet Society, IETF or IETF Trust, nor
1240+
the names of specific contributors, may be used to endorse or
1241+
promote products derived from this software without specific
1242+
prior written permission.
1243+
1244+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
1245+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1246+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1247+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1248+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
1249+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1250+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1251+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1252+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1253+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1254+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1255+
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
1256+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1257+
12181258
***
12191259

12201260
## zlib

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ 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.22.2
24+
SOURCE_VER ?= v0.22.4
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.

controllers/imageupdateautomation_controller.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -729,11 +729,6 @@ var errRemoteBranchMissing = errors.New("remote branch missing")
729729
// switchToBranch switches to a branch after fetching latest from upstream.
730730
// If the branch does not exist, it is created using the head as the starting point.
731731
func switchToBranch(repo *libgit2.Repository, ctx context.Context, branch string, access repoAccess) error {
732-
checkoutOpts := &libgit2.CheckoutOpts{
733-
// the remote branch should take precedence if it exists at this point in time.
734-
Strategy: libgit2.CheckoutForce,
735-
}
736-
737732
branchRef := fmt.Sprintf("origin/%s", branch)
738733
remoteBranch, err := repo.LookupBranch(branchRef, libgit2.BranchRemote)
739734
if err != nil && !libgit2.IsErrorCode(err, libgit2.ErrorCodeNotFound) {
@@ -754,6 +749,7 @@ func switchToBranch(repo *libgit2.Repository, ctx context.Context, branch string
754749
if err != nil {
755750
return fmt.Errorf("cannot get repo head: %w", err)
756751
}
752+
defer head.Free()
757753
commit, err = repo.LookupCommit(head.Target())
758754
}
759755
if err != nil {
@@ -779,7 +775,10 @@ func switchToBranch(repo *libgit2.Repository, ctx context.Context, branch string
779775
}
780776
defer tree.Free()
781777

782-
err = repo.CheckoutTree(tree, checkoutOpts)
778+
err = repo.CheckoutTree(tree, &libgit2.CheckoutOpts{
779+
// the remote branch should take precedence if it exists at this point in time.
780+
Strategy: libgit2.CheckoutForce,
781+
})
783782
if err != nil {
784783
return fmt.Errorf("cannot checkout tree for branch '%s': %w", branch, err)
785784
}

go.mod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ require (
1717
github.com/fluxcd/pkg/runtime v0.13.2
1818
github.com/fluxcd/pkg/ssh v0.3.2
1919
// If you bump this, change SOURCE_VER in the Makefile to match
20-
github.com/fluxcd/source-controller v0.22.2
21-
github.com/fluxcd/source-controller/api v0.22.2
20+
github.com/fluxcd/source-controller v0.22.4
21+
github.com/fluxcd/source-controller/api v0.22.4
2222
github.com/go-logr/logr v1.2.2
2323
github.com/google/go-containerregistry v0.6.0
2424
github.com/libgit2/git2go/v33 v33.0.9
@@ -77,7 +77,7 @@ require (
7777
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
7878
github.com/mitchellh/copystructure v1.2.0 // indirect
7979
github.com/mitchellh/go-homedir v1.1.0 // indirect
80-
github.com/mitchellh/mapstructure v1.4.1 // indirect
80+
github.com/mitchellh/mapstructure v1.4.3 // indirect
8181
github.com/mitchellh/reflectwalk v1.0.2 // indirect
8282
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
8383
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -99,7 +99,7 @@ require (
9999
go.uber.org/atomic v1.7.0 // indirect
100100
go.uber.org/multierr v1.6.0 // indirect
101101
go.uber.org/zap v1.21.0 // indirect
102-
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
102+
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064
103103
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
104104
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect
105105
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 // indirect
@@ -126,4 +126,5 @@ require (
126126
require (
127127
cloud.google.com/go/compute v1.5.0 // indirect
128128
github.com/gofrs/uuid v4.2.0+incompatible // indirect
129+
github.com/hashicorp/go-hclog v1.0.0 // indirect
129130
)

go.sum

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQL
333333
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
334334
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
335335
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
336+
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
336337
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
337338
github.com/fluxcd/image-reflector-controller/api v0.17.1 h1:0eWE26PmCo3ZQBnDkNA6wiHhAEsTtUG4oz59enqIzsQ=
338339
github.com/fluxcd/image-reflector-controller/api v0.17.1/go.mod h1:Lg8A+MUcke0Orp6C6UQkf9I3pc8M/B3XS3TOI+YxVBY=
@@ -350,10 +351,10 @@ github.com/fluxcd/pkg/ssh v0.3.2 h1:HZlDF6Qu4yplsU4Tisv6hxsRIbIOwwr7rKus8/Q/Dn0=
350351
github.com/fluxcd/pkg/ssh v0.3.2/go.mod h1:OVnuv9y2WCx7AoOIid0sxqe9lLKKfDS4PMl+4ta5DIo=
351352
github.com/fluxcd/pkg/version v0.1.0 h1:v+SmCanmCB5Tj2Cx9TXlj+kNRfPGbAvirkeqsp7ZEAQ=
352353
github.com/fluxcd/pkg/version v0.1.0/go.mod h1:V7Z/w8dxLQzv0FHqa5ox5TeyOd2zOd49EeuWFgnwyj4=
353-
github.com/fluxcd/source-controller v0.22.2 h1:QXcSUa00MbWyYGK9u73XoB+1NNCWfyq4K9jCaKCAImg=
354-
github.com/fluxcd/source-controller v0.22.2/go.mod h1:tRMBtlpZilTDJBv0cleqNpUCqnteKsbYwpjktlaNMqo=
355-
github.com/fluxcd/source-controller/api v0.22.2 h1:1TSCa4qLKDstPpXQoaz5xiLER2y8xflpCXKPxYPFGPY=
356-
github.com/fluxcd/source-controller/api v0.22.2/go.mod h1:Vb13q9Pq+1IW/sJUZn/RSb7IU5WT86Er6uCFPCFm9L4=
354+
github.com/fluxcd/source-controller v0.22.4 h1:po9/m1iYz0AJiWHVEMXZKIPNDH2sJ5jjnq29tCRiavA=
355+
github.com/fluxcd/source-controller v0.22.4/go.mod h1:ftvkkujK8yIZi1ObrtT/poRR3jmckUkzK5LpyqVudNY=
356+
github.com/fluxcd/source-controller/api v0.22.4 h1:PJuZg6/9UN0GLhe2Mt8DJBNuC/t1BHvZAg79k7xPDcQ=
357+
github.com/fluxcd/source-controller/api v0.22.4/go.mod h1:Vb13q9Pq+1IW/sJUZn/RSb7IU5WT86Er6uCFPCFm9L4=
357358
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
358359
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
359360
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
@@ -551,8 +552,9 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv
551552
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
552553
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
553554
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
554-
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
555555
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
556+
github.com/hashicorp/go-hclog v1.0.0 h1:bkKf0BeBXcSYa7f5Fyi9gMuQ8gNsxeiNpZjR6VxNZeo=
557+
github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
556558
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
557559
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
558560
github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
@@ -647,8 +649,13 @@ github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHef
647649
github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
648650
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
649651
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
652+
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
653+
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
650654
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
651655
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
656+
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
657+
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
658+
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
652659
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
653660
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
654661
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
@@ -669,8 +676,9 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4
669676
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
670677
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
671678
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
672-
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
673679
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
680+
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
681+
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
674682
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
675683
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
676684
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
@@ -990,8 +998,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
990998
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
991999
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
9921000
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
993-
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38=
994-
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
1001+
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 h1:S25/rfnfsMVgORT4/J61MJ7rdyseOZOyvLIrZEZ7s6s=
1002+
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
9951003
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
9961004
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
9971005
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1125,6 +1133,7 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h
11251133
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
11261134
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
11271135
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
1136+
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
11281137
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
11291138
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
11301139
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1146,6 +1155,7 @@ golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7w
11461155
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
11471156
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
11481157
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1158+
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
11491159
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
11501160
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
11511161
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func main() {
140140
// +kubebuilder:scaffold:builder
141141

142142
if managed.Enabled() {
143-
managed.InitManagedTransport()
143+
managed.InitManagedTransport(ctrl.Log.WithName("managed-transport"))
144144
}
145145

146146
setupLog.Info("starting manager")

0 commit comments

Comments
 (0)