@Override
    public void validate(Context context) {
        var zone = context.deployState().zone();
        var featureFlags = context.deployState().featureFlags();
        var exclusivity = new Exclusivity(zone, featureFlags.sharedHosts());
        var tuning = new CapacityPolicies.Tuning(featureFlags.adminClusterArchitecture(),
                                                 featureFlags.logserverNodeMemory(),
                                                 featureFlags.clusterControllerNodeMemory());
        var capacityPolicies = new CapacityPolicies(zone, exclusivity, context.model().applicationPackage().getApplicationId(),
                                                    tuning);
        var quota = context.deployState().getProperties().quota();
        quota.maxClusterSize().ifPresent(maxClusterSize -> validateMaxClusterSize(maxClusterSize, context.model()));
        quota.budgetAsDecimal().ifPresent(budget -> validateBudget(budget, context, capacityPolicies));
    }
Checks that the generated model does not have resources that exceeds the given quota.

@author ogronnesby
config-model/src/main/java/com/yahoo/vespa/model/application/validation/QuotaValidator.java