Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace github.com/fluxcd/image-reflector-controller/api => ./api
require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6
github.com/Masterminds/semver/v3 v3.4.0
github.com/dgraph-io/badger/v3 v3.2103.5
github.com/dgraph-io/badger/v4 v4.8.0
github.com/elazarl/goproxy v1.7.2
github.com/fluxcd/image-reflector-controller/api v0.35.2
github.com/fluxcd/pkg/apis/acl v0.9.0
Expand Down Expand Up @@ -62,12 +62,11 @@ require (
github.com/aws/smithy-go v1.23.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chai2010/gettext-go v1.0.3 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgraph-io/ristretto v0.2.0 // indirect
github.com/dgraph-io/ristretto/v2 v2.2.0 // indirect
github.com/docker/cli v28.2.2+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
Expand All @@ -88,9 +87,6 @@ require (
github.com/go-openapi/swag v0.23.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/flatbuffers v25.2.10+incompatible // indirect
github.com/google/gnostic-models v0.7.0 // indirect
Expand Down Expand Up @@ -138,7 +134,6 @@ require (
github.com/vbatts/tar-split v0.12.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
Expand Down
119 changes: 6 additions & 113 deletions go.sum
Copy link
Member

Choose a reason for hiding this comment

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

Nice cleanup

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/controller/controllers_fuzzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (

"go.uber.org/zap/zapcore"

"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v4"
. "github.com/onsi/ginkgo"

"k8s.io/apimachinery/pkg/types"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v4"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/record"
Expand Down
2 changes: 1 addition & 1 deletion internal/database/badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"hash/adler32"

"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v4"
)

const tagsPrefix = "tags"
Expand Down
2 changes: 1 addition & 1 deletion internal/database/badger_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"errors"
"time"

"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v4"
"github.com/go-logr/logr"
ctrl "sigs.k8s.io/controller-runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/database/badger_gc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v4"
"github.com/go-logr/logr"
"github.com/go-logr/logr/testr"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/database/badger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"reflect"
"testing"

"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v4"
)

const testRepo = "testing/testing"
Expand Down
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"time"

"github.com/dgraph-io/badger/v3"
"github.com/dgraph-io/badger/v4"
flag "github.com/spf13/pflag"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -233,7 +233,11 @@ func main() {
}

if badgerGC != nil {
mgr.Add(badgerGC)
err := mgr.Add(badgerGC)
Copy link
Member

Choose a reason for hiding this comment

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

Wow I didn't know you could add runnable things to controller-runtime's Manager :o

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, the first try at the GC was a mess of signal handlers and channels -- was delighted to find this 😮‍💨

if err != nil {
setupLog.Error(err, "unable to add GC to manager")
os.Exit(1)
}
}

probes.SetupChecks(mgr, setupLog)
Expand Down