File tree 2 files changed +8
-0
lines changed 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ import (
53
53
"github.com/fluxcd/source-controller/internal/cache"
54
54
"github.com/fluxcd/source-controller/internal/features"
55
55
"github.com/fluxcd/source-controller/internal/helm/registry"
56
+ "github.com/fluxcd/source-controller/internal/helm/repository"
56
57
"github.com/fluxcd/source-controller/pkg/git/libgit2/managed"
57
58
// +kubebuilder:scaffold:imports
58
59
)
@@ -106,6 +107,7 @@ var (
106
107
var (
107
108
testRegistryServer * registryClientTestServer
108
109
testCache * cache.Cache
110
+ testRepoRecorder * repository.Recorder
109
111
)
110
112
111
113
func init () {
@@ -263,6 +265,7 @@ func TestMain(m *testing.M) {
263
265
264
266
testCache = cache .New (5 , 1 * time .Second )
265
267
cacheRecorder := cache .MustMakeMetrics ()
268
+ testRepoRecorder = repository .MustMakeMetrics ()
266
269
267
270
if err := (& OCIRepositoryReconciler {
268
271
Client : testEnv ,
@@ -282,6 +285,7 @@ func TestMain(m *testing.M) {
282
285
Cache : testCache ,
283
286
TTL : 1 * time .Second ,
284
287
CacheRecorder : cacheRecorder ,
288
+ RepoRecorder : testRepoRecorder ,
285
289
}).SetupWithManager (testEnv ); err != nil {
286
290
panic (fmt .Sprintf ("Failed to start HelmRepositoryReconciler: %v" , err ))
287
291
}
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package main
18
18
19
19
import (
20
20
"fmt"
21
+ "github.com/fluxcd/source-controller/internal/helm/repository"
21
22
"net"
22
23
"net/http"
23
24
"os"
@@ -225,6 +226,8 @@ func main() {
225
226
os .Exit (1 )
226
227
}
227
228
229
+ repoRecorder := repository .MustMakeMetrics ()
230
+
228
231
if err = (& controllers.HelmRepositoryOCIReconciler {
229
232
Client : mgr .GetClient (),
230
233
EventRecorder : eventRecorder ,
@@ -270,6 +273,7 @@ func main() {
270
273
Cache : c ,
271
274
TTL : ttl ,
272
275
CacheRecorder : cacheRecorder ,
276
+ RepoRecorder : repoRecorder ,
273
277
}).SetupWithManagerAndOptions (mgr , controllers.HelmRepositoryReconcilerOptions {
274
278
MaxConcurrentReconciles : concurrent ,
275
279
RateLimiter : helper .GetRateLimiter (rateLimiterOptions ),
You can’t perform that action at this time.
0 commit comments