Deepfactor portal runs multiple microservices as pods in the kubernetes cluster. We provide the flexibility of updating the resource limits and hpa configuration for each of these pods. However, for most use cases, you will not need to change these values. If you are running larger workloads, please refer to the following section
Resource limits and hpa config for larger workloads
Resource limits configuration #
The following section provides the resource limits configuration for all the Deepfactor portal pods. As mentioned above, the default limits should work for most common workloads. In order to modify the resource limits, please follow the steps outlined below:
1. Create resource.yaml file
Please edit the resource limits as appropriate for your load and infrastructure.
apisvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 250Mi cpu: 200m limits: memory: 500Mi cpu: 500m alertstreamsvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 500Mi cpu: 1 limits: memory: 1Gi cpu: 2 authsvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 50Mi cpu: 25m limits: memory: 100Mi cpu: 50m eventsvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 150Mi cpu: 250m limits: memory: 250Mi cpu: 500m notificationsvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 50Mi cpu: 150m limits: memory: 250Mi cpu: 500m persistentsvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 250Mi cpu: 250m limits: memory: 500Mi cpu: 500m proxysvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 100Mi cpu: 50m limits: memory: 200Mi cpu: 100m symbolsvc: containers: resources: requests: memory: 250Mi cpu: 250m limits: memory: 500Mi cpu: 2 statussvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m dfstartup: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m policyctl: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 500Mi cpu: 250m limits: memory: 500Mi cpu: 250m ttlctl: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m nginx: opa: resources: requests: memory: 250Mi cpu: 250m limits: memory: 400Mi cpu: 500m containers: resources: requests: memory: 250Mi cpu: 250m limits: memory: 1Gi cpu: 1 frontend: containers: resources: requests: memory: 250Mi cpu: 250m limits: memory: 1Gi cpu: 1 webappsvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 500Mi cpu: 250m limits: memory: 1Gi cpu: 500m archivestore: containers: resources: requests: memory: 100Mi cpu: 50m limits: memory: 200Mi cpu: 100m clickhouse: storage: className: gp2 requests: 300Gi containers: resources: requests: memory: 1Gi cpu: 1 limits: memory: 8Gi cpu: 4 postgres: storage: className: gp2 requests: 100Gi containers: resources: requests: memory: 1Gi cpu: 1 limits: memory: 8Gi cpu: 4 updatersvc: containers: resources: requests: memory: 50Mi cpu: 50m limits: memory: 100Mi cpu: 100m cert-manager: resources: requests: cpu: 50m memory: 50Mi limits: cpu: 100m memory: 200Mi webhook: resources: requests: cpu: 50m memory: 50Mi limits: cpu: 100m memory: 200Mi startupapicheck: resources: requests: cpu: 25m memory: 25Mi limits: cpu: 50m memory: 100Mi cainjector: resources: requests: cpu: 50m memory: 50Mi limits: cpu: 100m memory: 200Mi migrationsvc: initContainers: wait: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m containers: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m jobCleanup: containers: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m nats: bootconfig: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m nats: resources: requests: memory: 2Gi cpu: 2 limits: memory: 4Gi cpu: 4 reloader: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m exporter: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m natsbox: resources: requests: memory: 25Mi cpu: 25m limits: memory: 50Mi cpu: 50m
2. Pass the above resource.yaml file in helm install/upgrade command
helm install df-stable deepfactor/deepfactor -n deepfactor -f override.yaml -f resource.yaml --set dfstartup.config.password=YOUR_PORTAL_PASSWORD --set dfstartup.config.portalToken= "YOUR_DEEPFACTOR_LICENSE_KEY_FROM_MY.DEEPFACTOR.IO" --set clusterName=CLUSTER_NAME_OF_YOUR_CHOICE
#
Resource limits and hpa config for larger workloads #
If you are running larger workloads, we recommend updating resource limits and hpa configuration as shown in the yaml below. We have arrived at this configuration by measuring the average and peak cpu/memory utilization for larger workloads in our labs.
hpa: enabled: true apisvc: replicas: 2 alertstreamsvc: replicas: 2 eventsvc: replicas: 2 persistentsvc: replicas: 2 clickhouse: containers: resources: requests: memory: 8Gi cpu: 2 limits: memory: 16Gi cpu: 4 postgres: containers: resources: requests: memory: 4Gi cpu: 1 limits: memory: 8Gi cpu: 4 nats: nats: resources: requests: memory: 4Gi cpu: 2 limits: memory: 8Gi cpu: 4 jetstream: memStorage: size: 2Gi