@Override
    public void validate(Context context) {
        // Allow the internally defined tenant owning all infrastructure applications
        if (TenantName.from("hosted-vespa").equals(context.model().applicationPackage().getApplicationId().tenant())) return;
        ConfigModelContext.ApplicationType applicationType = context.model().getAdmin().getApplicationType();
        if (applicationType != ConfigModelContext.ApplicationType.DEFAULT) {
            log.warning("Tenant %s is not allowed to use application type %s".formatted(context.model().applicationPackage().getApplicationId().toFullString(), applicationType));
            context.illegal("Tenant is not allowed to override application type");
        }
    }
Validator to check that only infrastructure tenant can use non-default application-type

@author mortent
config-model/src/main/java/com/yahoo/vespa/model/application/validation/InfrastructureDeploymentValidator.java