You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: The `--set prometheus.url=http://prometheus-prometheus-oper-prometheus.default.svc` parameter tells the adapter
425
-
how to connect to Prometheus.
426
-
The Prometheus Operator creates a `Service` named `prometheus-prometheus-oper-prometheus` to expose Prometheus.
427
-
In this case it assumes Prometheus is in the `default` namespace. If you installed Prometheus into a different
428
-
namespace change the `default` part of `prometheus-prometheus-oper-prometheus.default.svc` to the actual namespace name.
429
-
430
441
431
442
==== Query Custom Metrics
432
443
@@ -487,7 +498,7 @@ NOTE: The format of the `value` field above might look a little strange. This is
487
498
format, in this case it is `1300m` where the `m` stand for millis. So in this case 1300 millis is 1.3% heap usage.
488
499
This is to get around the poor support in yaml and json for accurate floating-point numbers.
489
500
490
-
In our case for autoscaling we are interested in the maximum heap for a specific `Coherence` resource.
501
+
In our case for auto-scaling we are interested in the maximum heap for a specific `Coherence` resource.
491
502
Remember in the Prometheus Adapter configuration we configured the `role` metric tag to map to
492
503
`coherences.coherence.oracle.com` resources.
493
504
We also configured a query that will give back the maximum heap usage value for a query.
@@ -582,11 +593,18 @@ The `describedObject` section describes the resource to query, in this case kind
582
593
583
594
<5> The `target` section describes the target value for the metric, in this case 80 thousand millis - which is 80%.
584
595
585
-
<6> The `behavior` section sets a window of 120 seconds so that the HAP will wait at least 120 seconds after scaling up or down before re-evaluating the metric. This gives Coherence enough time to scale the deployment and for the data to redistribute
596
+
<6> The `behavior` section sets a window of 120 seconds so that the HAP will wait at least 120 seconds after scaling up
597
+
or down before re-evaluating the metric. This gives Coherence enough time to scale the deployment and for the data to redistribute
586
598
and gc to occur. In real life this value would need to be adjusted to work correctly on your actual cluster.
587
599
588
600
The autoscaler example contains yaml to create the `HorizontalPodAutoscaler` resource in the `manifests/` directory.
589
601
602
+
WARNING: If using a version of Kubernetes prior to 1.18 the `behaviour` secion of the yaml above is invalid and should be
603
+
removed. This could cause the HPA not to work the way we want it to as there will be no cool-down period specified
604
+
between scaling operations, and the HPA could thrash or suddenly scale up or down by a lot of Pods.
605
+
The only way to set these values prior to 1.18 was for the HPA as a whole
606
+
(see the documentation https://v1-17.docs.kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-cooldown-delay[support for cooldown delay]).
0 commit comments