private NodeResources defaultResources(ClusterSpec clusterSpec) {
        var adminClusterArchitecture = tuning.adminClusterArchitecture();
        if (clusterSpec.type() == ClusterSpec.Type.admin) {
            if (exclusivity.allocation(clusterSpec)) {
                return smallestExclusiveResources().with(adminClusterArchitecture);
            }

            if (clusterSpec.id().value().equals("cluster-controllers")) {
                return clusterControllerResources(clusterSpec, adminClusterArchitecture).with(adminClusterArchitecture);
            }

            if (clusterSpec.id().value().equals("logserver")) {
                return logserverResources(adminClusterArchitecture).with(adminClusterArchitecture);
            }

            return versioned(clusterSpec, Map.of(new Version(0), smallestSharedResources())).with(adminClusterArchitecture);
        }

        if (clusterSpec.type() == ClusterSpec.Type.content) {
            // When changing defaults here update https://docs.vespa.ai/en/reference/services.html#resources
            return zone.cloud().dynamicProvisioning()
                   ? versioned(clusterSpec, Map.of(new Version(0), new NodeResources(2, 16, 300, 0.3)))
                   : versioned(clusterSpec, Map.of(new Version(0), new NodeResources(1.5, 8, 50, 0.3)));
        }
        else {
            // When changing defaults here update https://docs.vespa.ai/en/reference/services.html#resources
            return zone.cloud().dynamicProvisioning()
                   ? versioned(clusterSpec, Map.of(new Version(0), new NodeResources(2.0, 8, 50, 0.3)))
                   : versioned(clusterSpec, Map.of(new Version(0), new NodeResources(1.5, 8, 50, 0.3)));
        }
    }
Defines the policies for assigning cluster capacity in various environments.

@author bratseth
config-provisioning/src/main/java/com/yahoo/config/provision/CapacityPolicies.java