Metadata-Version: 2.5
Name: tutor-contrib-k8s
Version: 22.7.0
Summary: Helper plugin for Kubernetes deployments of Open edX
Project-URL: Code, https://github.com/aulasneo/tutor-contrib-k8s
Project-URL: Issues, https://github.com/aulasneo/tutor-contrib-k8s/issues
Author-email: Aulasneo <andres@aulasneo.com>
License: AGPLv3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: tutor<23.0.0,>=22.0.2
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: build; extra == 'dev'
Requires-Dist: isort; extra == 'dev'
Requires-Dist: jinja2; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pkginfo>=1.12.0; extra == 'dev'
Requires-Dist: pylint; extra == 'dev'
Requires-Dist: pyyaml; extra == 'dev'
Requires-Dist: twine>=7.0.0; extra == 'dev'
Description-Content-Type: text/x-rst

k8s plugin for `Tutor <https://docs.tutor.edly.io>`__
#####################################################

Helper plugin for Kubernetes deployments of Open edX. It extends Tutor's K8s
environment with deployment patches and configuration knobs for autoscaling and
resource sizing of LMS, CMS, their workers, MFEs, and Caddy.

This release targets Open edX Verawood with Tutor 22.x.

What it does
************

- Adds Kubernetes patch templates that tweak deployments, HPAs, and resource
  requests/limits for Tutor services.
- Adds opt-in KEDA autoscaling for request-serving workloads using Caddy
  in-flight requests and for Celery workers using Redis queue depth. LMS and CMS use
  an existing Prometheus endpoint for time-averaged concurrency.
- Exposes ``K8S_*`` configuration settings so you can tune replicas, HPA
  behavior, and resources without editing manifests by hand.
- Includes PodDisruptionBudget resources for core services with configurable
  availability thresholds. Each PDB can be toggled with the
  ``K8S_*_PDB_ENABLE`` settings.
- Adds VerticalPodAutoscaler templates for core services with configurable
  update mode, min/max allowed resources, and controlled resources.
- Adds startup, readiness, and liveness probes to the LMS and CMS deployments.
  Startup probes call ``/heartbeat`` with their internal ``Host`` headers.
  Readiness and liveness use TCP checks by default, so a stall in a shared
  dependency cannot eject or restart every replica at once.


Installation
************

From Github:

.. code-block:: bash

    pip install git+https://github.com/aulasneo/tutor-contrib-k8s.git

From PyPI:

.. code-block:: bash

    pip install tutor-contrib-k8s

Install KEDA in the cluster
===========================

KEDA is a cluster-level prerequisite for the event-driven autoscaling features;
this Tutor plugin does not install it. Install KEDA once per Kubernetes cluster,
not once per Tutor site. The account running Helm must be allowed to create
cluster-wide CRDs, RBAC resources, and an APIService. KEDA 2.20 requires
Kubernetes 1.30 or newer.

First confirm that ``kubectl`` points to the intended cluster, then install the
KEDA 2.20 Helm chart in its dedicated namespace:

.. code-block:: bash

    kubectl config current-context
    helm repo add kedacore https://kedacore.github.io/charts
    helm repo update
    helm upgrade --install keda kedacore/keda \
      --namespace keda \
      --create-namespace \
      --version 2.20.0 \
      --wait

Verify that its deployments are available and that the required CRDs and
external metrics API are registered before enabling any ``K8S_*_KEDA_ENABLE``
setting:

.. code-block:: bash

    kubectl wait --namespace keda \
      --for=condition=Available deployment --all --timeout=180s
    kubectl get pods --namespace keda
    kubectl get crd scaledobjects.keda.sh triggerauthentications.keda.sh
    kubectl get apiservice v1beta1.external.metrics.k8s.io

The plugin requires KEDA 2.20 or newer because it uses Metrics API endpoint
aggregation. To upgrade an existing Helm installation, run the same
``helm upgrade --install`` command with a supported newer chart version. See
the `official KEDA deployment guide
<https://keda.sh/docs/2.20/deploy/>`__ for non-Helm installation methods and
cluster-specific options.

Enable Python OpenTelemetry instrumentation
============================================

The plugin can opt LMS, CMS, and their Celery workers into Python
zero-code instrumentation through the OpenTelemetry Operator. The Operator
must be installed once per cluster using externally managed Terraform IaC.
Terraform creates one shared ``Instrumentation`` resource in the Operator
namespace, deploys Tempo with S3 storage, and configures Alloy as the OTLP
receiver and routing layer. The plugin only adds injection annotations to
selected Deployments in its defined Tutor namespace. It cannot create
cluster-scoped CRDs, RBAC, admission webhooks, or install the Operator.

Apply the Terraform configuration in ``owly-k8s`` first. It installs the
cluster-wide Operator, creates one shared Python ``Instrumentation`` resource,
configures Alloy to receive OTLP/HTTP, sends traces to Tempo, and sends metrics
to Mimir. Tempo stores traces in S3. The Tutor plugin does not need cluster
permissions or an endpoint value for this shared path.

.. code-block:: bash

    tutor plugins enable k8s
    tutor config save --set K8S_OTEL_ENABLE=true
    tutor k8s start

Instrumentation is disabled by default. ``K8S_OTEL_LMS_ENABLE``,
``K8S_OTEL_CMS_ENABLE``, ``K8S_OTEL_LMS_WORKER_ENABLE``, and
``K8S_OTEL_CMS_WORKER_ENABLE`` allow opting individual workloads out while
the global switch is on. ``K8S_OTEL_INSTRUMENTATION_REF`` can point a site to
a different shared or site-specific Operator ``Instrumentation`` object; its
default is ``opentelemetry-operator-system/tutork8s-python``.

Terraform configures Python trace and metric exporters to use OTLP. Alloy sends
traces to Tempo and metrics to Mimir. The Operator supports cross-namespace
references, so sites can share Terraform-managed settings while retaining
per-site opt-in control.

Python auto-instrumentation around prefork servers and Celery workers can have
process-lifecycle limitations, especially for periodic metric export. Start
with one workload type, inspect worker and application behavior, then expand.

Usage
*****

.. code-block:: bash

    tutor plugins enable k8s

Configuration
*************

All settings are regular Tutor config values prefixed with ``K8S_``. You can
set them via ``tutor config save`` or by editing your Tutor config file.

.. code-block:: bash

    tutor config save \
      --set K8S_LMS_REPLICAS=2 \
      --set K8S_LMS_MAX_REPLICAS=6

After changing settings, re-render or redeploy your Tutor K8s environment as
you normally would so the updated templates are applied.

Graceful shutdown
=================

LMS, CMS, and their workers each have a configurable Pod termination grace
period and pre-stop sleep. All four default to 90 seconds of total grace and a
15-second sleep before the container receives its stop signal. The sleep is
part of the grace period, leaving about 75 seconds for the process to stop.
For each deployment, keep ``K8S_*_PRESTOP_SLEEP`` shorter than its
``K8S_*_TERMINATION_GRACE_PERIOD_SECONDS`` and leave enough time after the
sleep for the process to handle the stop signal. Set the values independently
as needed. For example:

.. code-block:: bash

    tutor config save \
      --set K8S_LMS_TERMINATION_GRACE_PERIOD_SECONDS=120 \
      --set K8S_LMS_PRESTOP_SLEEP=20

LMS and CMS Ingress upload limits
=====================================

To set the ingress-nginx request body limits for the LMS and Studio:

.. code-block:: bash

    tutor config save \
      --set K8S_LMS_INGRESS_PROXY_BODY_SIZE=250m \
      --set K8S_CMS_INGRESS_PROXY_BODY_SIZE=250m

The default limits are ``50m`` for ``K8S_LMS_INGRESS_PROXY_BODY_SIZE`` and
``250m`` for ``K8S_CMS_INGRESS_PROXY_BODY_SIZE``. These defaults apply the
annotations automatically to matching Ingresses. Set either value to an empty
string to omit that patch and leave the corresponding Ingress unchanged.
The names are derived from ``{{ LMS_HOST | replace(".", "-") }}-to-caddy``
and ``{{ CMS_HOST | replace(".", "-") }}-to-caddy`` respectively.
For example, ``studio.elearning.avanxa.com`` targets
``studio-elearning-avanxa-com-to-caddy``. The two limits can be set independently.

The Ingress must be supplied by another plugin or resource in the same Tutor
Kustomize build. This plugin does not create it; an unmatched target has no
effect. The patch merges only ``nginx.ingress.kubernetes.io/proxy-body-size``
and preserves other annotations, TLS configuration, and routing. Reapply the
rendered manifests through your normal deployment workflow. Caddy and the
application retain their own upload limits.

Caddy upstream keepalive
========================

Caddy retires idle HTTP connections to the LMS and Studio after ten seconds
by default. Set ``K8S_CADDY_LMS_KEEPALIVE`` to another Caddy duration to
change this, or to ``0``, ``None``, or an empty value to omit the patch. Worker
processes do not receive HTTP traffic from Caddy.

KEDA autoscaling
================

KEDA autoscaling is disabled by default and requires KEDA 2.20 or newer to be
installed separately in the cluster. Enable it per workload with
``K8S_LMS_KEDA_ENABLE``, ``K8S_CMS_KEDA_ENABLE``,
``K8S_LMS_WORKER_KEDA_ENABLE``, ``K8S_CMS_WORKER_KEDA_ENABLE``,
``K8S_MFE_KEDA_ENABLE``, or ``K8S_CADDY_KEDA_ENABLE``. Enabling KEDA for a
workload suppresses that workload's legacy CPU/memory HPA in newly rendered
manifests.

Before enabling or upgrading LMS/CMS scaling, point
``K8S_KEDA_PROMETHEUS_SERVER_ADDRESS`` at a Prometheus query endpoint reachable
by KEDA. Configure it to scrape each Caddy pod once via the existing
``caddy-metrics`` endpoints, retaining the Kubernetes ``namespace`` label.
A 15–30 second scrape interval gives several samples in the default window.
Run the rendered query in Prometheus and confirm it returns one numeric value,
including zero when idle. Missing data counts toward the configured fallback.

With an instantaneous target of one, two overlapping requests on a warm pod
can trigger a second, cold pod. LMS and CMS now average each Caddy series over
``K8S_KEDA_INFLIGHT_AVERAGING_WINDOW`` (default ``2m``) and sum the averages.
The HPA divides this total by replica count. The target defaults to the
workload's configured uWSGI process count with a floor of four. Override
``K8S_LMS_KEDA_TARGET_INFLIGHT`` or ``K8S_CMS_KEDA_TARGET_INFLIGHT`` per site.
An explicit old target of one continues to take precedence.

The HPA uses a 60-second scale-up stabilization window and can add one pod per
60 seconds. It retains the highest recommendation from the last 900 seconds
on scale-down and can remove one pod per 300 seconds. Use the
``K8S_KEDA_WEB_SCALE_*`` settings in the guide to tune both LMS and CMS.
KEDA's ``cooldownPeriod`` governs scale-down to zero. These workloads keep
at least one replica, so the HPA controls scale-down throughout their range.

Compare 24-hour periods with similar traffic before and after rollout.
Replace ``<ns>`` with your site's Kubernetes namespace.

- Track ``changes(kube_deployment_status_replicas{namespace="<ns>",deployment="lms"}[24h])``.
  Check whether the daily number of replica changes falls.
- Compare ``avg_over_time(kube_deployment_status_replicas{namespace="<ns>",deployment="lms"}[24h])``
  to see whether LMS runs fewer replicas on average. Multiply each period's
  average by the memory request per LMS pod to estimate average reserved
  memory. Check whether node count also trends down.
- Compare the share of requests over one second in uWSGI logs and ingress p95.
  Check that latency holds up during sustained peaks. Newly added pods may
  still receive little traffic until Caddy gains per-request balancing.

See `the Verawood autoscaling guide
<https://github.com/aulasneo/tutor-contrib-k8s/blob/main/docs/autoscaling-v22.md>`__
for prerequisites, metric design, all settings,
migration, rollout, verification, and rollback instructions.

Health probes
=============

LMS and CMS health probes are enabled by default with
``K8S_OPENEDX_HEALTH_PROBES_ENABLE``. The startup probes call ``/heartbeat``
on port 8000 with ``Host: lms`` and ``Host: cms`` respectively. By default they
allow up to 10 minutes for Open edX to initialize. Kubernetes suspends readiness
and liveness probes until the startup probe first succeeds; the pod can then
join its Service once readiness succeeds.

By default, readiness and liveness then use TCP checks on port 8000. This is
deliberate. ``/heartbeat`` verifies MySQL and the
modulestore, which every pod shares, so a database stall fails the probe on all
replicas simultaneously:

- On **liveness**, Kubernetes would restart the whole deployment, turning a short
  dependency blip into a prolonged outage since each replacement pod must pay
  full Open edX startup time.
- On **readiness**, Kubernetes removes every pod from the Service endpoints. The
  ingress then has nowhere to send traffic and refuses connections, so the site
  is completely down even though every pod is healthy and idle. Not restarting
  the pods is little consolation when no request can reach them.

A probe should answer "can *this* pod serve?", not "is the shared database
healthy?". Correlated dependency checks turn a slowdown into an outage, and they
do it at the worst possible moment — under load, when the database is already
struggling. Genuine dependency failures surface as application errors and in
monitoring, which is where they belong.

If every replica has independent dependencies and you want dependency-aware
readiness, set ``K8S_OPENEDX_READINESS_PROBE_USE_HEARTBEAT`` to ``true`` to
restore the ``/heartbeat`` readiness check. Be aware that timing settings alone
are not a safe substitute: a dump holding table locks, or any stall lasting
minutes, will outlast any reasonable ``timeoutSeconds`` × ``failureThreshold``
budget.

The probe timing settings are:

- ``K8S_OPENEDX_STARTUP_PROBE_PERIOD_SECONDS``
- ``K8S_OPENEDX_STARTUP_PROBE_TIMEOUT_SECONDS``
- ``K8S_OPENEDX_STARTUP_PROBE_FAILURE_THRESHOLD``
- ``K8S_OPENEDX_READINESS_PROBE_PERIOD_SECONDS``
- ``K8S_OPENEDX_READINESS_PROBE_TIMEOUT_SECONDS``
- ``K8S_OPENEDX_READINESS_PROBE_FAILURE_THRESHOLD``
- ``K8S_OPENEDX_READINESS_PROBE_USE_HEARTBEAT`` (default ``false``)
- ``K8S_OPENEDX_LIVENESS_PROBE_PERIOD_SECONDS``
- ``K8S_OPENEDX_LIVENESS_PROBE_TIMEOUT_SECONDS``
- ``K8S_OPENEDX_LIVENESS_PROBE_FAILURE_THRESHOLD``

Settings and defaults
*********************

Resource settings
=================

.. list-table::
   :header-rows: 1

   * - Setting suffix
     - Description
   * - ``CPU_REQUEST``
     - Amount of CPU reserved for the pod.
   * - ``MEMORY_REQUEST``
     - Amount of memory reserved for the pod.
   * - ``CPU_LIMIT``
     - Maximum CPU the pod can use; usage above this is throttled.
   * - ``MEMORY_LIMIT``
     - Maximum memory allowed; exceeding this leads to an OOM kill.
   * - ``REPLICAS``
     - Baseline number of replicas when autoscaling is disabled.
   * - ``MAX_REPLICAS``
     - Upper bound for autoscaling.

HPA settings
============

.. list-table::
   :header-rows: 1

   * - Setting suffix
     - Description
   * - ``HPA_ENABLE``
     - Enables HPA creation for the service.
   * - ``HPA_CPU_ENABLE``
     - Enables CPU utilization metrics in the HPA.
   * - ``HPA_MEMORY_ENABLE``
     - Enables memory utilization metrics in the HPA.
   * - ``HPA_CPU_AVERAGE_UTILIZATION``
     - Target average CPU utilization percentage.
   * - ``HPA_MEMORY_AVERAGE_UTILIZATION``
     - Target average memory utilization percentage.
   * - ``HPA_SCALE_UP_STABILIZATION_WINDOW_SECONDS``
     - Window to stabilize scale-up recommendations.
   * - ``HPA_SCALE_UP_PERCENT``
     - Max scale-up change as a percentage per period.
   * - ``HPA_SCALE_UP_PODS``
     - Max scale-up change as a number of pods per period.
   * - ``HPA_SCALE_UP_PERIOD_SECONDS``
     - Period for scale-up policies in seconds.
   * - ``HPA_SCALE_DOWN_STABILIZATION_WINDOW_SECONDS``
     - Window to stabilize scale-down recommendations.
   * - ``HPA_SCALE_DOWN_PERCENT``
     - Max scale-down change as a percentage per period.
   * - ``HPA_SCALE_DOWN_PODS``
     - Max scale-down change as a number of pods per period.
   * - ``HPA_SCALE_DOWN_PERIOD_SECONDS``
     - Period for scale-down policies in seconds.

PDB settings
============

.. list-table::
   :header-rows: 1

   * - Setting suffix
     - Description
   * - ``PDB_ENABLE``
     - Enables PodDisruptionBudget creation for the service.
   * - ``MIN_AVAILABLE_REPLICAS``
     - Minimum number of replicas that must remain available.

VPA settings
============

.. list-table::
   :header-rows: 1

   * - Setting suffix
     - Description
   * - ``VPA_ENABLE``
     - Enables VerticalPodAutoscaler creation for the service.
   * - ``VPA_MIN_ALLOWED_CPU``
     - Minimum CPU the VPA can recommend.
   * - ``VPA_MAX_ALLOWED_CPU``
     - Maximum CPU the VPA can recommend.
   * - ``VPA_MIN_ALLOWED_MEMORY``
     - Minimum memory the VPA can recommend.
   * - ``VPA_MAX_ALLOWED_MEMORY``
     - Maximum memory the VPA can recommend.
   * - ``VPA_CONTROLLED_RESOURCES``
     - Resource types controlled by VPA (``cpu`` and/or ``memory``).
   * - ``VPA_UPDATE_MODE``
     - Update mode for applying recommendations (``Off``, ``Initial``, ``Auto``).

Default settings
================

.. list-table::
   :header-rows: 1

   * - Setting
     - Default
   * - ``K8S_VERSION``
     - Plugin version
   * - ``K8S_LMS_HPA_CPU_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_LMS_HPA_MEMORY_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_LMS_HPA_SCALE_UP_STABILIZATION_WINDOW_SECONDS``
     - ``0``
   * - ``K8S_LMS_HPA_SCALE_UP_PERCENT``
     - ``100``
   * - ``K8S_LMS_HPA_SCALE_UP_PODS``
     - ``4``
   * - ``K8S_LMS_HPA_SCALE_UP_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_LMS_HPA_SCALE_DOWN_STABILIZATION_WINDOW_SECONDS``
     - ``120``
   * - ``K8S_LMS_HPA_SCALE_DOWN_PERCENT``
     - ``100``
   * - ``K8S_LMS_HPA_SCALE_DOWN_PODS``
     - ``1``
   * - ``K8S_LMS_HPA_SCALE_DOWN_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_CMS_HPA_CPU_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_CMS_HPA_MEMORY_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_CMS_HPA_SCALE_UP_STABILIZATION_WINDOW_SECONDS``
     - ``0``
   * - ``K8S_CMS_HPA_SCALE_UP_PERCENT``
     - ``100``
   * - ``K8S_CMS_HPA_SCALE_UP_PODS``
     - ``4``
   * - ``K8S_CMS_HPA_SCALE_UP_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_CMS_HPA_SCALE_DOWN_STABILIZATION_WINDOW_SECONDS``
     - ``120``
   * - ``K8S_CMS_HPA_SCALE_DOWN_PERCENT``
     - ``100``
   * - ``K8S_CMS_HPA_SCALE_DOWN_PODS``
     - ``1``
   * - ``K8S_CMS_HPA_SCALE_DOWN_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_LMS_WORKER_HPA_CPU_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_LMS_WORKER_HPA_MEMORY_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_LMS_WORKER_HPA_SCALE_UP_STABILIZATION_WINDOW_SECONDS``
     - ``0``
   * - ``K8S_LMS_WORKER_HPA_SCALE_UP_PERCENT``
     - ``100``
   * - ``K8S_LMS_WORKER_HPA_SCALE_UP_PODS``
     - ``4``
   * - ``K8S_LMS_WORKER_HPA_SCALE_UP_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_LMS_WORKER_HPA_SCALE_DOWN_STABILIZATION_WINDOW_SECONDS``
     - ``300``
   * - ``K8S_LMS_WORKER_HPA_SCALE_DOWN_PERCENT``
     - ``100``
   * - ``K8S_LMS_WORKER_HPA_SCALE_DOWN_PODS``
     - ``1``
   * - ``K8S_LMS_WORKER_HPA_SCALE_DOWN_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_CMS_WORKER_HPA_CPU_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_CMS_WORKER_HPA_MEMORY_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_CMS_WORKER_HPA_SCALE_UP_STABILIZATION_WINDOW_SECONDS``
     - ``0``
   * - ``K8S_CMS_WORKER_HPA_SCALE_UP_PERCENT``
     - ``100``
   * - ``K8S_CMS_WORKER_HPA_SCALE_UP_PODS``
     - ``4``
   * - ``K8S_CMS_WORKER_HPA_SCALE_UP_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_CMS_WORKER_HPA_SCALE_DOWN_STABILIZATION_WINDOW_SECONDS``
     - ``300``
   * - ``K8S_CMS_WORKER_HPA_SCALE_DOWN_PERCENT``
     - ``100``
   * - ``K8S_CMS_WORKER_HPA_SCALE_DOWN_PODS``
     - ``1``
   * - ``K8S_CMS_WORKER_HPA_SCALE_DOWN_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_MFE_HPA_CPU_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_MFE_HPA_MEMORY_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_MFE_HPA_SCALE_UP_STABILIZATION_WINDOW_SECONDS``
     - ``0``
   * - ``K8S_MFE_HPA_SCALE_UP_PERCENT``
     - ``100``
   * - ``K8S_MFE_HPA_SCALE_UP_PODS``
     - ``4``
   * - ``K8S_MFE_HPA_SCALE_UP_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_MFE_HPA_SCALE_DOWN_STABILIZATION_WINDOW_SECONDS``
     - ``120``
   * - ``K8S_MFE_HPA_SCALE_DOWN_PERCENT``
     - ``100``
   * - ``K8S_MFE_HPA_SCALE_DOWN_PODS``
     - ``1``
   * - ``K8S_MFE_HPA_SCALE_DOWN_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_CADDY_HPA_CPU_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_CADDY_HPA_MEMORY_AVERAGE_UTILIZATION``
     - ``80``
   * - ``K8S_CADDY_HPA_SCALE_UP_STABILIZATION_WINDOW_SECONDS``
     - ``0``
   * - ``K8S_CADDY_HPA_SCALE_UP_PERCENT``
     - ``100``
   * - ``K8S_CADDY_HPA_SCALE_UP_PODS``
     - ``4``
   * - ``K8S_CADDY_HPA_SCALE_UP_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_CADDY_HPA_SCALE_DOWN_STABILIZATION_WINDOW_SECONDS``
     - ``120``
   * - ``K8S_CADDY_HPA_SCALE_DOWN_PERCENT``
     - ``100``
   * - ``K8S_CADDY_HPA_SCALE_DOWN_PODS``
     - ``1``
   * - ``K8S_CADDY_HPA_SCALE_DOWN_PERIOD_SECONDS``
     - ``60``
   * - ``K8S_CMS_CPU_REQUEST``
     - ``20m``
   * - ``K8S_CMS_MEMORY_REQUEST``
     - ``768Mi``
   * - ``K8S_CMS_CPU_LIMIT``
     - ``500m``
   * - ``K8S_CMS_MEMORY_LIMIT``
     - ``2Gi``
   * - ``K8S_CMS_REPLICAS``
     - ``1``
   * - ``K8S_CMS_MAX_REPLICAS``
     - ``3``
   * - ``K8S_CMS_TERMINATION_GRACE_PERIOD_SECONDS``
     - ``90``
   * - ``K8S_CMS_PRESTOP_SLEEP``
     - ``15``
   * - ``K8S_CMS_WORKER_CPU_REQUEST``
     - ``25m``
   * - ``K8S_CMS_WORKER_MEMORY_REQUEST``
     - ``1Gi``
   * - ``K8S_CMS_WORKER_CPU_LIMIT``
     - ``500m``
   * - ``K8S_CMS_WORKER_MEMORY_LIMIT``
     - ``3Gi``
   * - ``K8S_CMS_WORKER_REPLICAS``
     - ``1``
   * - ``K8S_CMS_WORKER_MAX_REPLICAS``
     - ``3``
   * - ``K8S_CMS_WORKER_TERMINATION_GRACE_PERIOD_SECONDS``
     - ``90``
   * - ``K8S_CMS_WORKER_PRESTOP_SLEEP``
     - ``15``
   * - ``K8S_LMS_CPU_REQUEST``
     - ``20m``
   * - ``K8S_LMS_MEMORY_REQUEST``
     - ``1Gi``
   * - ``K8S_LMS_CPU_LIMIT``
     - ``500m``
   * - ``K8S_LMS_MEMORY_LIMIT``
     - ``2Gi``
   * - ``K8S_LMS_REPLICAS``
     - ``1``
   * - ``K8S_LMS_MAX_REPLICAS``
     - ``3``
   * - ``K8S_LMS_TERMINATION_GRACE_PERIOD_SECONDS``
     - ``90``
   * - ``K8S_LMS_PRESTOP_SLEEP``
     - ``15``
   * - ``K8S_LMS_WORKER_CPU_REQUEST``
     - ``25m``
   * - ``K8S_LMS_WORKER_MEMORY_REQUEST``
     - ``1Gi``
   * - ``K8S_LMS_WORKER_CPU_LIMIT``
     - ``500m``
   * - ``K8S_LMS_WORKER_MEMORY_LIMIT``
     - ``3Gi``
   * - ``K8S_LMS_WORKER_REPLICAS``
     - ``1``
   * - ``K8S_LMS_WORKER_MAX_REPLICAS``
     - ``3``
   * - ``K8S_LMS_WORKER_TERMINATION_GRACE_PERIOD_SECONDS``
     - ``90``
   * - ``K8S_LMS_WORKER_PRESTOP_SLEEP``
     - ``15``
   * - ``K8S_MFE_CPU_REQUEST``
     - ``10m``
   * - ``K8S_MFE_MEMORY_REQUEST``
     - ``30Mi``
   * - ``K8S_MFE_CPU_LIMIT``
     - ``100m``
   * - ``K8S_MFE_MEMORY_LIMIT``
     - ``100Mi``
   * - ``K8S_MFE_REPLICAS``
     - ``1``
   * - ``K8S_MFE_MAX_REPLICAS``
     - ``3``
   * - ``K8S_CADDY_CPU_REQUEST``
     - ``10m``
   * - ``K8S_CADDY_MEMORY_REQUEST``
     - ``50Mi``
   * - ``K8S_CADDY_CPU_LIMIT``
     - ``100m``
   * - ``K8S_CADDY_MEMORY_LIMIT``
     - ``100Mi``
   * - ``K8S_CADDY_REPLICAS``
     - ``1``
   * - ``K8S_CADDY_MAX_REPLICAS``
     - ``3``
   * - ``K8S_CMS_PDB_ENABLE``
     - ``True``
   * - ``K8S_CMS_WORKER_PDB_ENABLE``
     - ``False``
   * - ``K8S_LMS_PDB_ENABLE``
     - ``True``
   * - ``K8S_LMS_WORKER_PDB_ENABLE``
     - ``False``
   * - ``K8S_MFE_PDB_ENABLE``
     - ``True``
   * - ``K8S_CADDY_PDB_ENABLE``
     - ``True``
   * - ``K8S_CADDY_MIN_AVAILABLE_REPLICAS``
     - ``1``
   * - ``K8S_LMS_MIN_AVAILABLE_REPLICAS``
     - ``1``
   * - ``K8S_LMS_WORKER_MIN_AVAILABLE_REPLICAS``
     - ``1``
   * - ``K8S_CMS_MIN_AVAILABLE_REPLICAS``
     - ``1``
   * - ``K8S_CMS_WORKER_MIN_AVAILABLE_REPLICAS``
     - ``1``
   * - ``K8S_MFE_MIN_AVAILABLE_REPLICAS``
     - ``1``
   * - ``K8S_VPA_CONTROLLED_RESOURCES``
     - ``["cpu"]``
   * - ``K8S_VPA_UPDATE_MODE``
     - ``Off``
   * - ``K8S_CMS_VPA_ENABLE``
     - ``True``
   * - ``K8S_CMS_VPA_MIN_ALLOWED_CPU``
     - ``10m``
   * - ``K8S_CMS_VPA_MAX_ALLOWED_CPU``
     - ``1000m``
   * - ``K8S_CMS_VPA_MIN_ALLOWED_MEMORY``
     - ``1.5Gi``
   * - ``K8S_CMS_VPA_MAX_ALLOWED_MEMORY``
     - ``4Gi``
   * - ``K8S_CMS_WORKER_VPA_ENABLE``
     - ``True``
   * - ``K8S_CMS_WORKER_VPA_MIN_ALLOWED_CPU``
     - ``10m``
   * - ``K8S_CMS_WORKER_VPA_MAX_ALLOWED_CPU``
     - ``1000m``
   * - ``K8S_CMS_WORKER_VPA_MIN_ALLOWED_MEMORY``
     - ``1.5Gi``
   * - ``K8S_CMS_WORKER_VPA_MAX_ALLOWED_MEMORY``
     - ``4Gi``
   * - ``K8S_LMS_VPA_ENABLE``
     - ``True``
   * - ``K8S_LMS_VPA_MIN_ALLOWED_CPU``
     - ``10m``
   * - ``K8S_LMS_VPA_MAX_ALLOWED_CPU``
     - ``1000m``
   * - ``K8S_LMS_VPA_MIN_ALLOWED_MEMORY``
     - ``1.5Gi``
   * - ``K8S_LMS_VPA_MAX_ALLOWED_MEMORY``
     - ``4Gi``
   * - ``K8S_LMS_WORKER_VPA_ENABLE``
     - ``True``
   * - ``K8S_LMS_WORKER_VPA_MIN_ALLOWED_CPU``
     - ``10m``
   * - ``K8S_LMS_WORKER_VPA_MAX_ALLOWED_CPU``
     - ``1000m``
   * - ``K8S_LMS_WORKER_VPA_MIN_ALLOWED_MEMORY``
     - ``1.5Gi``
   * - ``K8S_LMS_WORKER_VPA_MAX_ALLOWED_MEMORY``
     - ``4Gi``
   * - ``K8S_MFE_VPA_ENABLE``
     - ``True``
   * - ``K8S_MFE_VPA_MIN_ALLOWED_CPU``
     - ``10m``
   * - ``K8S_MFE_VPA_MAX_ALLOWED_CPU``
     - ``100m``
   * - ``K8S_MFE_VPA_MIN_ALLOWED_MEMORY``
     - ``30Mi``
   * - ``K8S_MFE_VPA_MAX_ALLOWED_MEMORY``
     - ``100Mi``
   * - ``K8S_CADDY_VPA_ENABLE``
     - ``True``
   * - ``K8S_CADDY_VPA_MIN_ALLOWED_CPU``
     - ``10m``
   * - ``K8S_CADDY_VPA_MAX_ALLOWED_CPU``
     - ``100m``
   * - ``K8S_CADDY_VPA_MIN_ALLOWED_MEMORY``
     - ``50Mi``
   * - ``K8S_CADDY_VPA_MAX_ALLOWED_MEMORY``
     - ``100Mi``

License
*******

This software is licensed under the terms of the AGPLv3.
