From 2f29c2e24c5ab1a2a1889f5ae7e12ac181bbc0f3 Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Mon, 3 Nov 2025 21:56:17 +0000 Subject: [PATCH] refactor(helm): move provisionSSL under ssl.provision and update templates/schema Nest the top-level provisionSSL into ssl.provision in values.yaml and values.schema.json, and update _helpers.tpl to read the new path (using default false via dig) so PROVISION_SSL env is derived from ssl.provision. --- HelmChart/Public/oneuptime/templates/_helpers.tpl | 2 +- HelmChart/Public/oneuptime/values.schema.json | 12 +++++++++--- HelmChart/Public/oneuptime/values.yaml | 5 +++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl index f2230161e2..54e57dc4bc 100644 --- a/HelmChart/Public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl @@ -50,7 +50,7 @@ Usage: - name: HOST value: {{ $.Values.host }} - name: PROVISION_SSL - value: {{ ternary "true" "false" $.Values.provisionSSL | quote }} + value: {{ ternary "true" "false" (default false (dig "ssl" "provision" $.Values)) | quote }} - name: STATUS_PAGE_CNAME_RECORD value: {{ $.Values.statusPage.cnameRecord }} - name: ALLOWED_ACTIVE_MONITOR_COUNT_IN_FREE_PLAN diff --git a/HelmChart/Public/oneuptime/values.schema.json b/HelmChart/Public/oneuptime/values.schema.json index 8df8d3a9c5..0c9315868d 100644 --- a/HelmChart/Public/oneuptime/values.schema.json +++ b/HelmChart/Public/oneuptime/values.schema.json @@ -22,9 +22,15 @@ "type": "string", "enum": ["http", "https"] }, - "provisionSSL": { - "type": "boolean", - "description": "Automatically provision a Let's Encrypt certificate for the primary host" + "ssl": { + "type": "object", + "properties": { + "provision": { + "type": "boolean", + "description": "Automatically provision a Let's Encrypt certificate for the primary host" + } + }, + "additionalProperties": false }, "oneuptimeSecret": { "type": ["string", "null"] diff --git a/HelmChart/Public/oneuptime/values.yaml b/HelmChart/Public/oneuptime/values.yaml index 67f7c3d538..97a1db3cd5 100644 --- a/HelmChart/Public/oneuptime/values.yaml +++ b/HelmChart/Public/oneuptime/values.yaml @@ -5,8 +5,9 @@ global: # Please change this to the domain name / IP where OneUptime server is hosted on. host: localhost httpProtocol: http -# Automatically provision a Let's Encrypt certificate for the primary host when set to true. -provisionSSL: false +ssl: + # Automatically provision a Let's Encrypt certificate for the primary host when set to true. + provision: false # Important: You do need to set this to a long random values if you're using OneUptime in production. # Please set this to string.