Allow cross-shard dependency check
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
aabb41fc5d
commit
2b44187c23
|
|
@ -89,6 +89,7 @@ type KustomizationReconciler struct {
|
|||
artifactFetchRetries int
|
||||
requeueDependency time.Duration
|
||||
|
||||
APIReader client.Reader
|
||||
StatusPoller *polling.StatusPoller
|
||||
PollingOpts polling.Options
|
||||
ControllerName string
|
||||
|
|
@ -488,7 +489,7 @@ func (r *KustomizationReconciler) checkDependencies(ctx context.Context,
|
|||
Name: d.Name,
|
||||
}
|
||||
var k kustomizev1.Kustomization
|
||||
err := r.Get(ctx, dName, &k)
|
||||
err := r.APIReader.Get(ctx, dName, &k)
|
||||
if err != nil {
|
||||
return fmt.Errorf("dependency '%s' not found: %w", dName, err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ func TestMain(m *testing.M) {
|
|||
reconciler = &KustomizationReconciler{
|
||||
ControllerName: controllerName,
|
||||
Client: testEnv,
|
||||
APIReader: testEnv,
|
||||
EventRecorder: testEnv.GetEventRecorderFor(controllerName),
|
||||
Metrics: testMetricsH,
|
||||
ConcurrentSSA: 4,
|
||||
|
|
|
|||
Loading…
Reference in New Issue