From b4f2e738eadaa55cdc85421b68dcf18ed6d500a9 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Wed, 27 Sep 2023 12:39:10 +0000 Subject: [PATCH] fix nginx --- .../public/oneuptime/templates/_helpers.tpl | 128 +++++++++--------- Nginx/default.conf.template | 2 +- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/HelmChart/public/oneuptime/templates/_helpers.tpl b/HelmChart/public/oneuptime/templates/_helpers.tpl index 365d1267d8..ede4305e06 100644 --- a/HelmChart/public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/public/oneuptime/templates/_helpers.tpl @@ -21,70 +21,6 @@ value: {{ $.Values.analytics.key }} - name: ANALYTICS_HOST value: {{ $.Values.analytics.host }} -{{- end }} - - -{{- define "oneuptime.env.probe-api-url" }} -{{ $.Release.Name }}-probe-api.{{ $.Release.Namespace }}.svc.cluster.local -{{- end}} - - -{{- define "oneuptime.env.commonUi" }} -- name: IS_SERVER - value: {{ printf "false" | squote }} -- name: STATUS_PAGE_CNAME_RECORD - value: {{ $.Values.statusPage.cnameRecord }} -{{- end }} - - -{{- define "oneuptime.env.commonServer" }} -- name: IS_SERVER - value: {{ printf "true" | squote }} - -- name: ONEUPTIME_SECRET - value: {{ $.Values.secrets.oneuptime }} -- name: ENCRYPTION_SECRET - value: {{ $.Values.secrets.encryption }} - -- name: CLICKHOUSE_USER - value: {{ $.Values.clickhouse.user }} -- name: CLICKHOUSE_PASSWORD - value: {{ $.Values.clickhouse.password }} -- name: CLICKHOUSE_HOST - value: {{ $.Values.clickhouse.host }} -- name: CLICKHOUSE_PORT - value: {{ printf "8123" | squote}} -- name: CLICKHOUSE_DATABASE - value: {{ $.Values.clickhouse.database }} - -- name: REDIS_HOST - value: {{ $.Release.Name }}-redis-master.{{ $.Release.Namespace }}.svc.cluster.local -- name: REDIS_PORT - value: {{ printf "6379" | squote}} -- name: REDIS_PASSWORD - value: {{ $.Values.redis.password }} -- name: REDIS_DB - value: {{ printf "0" | squote}} -- name: REDIS_USERNAME - value: default - -- name: DATABASE_HOST - value: {{ $.Release.Name }}-postgresql.{{ $.Release.Namespace }}.svc.cluster.local -- name: DATABASE_PORT - value: {{ printf "5432" | squote}} -- name: DATABASE_USERNAME - value: {{ $.Values.postgresql.auth.username }} -- name: DATABASE_PASSWORD - value: {{ $.Values.postgresql.auth.password }} -- name: DATABASE_DATABASE - value: {{ $.Values.postgresql.auth.database }} - -- name: BILLING_PRIVATE_KEY - value: {{ $.Values.billing.privateKey }} - -- name: DISABLE_AUTOMATIC_INCIDENT_CREATION - value: {{ $.Values.incidents.disableAutomaticCreation | squote }} - - name: SERVER_ACCOUNTS_HOSTNAME value: {{ $.Release.Name }}-accounts.{{ $.Release.Namespace }}.svc.cluster.local - name: SERVER_DASHBOARD_API_HOSTNAME @@ -154,6 +90,70 @@ value: {{ $.Values.port.adminDashboard | squote }} {{- end }} + +{{- define "oneuptime.env.probe-api-url" }} +{{ $.Release.Name }}-probe-api.{{ $.Release.Namespace }}.svc.cluster.local +{{- end}} + + +{{- define "oneuptime.env.commonUi" }} +- name: IS_SERVER + value: {{ printf "false" | squote }} +- name: STATUS_PAGE_CNAME_RECORD + value: {{ $.Values.statusPage.cnameRecord }} +{{- end }} + + +{{- define "oneuptime.env.commonServer" }} +- name: IS_SERVER + value: {{ printf "true" | squote }} + +- name: ONEUPTIME_SECRET + value: {{ $.Values.secrets.oneuptime }} +- name: ENCRYPTION_SECRET + value: {{ $.Values.secrets.encryption }} + +- name: CLICKHOUSE_USER + value: {{ $.Values.clickhouse.user }} +- name: CLICKHOUSE_PASSWORD + value: {{ $.Values.clickhouse.password }} +- name: CLICKHOUSE_HOST + value: {{ $.Values.clickhouse.host }} +- name: CLICKHOUSE_PORT + value: {{ printf "8123" | squote}} +- name: CLICKHOUSE_DATABASE + value: {{ $.Values.clickhouse.database }} + +- name: REDIS_HOST + value: {{ $.Release.Name }}-redis-master.{{ $.Release.Namespace }}.svc.cluster.local +- name: REDIS_PORT + value: {{ printf "6379" | squote}} +- name: REDIS_PASSWORD + value: {{ $.Values.redis.password }} +- name: REDIS_DB + value: {{ printf "0" | squote}} +- name: REDIS_USERNAME + value: default + +- name: DATABASE_HOST + value: {{ $.Release.Name }}-postgresql.{{ $.Release.Namespace }}.svc.cluster.local +- name: DATABASE_PORT + value: {{ printf "5432" | squote}} +- name: DATABASE_USERNAME + value: {{ $.Values.postgresql.auth.username }} +- name: DATABASE_PASSWORD + value: {{ $.Values.postgresql.auth.password }} +- name: DATABASE_DATABASE + value: {{ $.Values.postgresql.auth.database }} + +- name: BILLING_PRIVATE_KEY + value: {{ $.Values.billing.privateKey }} + +- name: DISABLE_AUTOMATIC_INCIDENT_CREATION + value: {{ $.Values.incidents.disableAutomaticCreation | squote }} + +{{- end }} + {{- define "oneuptime.env.pod" }} - name: NODE_NAME valueFrom: diff --git a/Nginx/default.conf.template b/Nginx/default.conf.template index 926e069c26..64d0978e74 100644 --- a/Nginx/default.conf.template +++ b/Nginx/default.conf.template @@ -11,7 +11,7 @@ upstream file { } upstream dashboard-api { - server ${SERVER_DASHBAORD_API_HOSTNAME}:${DASHBOARD_API_PORT} weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_DASHBOARD_API_HOSTNAME}:${DASHBOARD_API_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream workflow {