Add 'enabled' property to various components in values schema and YAML templates

This commit is contained in:
Nawaz Dhandala
2025-11-12 16:15:29 +00:00
parent 8bf8c891ab
commit b0d95bb7df
21 changed files with 129 additions and 13 deletions

View File

@@ -1,3 +1,4 @@
{{- if $.Values.accounts.enabled }}
# OneUptime accounts Deployment
{{- $accountsEnv := dict "PORT" $.Values.accounts.ports.http "DISABLE_TELEMETRY" $.Values.accounts.disableTelemetryCollection -}}
{{- $accountsPorts := $.Values.accounts.ports -}}
@@ -14,4 +15,5 @@
# OneUptime accounts autoscaler
{{- $accountsAutoScalerArgs := dict "ServiceName" "accounts" "Release" $.Release "Values" $.Values "DisableAutoscaler" $.Values.accounts.disableAutoscaler -}}
{{- include "oneuptime.autoscaler" $accountsAutoScalerArgs }}
---
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.adminDashboard.enabled }}
# OneUptime admin-dashboard Deployment
{{- $adminDashboardEnv := dict "PORT" $.Values.adminDashboard.ports.http "DISABLE_TELEMETRY" $.Values.adminDashboard.disableTelemetryCollection -}}
{{- $adminDashboardPorts := $.Values.adminDashboard.ports -}}
@@ -14,4 +15,5 @@
# OneUptime adminDashboard autoscaler
{{- $adminDashboardAutoScalerArgs := dict "ServiceName" "admin-dashboard" "Release" $.Release "Values" $.Values "DisableAutoscaler" $.Values.adminDashboard.disableAutoscaler -}}
{{- include "oneuptime.autoscaler" $adminDashboardAutoScalerArgs }}
---
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.apiReference.enabled }}
# OneUptime api-reference Deployment
apiVersion: apps/v1
kind: Deployment
@@ -129,3 +130,4 @@ spec:
{{- include "oneuptime.autoscaler" $apiReferenceAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.dashboard.enabled }}
# OneUptime dashboard Deployment
{{- $dashboardPorts := $.Values.dashboard.ports -}}
{{- $dashboardEnv := dict "PORT" $.Values.dashboard.ports.http "DISABLE_TELEMETRY" $.Values.dashboard.disableTelemetryCollection -}}
@@ -14,4 +15,5 @@
# OneUptime dashboard autoscaler
{{- $dashboardAutoScalerArgs := dict "ServiceName" "dashboard" "Release" $.Release "Values" $.Values "DisableAutoscaler" $.Values.dashboard.disableAutoscaler -}}
{{- include "oneuptime.autoscaler" $dashboardAutoScalerArgs }}
---
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.docs.enabled }}
# OneUptime docs Deployment
apiVersion: apps/v1
kind: Deployment
@@ -129,3 +130,5 @@ spec:
{{- include "oneuptime.autoscaler" $docsAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.home.enabled }}
# OneUptime Home Deployment
apiVersion: apps/v1
kind: Deployment
@@ -128,3 +129,5 @@ spec:
{{- include "oneuptime.autoscaler" $homeAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.incomingRequestIngest.enabled }}
# OneUptime incoming-request-ingest Deployment
apiVersion: apps/v1
@@ -138,3 +139,5 @@ spec:
{{- include "oneuptime.autoscaler" $incomingRequestIngestAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -1,4 +1,4 @@
{{- if $.Values.oneuptimeIngress.enabled }}
{{- if and $.Values.oneuptimeIngress.enabled $.Values.nginx.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress

View File

@@ -1,5 +1,5 @@
# OneUptime app Deployment
{{- if $.Values.isolatedVM.enabled }}
# OneUptime isolated-vm Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -105,3 +105,5 @@ spec:
{{- include "oneuptime.autoscaler" $isolatedVMAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -3,28 +3,28 @@ KEDA ScaledObjects for various services
*/}}
{{/* Telemetry KEDA ScaledObject */}}
{{- if and .Values.keda.enabled .Values.telemetry.keda.enabled (not .Values.telemetry.disableAutoscaler) }}
{{- if and .Values.keda.enabled .Values.telemetry.enabled .Values.telemetry.keda.enabled (not .Values.telemetry.disableAutoscaler) }}
{{- $metricsConfig := dict "enabled" .Values.telemetry.keda.enabled "minReplicas" .Values.telemetry.keda.minReplicas "maxReplicas" .Values.telemetry.keda.maxReplicas "pollingInterval" .Values.telemetry.keda.pollingInterval "cooldownPeriod" .Values.telemetry.keda.cooldownPeriod "triggers" (list (dict "query" "oneuptime_telemetry_queue_size" "threshold" .Values.telemetry.keda.queueSizeThreshold "port" .Values.telemetry.ports.http)) }}
{{- $telemetryKedaArgs := dict "ServiceName" "telemetry" "Release" .Release "Values" .Values "MetricsConfig" $metricsConfig "DisableAutoscaler" .Values.telemetry.disableAutoscaler }}
{{- include "oneuptime.kedaScaledObject" $telemetryKedaArgs }}
{{- end }}
{{/* Incoming Request Ingest KEDA ScaledObject */}}
{{- if and .Values.keda.enabled .Values.incomingRequestIngest.keda.enabled (not .Values.incomingRequestIngest.disableAutoscaler) }}
{{- if and .Values.keda.enabled .Values.incomingRequestIngest.enabled .Values.incomingRequestIngest.keda.enabled (not .Values.incomingRequestIngest.disableAutoscaler) }}
{{- $metricsConfig := dict "enabled" .Values.incomingRequestIngest.keda.enabled "minReplicas" .Values.incomingRequestIngest.keda.minReplicas "maxReplicas" .Values.incomingRequestIngest.keda.maxReplicas "pollingInterval" .Values.incomingRequestIngest.keda.pollingInterval "cooldownPeriod" .Values.incomingRequestIngest.keda.cooldownPeriod "triggers" (list (dict "query" "oneuptime_incoming_request_ingest_queue_size" "threshold" .Values.incomingRequestIngest.keda.queueSizeThreshold "port" .Values.incomingRequestIngest.ports.http)) }}
{{- $incomingRequestIngestKedaArgs := dict "ServiceName" "incoming-request-ingest" "Release" .Release "Values" .Values "MetricsConfig" $metricsConfig "DisableAutoscaler" .Values.incomingRequestIngest.disableAutoscaler }}
{{- include "oneuptime.kedaScaledObject" $incomingRequestIngestKedaArgs }}
{{- end }}
{{/* Server Monitor Ingest KEDA ScaledObject */}}
{{- if and .Values.keda.enabled .Values.serverMonitorIngest.keda.enabled (not .Values.serverMonitorIngest.disableAutoscaler) }}
{{- if and .Values.keda.enabled .Values.serverMonitorIngest.enabled .Values.serverMonitorIngest.keda.enabled (not .Values.serverMonitorIngest.disableAutoscaler) }}
{{- $metricsConfig := dict "enabled" .Values.serverMonitorIngest.keda.enabled "minReplicas" .Values.serverMonitorIngest.keda.minReplicas "maxReplicas" .Values.serverMonitorIngest.keda.maxReplicas "pollingInterval" .Values.serverMonitorIngest.keda.pollingInterval "cooldownPeriod" .Values.serverMonitorIngest.keda.cooldownPeriod "triggers" (list (dict "query" "oneuptime_server_monitor_ingest_queue_size" "threshold" .Values.serverMonitorIngest.keda.queueSizeThreshold "port" .Values.serverMonitorIngest.ports.http)) }}
{{- $serverMonitorIngestKedaArgs := dict "ServiceName" "server-monitor-ingest" "Release" .Release "Values" .Values "MetricsConfig" $metricsConfig "DisableAutoscaler" .Values.serverMonitorIngest.disableAutoscaler }}
{{- include "oneuptime.kedaScaledObject" $serverMonitorIngestKedaArgs }}
{{- end }}
{{/* Probe Ingest KEDA ScaledObject */}}
{{- if and .Values.keda.enabled .Values.probeIngest.keda.enabled (not .Values.probeIngest.disableAutoscaler) }}
{{- if and .Values.keda.enabled .Values.probeIngest.enabled .Values.probeIngest.keda.enabled (not .Values.probeIngest.disableAutoscaler) }}
{{- $metricsConfig := dict "enabled" .Values.probeIngest.keda.enabled "minReplicas" .Values.probeIngest.keda.minReplicas "maxReplicas" .Values.probeIngest.keda.maxReplicas "pollingInterval" .Values.probeIngest.keda.pollingInterval "cooldownPeriod" .Values.probeIngest.keda.cooldownPeriod "triggers" (list (dict "query" "oneuptime_probe_ingest_queue_size" "threshold" .Values.probeIngest.keda.queueSizeThreshold "port" .Values.probeIngest.ports.http)) }}
{{- $probeIngestKedaArgs := dict "ServiceName" "probe-ingest" "Release" .Release "Values" .Values "MetricsConfig" $metricsConfig "DisableAutoscaler" .Values.probeIngest.disableAutoscaler }}
{{- include "oneuptime.kedaScaledObject" $probeIngestKedaArgs }}
@@ -32,7 +32,8 @@ KEDA ScaledObjects for various services
{{/* Probe KEDA ScaledObjects - one for each probe configuration */}}
{{- range $key, $val := $.Values.probes }}
{{- if and $.Values.keda.enabled (and $val.keda $val.keda.enabled) (not $val.disableAutoscaler) }}
{{- $probeEnabled := or (not (hasKey $val "enabled")) $val.enabled }}
{{- if and $.Values.keda.enabled $probeEnabled (and $val.keda $val.keda.enabled) (not $val.disableAutoscaler) }}
{{- $serviceName := printf "probe-%s" $key }}
{{- $probePort := 3874 }}
{{- if and $val.ports $val.ports.http }}
@@ -45,7 +46,7 @@ KEDA ScaledObjects for various services
{{- end }}
{{/* Worker KEDA ScaledObject */}}
{{- if and .Values.keda.enabled .Values.worker.keda.enabled (not .Values.worker.disableAutoscaler) }}
{{- if and .Values.keda.enabled .Values.worker.enabled .Values.worker.keda.enabled (not .Values.worker.disableAutoscaler) }}
{{- $metricsConfig := dict "enabled" .Values.worker.keda.enabled "minReplicas" .Values.worker.keda.minReplicas "maxReplicas" .Values.worker.keda.maxReplicas "pollingInterval" .Values.worker.keda.pollingInterval "cooldownPeriod" .Values.worker.keda.cooldownPeriod "triggers" (list (dict "query" "oneuptime_worker_queue_size" "threshold" .Values.worker.keda.queueSizeThreshold "port" .Values.worker.ports.http)) }}
{{- $workerKedaArgs := dict "ServiceName" "worker" "Release" .Release "Values" .Values "MetricsConfig" $metricsConfig "DisableAutoscaler" .Values.worker.disableAutoscaler }}
{{- include "oneuptime.kedaScaledObject" $workerKedaArgs }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.nginx.enabled }}
# OneUptime nginx Deployment
apiVersion: apps/v1
@@ -208,3 +209,5 @@ spec:
{{- include "oneuptime.autoscaler" $nginxAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.openTelemetryCollector.enabled }}
# OneUptime otel-collector Deployment
apiVersion: apps/v1
@@ -142,3 +143,5 @@ spec:
{{- include "oneuptime.autoscaler" $identityAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.probeIngest.enabled }}
# OneUptime probe-ingest Deployment
apiVersion: apps/v1
@@ -135,3 +136,5 @@ spec:
{{- include "oneuptime.autoscaler" $probeIngestAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -1,4 +1,5 @@
{{- range $key, $val := $.Values.probes }}
{{- if or (not (hasKey $val "enabled")) $val.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -164,3 +165,5 @@ spec:
{{- end }}
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.serverMonitorIngest.enabled }}
# OneUptime server-monitor-ingest Deployment
apiVersion: apps/v1
@@ -135,3 +136,5 @@ spec:
{{- include "oneuptime.autoscaler" $serverMonitorIngestAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.statusPage.enabled }}
# OneUptime statusPage Deployment
{{- $statusPagePorts := dict "port" $.Values.statusPage.ports.http -}}
{{- $statusPageEnv := dict "PORT" $.Values.statusPage.ports.http "DISABLE_TELEMETRY" $.Values.statusPage.disableTelemetryCollection -}}
@@ -14,4 +15,5 @@
# OneUptime statusPage autoscaler
{{- $statusPageAutoScalerArgs := dict "ServiceName" "status-page" "Release" $.Release "Values" $.Values "DisableAutoscaler" $.Values.statusPage.disableAutoscaler -}}
{{- include "oneuptime.autoscaler" $statusPageAutoScalerArgs }}
---
---
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.telemetry.enabled }}
# OneUptime telemetry Deployment
apiVersion: apps/v1
@@ -133,4 +134,5 @@ spec:
{{- if and (not $.Values.telemetry.disableAutoscaler) (not (and $.Values.keda.enabled $.Values.telemetry.keda.enabled)) }}
{{- $telemetryAutoScalerArgs := dict "ServiceName" "telemetry" "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.autoscaler" $telemetryAutoScalerArgs }}
{{- end }}
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.worker.enabled }}
# OneUptime worker Deployment
apiVersion: apps/v1
kind: Deployment
@@ -129,3 +130,4 @@ spec:
{{- $workerAutoScalerArgs := dict "ServiceName" "worker" "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.autoscaler" $workerAutoScalerArgs }}
{{- end }}
{{- end }}

View File

@@ -1,3 +1,4 @@
{{- if $.Values.workflow.enabled }}
# OneUptime workflow Deployment
apiVersion: apps/v1
kind: Deployment
@@ -129,3 +130,5 @@ spec:
{{- include "oneuptime.autoscaler" $workflowAutoScalerArgs }}
{{- end }}
---
{{- end }}

View File

@@ -148,6 +148,9 @@
"nginx": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer",
"minimum": 1
@@ -696,6 +699,9 @@
"statusPage": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -738,6 +744,9 @@
"^.*$": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"name": {
"type": "string"
},
@@ -1264,6 +1273,9 @@
"openTelemetryCollector": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1318,6 +1330,9 @@
"accounts": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1354,6 +1369,9 @@
"home": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1390,6 +1408,9 @@
"dashboard": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1426,6 +1447,9 @@
"adminDashboard": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1462,6 +1486,9 @@
"worker": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1525,6 +1552,9 @@
"workflow": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1564,6 +1594,9 @@
"apiReference": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1600,6 +1633,9 @@
"docs": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1636,6 +1672,9 @@
"app": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1672,6 +1711,9 @@
"probeIngest": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1735,6 +1777,9 @@
"telemetry": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1798,6 +1843,9 @@
"incomingRequestIngest": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1861,6 +1909,9 @@
"isolatedVM": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},
@@ -1897,6 +1948,9 @@
"serverMonitorIngest": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"replicaCount": {
"type": "integer"
},

View File

@@ -60,6 +60,7 @@ metalLb:
# - 51.158.55.153/32 # List of IP addresses of all the servers in the cluster.
nginx:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -274,6 +275,7 @@ alerts:
# 2. Set the statusPage.cnameRecord to "oneuptime.yourcompany.com"
# 3. Create CNAME record in your DNS provider with the name "status.yourcompany.com" and value "oneuptime.yourcompany.com"
statusPage:
enabled: true
replicaCount: 1
cnameRecord:
disableTelemetryCollection: false
@@ -289,6 +291,7 @@ probes:
one:
name: "Probe"
description: "Probe"
enabled: true
monitoringWorkers: 3
monitorFetchLimit: 10
monitorRetryLimit: 3
@@ -544,6 +547,7 @@ readinessProbe: # Readiness probe configuration
# OpenTelemetry Collector Configuration
openTelemetryCollector:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -560,6 +564,7 @@ openTelemetryCollector:
containerSecurityContext: {}
accounts:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -571,6 +576,7 @@ accounts:
containerSecurityContext: {}
home:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -582,6 +588,7 @@ home:
containerSecurityContext: {}
dashboard:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -593,6 +600,7 @@ dashboard:
containerSecurityContext: {}
adminDashboard:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -604,6 +612,7 @@ adminDashboard:
containerSecurityContext: {}
worker:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -627,6 +636,7 @@ worker:
cooldownPeriod: 300
workflow:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -639,6 +649,7 @@ workflow:
containerSecurityContext: {}
apiReference:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -650,6 +661,7 @@ apiReference:
containerSecurityContext: {}
docs:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -661,6 +673,7 @@ docs:
containerSecurityContext: {}
app:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -672,6 +685,7 @@ app:
containerSecurityContext: {}
probeIngest:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -695,6 +709,7 @@ probeIngest:
cooldownPeriod: 300
telemetry:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -719,6 +734,7 @@ telemetry:
cooldownPeriod: 300
incomingRequestIngest:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -742,6 +758,7 @@ incomingRequestIngest:
cooldownPeriod: 300
isolatedVM:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false
@@ -753,6 +770,7 @@ isolatedVM:
containerSecurityContext: {}
serverMonitorIngest:
enabled: true
replicaCount: 1
disableTelemetryCollection: false
disableAutoscaler: false