Use flag source ref from node repo
@@ -56,7 +56,6 @@ public class NodeRepositoryProvisioner implements Provisioner {
private final AllocationOptimizer allocationOptimizer;
private final CapacityPolicies capacityPolicies;
private final Zone zone;
- private FlagSource flagSource;
private final Preparer preparer;
private final Activator activator;
private final Optional<LoadBalancerProvisioner> loadBalancerProvisioner;
@@ -71,7 +70,6 @@ public class NodeRepositoryProvisioner implements Provisioner {
this.allocationOptimizer = new AllocationOptimizer(nodeRepository);
this.capacityPolicies = new CapacityPolicies(nodeRepository);
this.zone = zone;
- this.flagSource = flagSource;
this.loadBalancerProvisioner = provisionServiceProvider.getLoadBalancerService(nodeRepository)
.map(lbService -> new LoadBalancerProvisioner(nodeRepository, lbService));
this.nodeResourceLimits = new NodeResourceLimits(nodeRepository);
@@ -118,7 +116,9 @@ public class NodeRepositoryProvisioner implements Provisioner {
: requested.minResources().nodeResources();
nodeSpec = NodeSpec.from(requested.type());
}
- var reuseIndexes = Flags.REUSE_NODE_INDEXES.bindTo(flagSource).with(FetchVector.Dimension.ZONE_ID, zone.systemLocalValue()).value();
+ var reuseIndexes = Flags.REUSE_NODE_INDEXES.bindTo(nodeRepository.flagSource())
+ .with(FetchVector.Dimension.ZONE_ID, zone.systemLocalValue())
+ .value();
return asSortedHosts(preparer.prepare(application, cluster, nodeSpec, groups, reuseIndexes), resources);
}
