diff --git a/deploy/stacks/self-managed/environments/base.yaml b/deploy/stacks/self-managed/environments/base.yaml index a73d69869..023387fa8 100644 --- a/deploy/stacks/self-managed/environments/base.yaml +++ b/deploy/stacks/self-managed/environments/base.yaml @@ -266,6 +266,14 @@ stateMetrics: serviceMonitor: enabled: false +# Function Autoscaler workload (stage 03). Disabled by default; requires the +# stage-01 Cassandra/OpenBao migrations and the observability stack's VictoriaMetrics. +functionAutoscaler: + enabled: false + chartVersion: "0.0.0" # Pin to the published helm-nvcf-function-autoscaler version. + cassandraContactPoints: "" # e.g. cassandra.cassandra-system.svc.cluster.local + timeseriesDbUrl: "" # e.g. http://vmsingle.monitoring.svc:8428 + rateLimiter: enabled: true replicaCount: 1 diff --git a/deploy/stacks/self-managed/helmfile.d/03-observability.yaml.gotmpl b/deploy/stacks/self-managed/helmfile.d/03-observability.yaml.gotmpl index 0370fb678..ac1a4c4f6 100644 --- a/deploy/stacks/self-managed/helmfile.d/03-observability.yaml.gotmpl +++ b/deploy/stacks/self-managed/helmfile.d/03-observability.yaml.gotmpl @@ -40,3 +40,26 @@ releases: - template: service # When enabled, this service will export realtime function information that can be # scraped by a Prometheus ServiceMonitor + + # --- Function Autoscaler workload --- + # Deploys the function-autoscaler (chart nvcf/helm-nvcf-function-autoscaler), + # disabled by default. SECRETS_PATH and CONFIG come from the chart defaults; + # only the in-cluster endpoints are set here. Ordered after state-metrics and + # depends on the stage-01 Cassandra and OpenBao migrations and a reachable + # VictoriaMetrics from the observability stack. + - name: function-autoscaler + version: "{{ .Values.functionAutoscaler.chartVersion }}" # Pin to the published helm-nvcf-function-autoscaler version. + namespace: nvcf + condition: functionAutoscaler.enabled + needs: + - nvcf/state-metrics + inherit: + - template: service + values: + - functionautoscaler: + image: + registry: "{{ .Values.global.image.registry }}" + repository: "{{ .Values.global.image.repository }}/nvcf-autoscaler-service" + env: + CASSANDRA__CONTACT_POINTS: "{{ .Values.functionAutoscaler.cassandraContactPoints }}" + TIMESERIES_DB__TIMESERIES_DB_URL: "{{ .Values.functionAutoscaler.timeseriesDbUrl }}"