Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* This enricher must be applied to the {@link DockerInfrastructure} entity, and is normally created during the
* entity {@link AbstractEntity#init() initialisation} along with an {@link AutoScalerPolicy}. Notifications
* are fed into the policy, which resizes the child Docker host cluster. Workrates for the policy are calculated
* as resource utilisation percentages, based on the configured maximum number of containers per host. This is
* obtained from the {@link MaxContainersPlacementStrategy} or through the
* {@link MaxContainersPlacementStrategy#DOCKER_CONTAINER_CLUSTER_MAX_SIZE maxContainers} configuration on the
* infrastructure entity. Workrate thresholds are calculated based on cluster utilisation with the specific headroom
* available, and the cluster will be resized as appropriate.
*/
public class ContainerHeadroomEnricher extends AbstractEnricher {
private static final Logger LOG = LoggerFactory.getLogger(ContainerHeadroomEnricher.class);
@SetFromFlag("headroom")
public static final ConfigKey CONTAINER_HEADROOM = ConfigKeys.newIntegerConfigKey(
"docker.container.cluster.headroom.count", "Required headroom (number of free containers) for the Docker cluster");
@SetFromFlag("headroomPercent")
public static final ConfigKey CONTAINER_HEADROOM_PERCENTAGE = ConfigKeys.newDoubleConfigKey(
"docker.container.cluster.headroom.percent", "Required headroom (percentage free containers) for the Docker cluster");
public static final AttributeSensor CONTAINERS_NEEDED = Sensors.newIntegerSensor(
"docker.container.cluster.needed", "Number of containers needed to give requierd headroom");
public static final AttributeSensor DOCKER_CONTAINER_UTILISATION = Sensors.newDoubleSensor(
"docker.container.cluster.utilisation", "Resource utilisation of Docker container cluster");
public static final BasicNotificationSensor