Resource Configuration and High Availability
Depending on your environment and the scale of your cluster, you might need to adjust UDS Core components for high availability or to optimize resources. Below are common areas where resource overrides can be useful when deploying UDS Core.
When modifying resources and replica counts it can be useful to observe pod resource metrics in Grafana to make an informed choice on what may be necessary for your environment. Where available HPA (Horizontal Pod Autoscalers) are beneficial to dynamically scale up/down based on usage.
Monitoring
Prometheus Stack
Prometheus is a common place to customize when scaling to larger cluster sizes (more nodes and/or workloads). To scale prometheus beyond a single replica its TSDB must be externalized using one of the supported options. UDS Core has not yet done extensive testing on this setup. It is also helpful to modify resources for Prometheus using a helm override for the prometheus.prometheusSpec.resources
value:
Grafana
Grafana can be configured in a high availability (HA) setup by utilizing an external PostgreSQL database. See the example values below for configuring Grafana in HA mode:
Logging
Vector
By default Vector runs as a daemonset, automatically scaling across all nodes to ensure logs are captured from each host. Typically Vector does not need any other modifications, but you can customize its resource configuration by overriding the resources
helm value (using the component and chart name of vector
). Vector recommends the below resourcing when running in production:
Loki
By default Loki will deploy in a multi-replica setup. See the below example for modifying replica counts of the read/write/backend pods:
You will also want to connect Loki to an external storage provider such as AWS S3, which can be done by overriding the loki.storage
values.
Identity & Authorization
Keycloak
Keycloak can be configured in a HA setup if an external database (postgresql) is provided. See the below example values for configuring HA Keycloak:
AuthService
AuthService can be configured in a HA setup if an external session store is provided (key value store like Redis/Valkey). For configuring an external session store you can set the UDS_AUTHSERVICE_REDIS_URI
env when deploying or via your uds-config.yaml
:
To scale up replicas or modify resource requests/limits you can use UDS bundle overrides for the helm values of replicaCount
and resources
(using the component and chart name of authservice
).