File tree Expand file tree Collapse file tree 8 files changed +10
-67
lines changed Expand file tree Collapse file tree 8 files changed +10
-67
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,6 @@ type Source interface {
1414 GetInterval () metav1.Duration
1515}
1616
17- const (
18- // ReconcileAtAnnotation is the annotation used for triggering a
19- // reconciliation outside of the defined schedule.
20- ReconcileAtAnnotation string = "fluxcd.io/reconcileAt"
21- )
22-
2317// filterOutSourceCondition returns a new SourceCondition slice without the
2418// SourceCondition of the given type.
2519func filterOutSourceCondition (conditions []SourceCondition , condition string ) []SourceCondition {
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import (
3838 "sigs.k8s.io/controller-runtime/pkg/controller"
3939
4040 "github.com/fluxcd/pkg/recorder"
41+ "github.com/fluxcd/pkg/runtime/predicates"
4142
4243 sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
4344 "github.com/fluxcd/source-controller/pkg/git"
@@ -158,7 +159,7 @@ func (r *GitRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error {
158159func (r * GitRepositoryReconciler ) SetupWithManagerAndOptions (mgr ctrl.Manager , opts GitRepositoryReconcilerOptions ) error {
159160 return ctrl .NewControllerManagedBy (mgr ).
160161 For (& sourcev1.GitRepository {}).
161- WithEventFilter (SourceChangePredicate {}).
162+ WithEventFilter (predicates. ChangePredicate {}).
162163 WithOptions (controller.Options {MaxConcurrentReconciles : opts .MaxConcurrentReconciles }).
163164 Complete (r )
164165}
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ import (
4141 "sigs.k8s.io/controller-runtime/pkg/controller"
4242
4343 "github.com/fluxcd/pkg/recorder"
44+ "github.com/fluxcd/pkg/runtime/predicates"
4445 "github.com/fluxcd/pkg/untar"
4546
4647 sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
@@ -181,7 +182,7 @@ func (r *HelmChartReconciler) SetupWithManager(mgr ctrl.Manager) error {
181182func (r * HelmChartReconciler ) SetupWithManagerAndOptions (mgr ctrl.Manager , opts HelmChartReconcilerOptions ) error {
182183 return ctrl .NewControllerManagedBy (mgr ).
183184 For (& sourcev1.HelmChart {}).
184- WithEventFilter (SourceChangePredicate {}).
185+ WithEventFilter (predicates. ChangePredicate {}).
185186 WithOptions (controller.Options {MaxConcurrentReconciles : opts .MaxConcurrentReconciles }).
186187 Complete (r )
187188}
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import (
4040 "sigs.k8s.io/yaml"
4141
4242 "github.com/fluxcd/pkg/recorder"
43+ "github.com/fluxcd/pkg/runtime/predicates"
4344 sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
4445 "github.com/fluxcd/source-controller/internal/helm"
4546)
@@ -160,7 +161,7 @@ func (r *HelmRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error {
160161func (r * HelmRepositoryReconciler ) SetupWithManagerAndOptions (mgr ctrl.Manager , opts HelmRepositoryReconcilerOptions ) error {
161162 return ctrl .NewControllerManagedBy (mgr ).
162163 For (& sourcev1.HelmRepository {}).
163- WithEventFilter (SourceChangePredicate {}).
164+ WithEventFilter (predicates. ChangePredicate {}).
164165 WithOptions (controller.Options {MaxConcurrentReconciles : opts .MaxConcurrentReconciles }).
165166 Complete (r )
166167}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ require (
99 github.com/fluxcd/pkg/gittestserver v0.0.2
1010 github.com/fluxcd/pkg/helmtestserver v0.0.1
1111 github.com/fluxcd/pkg/lockedfile v0.0.5
12- github.com/fluxcd/pkg/logger v0.0.1
1312 github.com/fluxcd/pkg/recorder v0.0.6
13+ github.com/fluxcd/pkg/runtime v0.0.0-20200909163337-e7e634246495
1414 github.com/fluxcd/pkg/ssh v0.0.5
1515 github.com/fluxcd/pkg/untar v0.0.5
1616 github.com/fluxcd/source-controller/api v0.0.14
Original file line number Diff line number Diff line change @@ -208,10 +208,10 @@ github.com/fluxcd/pkg/helmtestserver v0.0.1 h1:8RcLZdg7Zr9ZqyijsIIASjjMXQtF4UWP4
208208github.com/fluxcd/pkg/helmtestserver v0.0.1 /go.mod h1:GR8LriiU7PqZSTH4Xe6Cimpig2VVPB29PeUXJjNJYfA =
209209github.com/fluxcd/pkg/lockedfile v0.0.5 h1:C3T8wfdff1UY1bvplmCkGOLrdMWJHO8Q8+tdlEXJYzQ =
210210github.com/fluxcd/pkg/lockedfile v0.0.5 /go.mod h1:uAtPUBId6a2RqO84MTH5HKGX0SbM1kNW3Wr/FhYyDVA =
211- github.com/fluxcd/pkg/logger v0.0.1 h1:YInMzE4w+crIHQcUI4uLgFI0J+D0IVb8+pgYrseAYNY =
212- github.com/fluxcd/pkg/logger v0.0.1 /go.mod h1:Qg+nqSAmY6OyO9JAIfQr0J2LjNu++M1Sm7KcZVLnjDM =
213211github.com/fluxcd/pkg/recorder v0.0.6 h1:me/n8syeeGXz50OXoPX3jgIj9AtinvhHdKT9Dy+MbHs =
214212github.com/fluxcd/pkg/recorder v0.0.6 /go.mod h1:IfQxfVRSNsWs3B0Yp5B6ObEWwKHILlAx8N7XkoDdhFg =
213+ github.com/fluxcd/pkg/runtime v0.0.0-20200909163337-e7e634246495 h1:zhtLz8iRtJWK+jKq9vi9Si4QbcAC2KvQZpQ55DRzLsU =
214+ github.com/fluxcd/pkg/runtime v0.0.0-20200909163337-e7e634246495 /go.mod h1:cU1t0+Ld39pZjMyrrHukw1E++OZFNHxG2qAExfDWQ34 =
215215github.com/fluxcd/pkg/ssh v0.0.5 h1:rnbFZ7voy2JBlUfMbfyqArX2FYaLNpDhccGFC3qW83A =
216216github.com/fluxcd/pkg/ssh v0.0.5 /go.mod h1:7jXPdXZpc0ttMNz2kD9QuMi3RNn/e0DOFbj0Tij/+Hs =
217217github.com/fluxcd/pkg/testserver v0.0.2 h1:SoaMtO9cE5p/wl2zkGudzflnEHd9mk68CGjZOo7w0Uk =
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ import (
3333 _ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
3434 ctrl "sigs.k8s.io/controller-runtime"
3535
36- "github.com/fluxcd/pkg/logger"
3736 "github.com/fluxcd/pkg/recorder"
37+ "github.com/fluxcd/pkg/runtime/logger"
3838 sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
3939 "github.com/fluxcd/source-controller/controllers"
4040 // +kubebuilder:scaffold:imports
You can’t perform that action at this time.
0 commit comments