diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index fd25377a28..ee20e471e0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -67,7 +67,6 @@ jobs:
ssh-add - <<< '${{ secrets.HELM_CHART_GITHUB_REPO_DEPLOY_KEY }}'
git clone git@github.com:OneUptime/helm-chart.git
cd oneuptime/HelmChart/Public
- cp README.md oneuptime/README.md
helm lint oneuptime
helm package --sign --key 'key@oneuptime.com' --keyring ~/.gnupg/secring.gpg oneuptime --version 7.0.${{needs.generate-build-number.outputs.build_number}} --app-version 7.0.${{needs.generate-build-number.outputs.build_number}}
echo "Helm Chart Package created successfully"
@@ -76,7 +75,6 @@ jobs:
echo "Copying the package to helm-chart repo"
rm -r ../../helm-chart/oneuptime
cp -r ./Public/* ../../helm-chart
- cp ./Public/README.md ../../helm-chart/oneuptime/README.md
echo "Package copied successfully"
cd .. && cd .. && cd helm-chart
echo "Updating helm-chart repo"
diff --git a/HelmChart/Public/README.md b/HelmChart/Public/README.md
index 86ee1975e9..56f47bbabc 100644
--- a/HelmChart/Public/README.md
+++ b/HelmChart/Public/README.md
@@ -1,127 +1,9 @@
-
-
-
+# Helm Chart for OneUptime
-# OneUptime Helm Chart
+This repository is used to host all the helm-charts for OneUptime.
-OneUptime is a comprehensive solution for monitoring and managing your online services. Whether you need to check the availability of your website, dashboard, API, or any other online resource, OneUptime can alert your team when downtime happens and keep your customers informed with a status page. OneUptime also helps you handle incidents, set up on-call rotations, run tests, secure your services, analyze logs, track performance, and debug errors.
+### Helm Packages
-[Overview of OneUptime](http://www.oneuptime.com)
-
-## Install Helm Chart
+- *oneuptime* : Chart for deploying OneUpitme app. [Read Docs here](oneuptime/README.md)
-#### Create values.yaml file and change the default secrets.
-
-Create a values.yaml file and change the default secrets.
-
-```yaml
-secrets:
- oneuptime: please-change-this-to-random-value
- encryption: please-change-this-to-random-value
-
-probes:
- one:
- key: please-change-this-to-random-value
- two:
- key: please-change-this-to-random-value
-
-redis:
- auth:
- password: please-change-this-to-random-value
-
-postgresql:
- auth:
- password: please-change-this-to-random-value
-
-internalSmtp:
- password: please-change-this-to-random-value
-
-clickhouse:
- auth:
- password: please-change-this-to-random-value
-```
-
-#### Pick a Storage Class
-
-Storage class are different for different cloud environemtns. Please pick the right one for your cloud environment.
-
-To get a list of storage classes, run the following command:
-
-```console
-kubectl get storageclass
-```
-
-and add this to your values.yaml file
-
-```yaml
-global:
- storageClass: "your-storage-class"
-```
-
-
-```console
-helm repo add oneuptime https://helm-chart.oneuptime.com/
-helm install my-oneuptime oneuptime/oneuptime -f values.yaml
-```
-
-## Uninstall Helm Chart
-
-```console
-helm uninstall my-release
-```
-
-## Configuration
-
-The following table lists the configurable parameters of the OneUptime chart and their default values.
-
-| Parameter | Description | Default | Change Required |
-| --------- | ----------- | ------- | --------------- |
-| `global.storageClass` | Storage class to be used for all persistent volumes | `nil` | ✅ |
-| `host` | Hostname for the ingress | `localhost` | ✅ |
-| `httpProtocol` | If the server is hosted with SSL/TLS cert then change this value to https | `http` | ✅ |
-| `image.registry` | Docker image registry | `docker.io` | |
-| `image.repository` | Docker image repository | `oneuptime` | |
-| `image.tag` | Docker image tag | `release` |
-| `image.pullPolicy` | Docker image pull policy | `IfNotPresent` | |
-| `image.restartPolicy` | Docker image restart policy | `Always` | |
-| `secrets.oneuptime` | Secret for OneUptime | `please-change-this-to-random-value` | ✅ |
-| `secrets.encryption` | Secret for Encryption | `please-change-this-to-random-value` | ✅ |
-| `autoScaling.enabled` | Enable autoscaling | `false` | |
-| `autoScaling.minReplicas` | Minimum number of replicas | `1` | |
-| `autoScaling.maxReplicas` | Maximum number of replicas | `100` | |
-| `autoScaling.targetCPUUtilizationPercentage` | Target CPU utilization percentage | `80` | |
-| `autoScaling.targetMemoryUtilizationPercentage` | Target memory utilization percentage | `80` | |
-| `nodeEnvironment` | Node environment (please dont change this unless you're doing local development) | `production` | |
-| `ingress.service.type` | Ingress service type | `LoadBalancer` | |
-| `ingress.service.loadBalancerIP` | Ingress service load balancer IP | `nil` | |
-| `deployment.replicaCount` | Number of replicas | `1` | |
-| `probe..name` | Probe name | `` | |
-| `probe..description` | Probe description | `nil` | |
-| `probe..monitoringWorkers` | Number of threads / parallel processes you need to monitor your resources | `3` | |
-| `probe..monitorFetchLimit` | Number of resources to be monitored in parallel | `10` | |
-| `probe..key` | Probe authentication key | `please-change-this-to-random-value` | ✅ |
-| `statusPage.cnameRecord` | CNAME record for the status page | `nil` | |
-| `internalSmtp.password` | Pick any random secure password. It just secures the internal SMTP Server | `nil` | ✅ |
-| `internalSmtp.sendingDomain` | Domain to send emails from | `nil` | |
-| `internalSmtp.dkimPrivateKey` | DKIM Private Key that is set for sending domain | `nil` | |
-| `internalSmtp.dkimPublicKey` | DKIM Public Key that is set for sending domain | `nil` | |
-| `internalSmtp.email` | Email address to send emails from | `nil` | |
-| `internalSmtp.name` | Name to send emails from | `nil` | |
-| `incidents.disableAutomaticCreation` | Disable incident creation (use this when your team is overloaded with incidents or in emergencies) | `false` | |
-
-## Chart Dependencies
-
-We use these charts as dependencies. You dont need to install them separately. Please read the readme for these individual charts to understand the configuration options.
-
-| Chart | Description | Repository |
-| ----- | ----------- | ---------- |
-| `postgresql` | PostgreSQL database | https://charts.bitnami.com/bitnami |
-| `redis` | Redis database | https://charts.bitnami.com/bitnami |
-| `clickhouse` | Clickhouse database | https://charts.bitnami.com/bitnami |
-| `minio` | Minio | https://charts.bitnami.com/bitnami |
-
-## Contributing
-
-We <3 contributions big and small.
-https://github.com/OneUptime/helm-chart is the read only release repository. Please direct your contributions here: https://github.com/OneUptime/oneuptime
\ No newline at end of file
diff --git a/HelmChart/Public/oneuptime/README.md b/HelmChart/Public/oneuptime/README.md
new file mode 100644
index 0000000000..86ee1975e9
--- /dev/null
+++ b/HelmChart/Public/oneuptime/README.md
@@ -0,0 +1,127 @@
+
+
+
+
+# OneUptime Helm Chart
+
+OneUptime is a comprehensive solution for monitoring and managing your online services. Whether you need to check the availability of your website, dashboard, API, or any other online resource, OneUptime can alert your team when downtime happens and keep your customers informed with a status page. OneUptime also helps you handle incidents, set up on-call rotations, run tests, secure your services, analyze logs, track performance, and debug errors.
+
+[Overview of OneUptime](http://www.oneuptime.com)
+
+## Install Helm Chart
+
+
+#### Create values.yaml file and change the default secrets.
+
+Create a values.yaml file and change the default secrets.
+
+```yaml
+secrets:
+ oneuptime: please-change-this-to-random-value
+ encryption: please-change-this-to-random-value
+
+probes:
+ one:
+ key: please-change-this-to-random-value
+ two:
+ key: please-change-this-to-random-value
+
+redis:
+ auth:
+ password: please-change-this-to-random-value
+
+postgresql:
+ auth:
+ password: please-change-this-to-random-value
+
+internalSmtp:
+ password: please-change-this-to-random-value
+
+clickhouse:
+ auth:
+ password: please-change-this-to-random-value
+```
+
+#### Pick a Storage Class
+
+Storage class are different for different cloud environemtns. Please pick the right one for your cloud environment.
+
+To get a list of storage classes, run the following command:
+
+```console
+kubectl get storageclass
+```
+
+and add this to your values.yaml file
+
+```yaml
+global:
+ storageClass: "your-storage-class"
+```
+
+
+```console
+helm repo add oneuptime https://helm-chart.oneuptime.com/
+helm install my-oneuptime oneuptime/oneuptime -f values.yaml
+```
+
+## Uninstall Helm Chart
+
+```console
+helm uninstall my-release
+```
+
+## Configuration
+
+The following table lists the configurable parameters of the OneUptime chart and their default values.
+
+| Parameter | Description | Default | Change Required |
+| --------- | ----------- | ------- | --------------- |
+| `global.storageClass` | Storage class to be used for all persistent volumes | `nil` | ✅ |
+| `host` | Hostname for the ingress | `localhost` | ✅ |
+| `httpProtocol` | If the server is hosted with SSL/TLS cert then change this value to https | `http` | ✅ |
+| `image.registry` | Docker image registry | `docker.io` | |
+| `image.repository` | Docker image repository | `oneuptime` | |
+| `image.tag` | Docker image tag | `release` |
+| `image.pullPolicy` | Docker image pull policy | `IfNotPresent` | |
+| `image.restartPolicy` | Docker image restart policy | `Always` | |
+| `secrets.oneuptime` | Secret for OneUptime | `please-change-this-to-random-value` | ✅ |
+| `secrets.encryption` | Secret for Encryption | `please-change-this-to-random-value` | ✅ |
+| `autoScaling.enabled` | Enable autoscaling | `false` | |
+| `autoScaling.minReplicas` | Minimum number of replicas | `1` | |
+| `autoScaling.maxReplicas` | Maximum number of replicas | `100` | |
+| `autoScaling.targetCPUUtilizationPercentage` | Target CPU utilization percentage | `80` | |
+| `autoScaling.targetMemoryUtilizationPercentage` | Target memory utilization percentage | `80` | |
+| `nodeEnvironment` | Node environment (please dont change this unless you're doing local development) | `production` | |
+| `ingress.service.type` | Ingress service type | `LoadBalancer` | |
+| `ingress.service.loadBalancerIP` | Ingress service load balancer IP | `nil` | |
+| `deployment.replicaCount` | Number of replicas | `1` | |
+| `probe..name` | Probe name | `` | |
+| `probe..description` | Probe description | `nil` | |
+| `probe..monitoringWorkers` | Number of threads / parallel processes you need to monitor your resources | `3` | |
+| `probe..monitorFetchLimit` | Number of resources to be monitored in parallel | `10` | |
+| `probe..key` | Probe authentication key | `please-change-this-to-random-value` | ✅ |
+| `statusPage.cnameRecord` | CNAME record for the status page | `nil` | |
+| `internalSmtp.password` | Pick any random secure password. It just secures the internal SMTP Server | `nil` | ✅ |
+| `internalSmtp.sendingDomain` | Domain to send emails from | `nil` | |
+| `internalSmtp.dkimPrivateKey` | DKIM Private Key that is set for sending domain | `nil` | |
+| `internalSmtp.dkimPublicKey` | DKIM Public Key that is set for sending domain | `nil` | |
+| `internalSmtp.email` | Email address to send emails from | `nil` | |
+| `internalSmtp.name` | Name to send emails from | `nil` | |
+| `incidents.disableAutomaticCreation` | Disable incident creation (use this when your team is overloaded with incidents or in emergencies) | `false` | |
+
+## Chart Dependencies
+
+We use these charts as dependencies. You dont need to install them separately. Please read the readme for these individual charts to understand the configuration options.
+
+| Chart | Description | Repository |
+| ----- | ----------- | ---------- |
+| `postgresql` | PostgreSQL database | https://charts.bitnami.com/bitnami |
+| `redis` | Redis database | https://charts.bitnami.com/bitnami |
+| `clickhouse` | Clickhouse database | https://charts.bitnami.com/bitnami |
+| `minio` | Minio | https://charts.bitnami.com/bitnami |
+
+## Contributing
+
+We <3 contributions big and small.
+https://github.com/OneUptime/helm-chart is the read only release repository. Please direct your contributions here: https://github.com/OneUptime/oneuptime
\ No newline at end of file
diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl
index f4159a57ff..304076e9fe 100644
--- a/HelmChart/Public/oneuptime/templates/_helpers.tpl
+++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl
@@ -111,12 +111,18 @@
value: {{ printf "true" | squote }}
- name: ONEUPTIME_SECRET
- value: {{ $.Values.secrets.oneuptime }}
+ valueFrom:
+ secretKeyRef:
+ name: {{ printf "%s-%s" $.Release.Name "secrets" }}
+ key: oneuptime-secret
- name: ENCRYPTION_SECRET
- value: {{ $.Values.secrets.encryption }}
+ valueFrom:
+ secretKeyRef:
+ name: {{ printf "%s-%s" $.Release.Name "secrets" }}
+ key: encryption-secret
- name: CLICKHOUSE_USER
- value: {{ $.Values.clickhouse.auth.user }}
+ value: {{ $.Values.clickhouse.auth.username }}
- name: CLICKHOUSE_PASSWORD
value: {{ $.Values.clickhouse.auth.password }}
- name: CLICKHOUSE_HOST
@@ -124,7 +130,7 @@
- name: CLICKHOUSE_PORT
value: {{ printf "8123" | squote}}
- name: CLICKHOUSE_DATABASE
- value: {{ $.Values.clickhouse.database }}
+ value: {{ printf "oneuptime" | squote}}
- name: REDIS_HOST
value: {{ $.Release.Name }}-redis-master.{{ $.Release.Namespace }}.svc.cluster.local
@@ -241,7 +247,7 @@ spec:
{{- range $key, $val := $.Volumes }}
- name: {{ $key }}
persistentVolumeClaim:
- claimName: {{ $val }}
+ claimName: {{ $val.Name }}
{{- end }}
{{- end }}
containers:
@@ -266,6 +272,13 @@ spec:
value: {{ $val | squote }}
{{- end }}
{{- end }}
+ {{- if $.Volumes }}
+ volumeMounts:
+ {{- range $key, $val := $.Volumes }}
+ - name: {{ $key }}
+ mountPath: {{ $val.MountPath }}
+ {{- end }}
+ {{- end }}
{{- if $.Port }}
ports:
- containerPort: {{ $.Port }}
diff --git a/HelmChart/Public/oneuptime/templates/nginx.yaml b/HelmChart/Public/oneuptime/templates/nginx.yaml
index c1328c4b02..7e22a4f247 100644
--- a/HelmChart/Public/oneuptime/templates/nginx.yaml
+++ b/HelmChart/Public/oneuptime/templates/nginx.yaml
@@ -1,5 +1,6 @@
# OneUptime nginx Service
-{{- $nginxVolumes := dict "certs" (printf "%s-%s" $.Release.Name "certs") }}
+{{- $nginxCertVolume := dict "Name" (printf "%s-%s" $.Release.Name "certs") "MountPath" "/usr/src/Certs" }}
+{{- $nginxVolumes := dict "certs" $nginxCertVolume }}
{{- $nginxDeploymentArgs :=dict "isHTTPSPortEnabled" true "IsServer" true "ServiceName" "nginx" "Port" $.Values.port.nginx "Release" $.Release "Values" $.Values "Volumes" $nginxVolumes -}}
{{- include "oneuptime.deployment" $nginxDeploymentArgs }}
---
diff --git a/HelmChart/Public/oneuptime/templates/secrets.yaml b/HelmChart/Public/oneuptime/templates/secrets.yaml
new file mode 100644
index 0000000000..a122a1d314
--- /dev/null
+++ b/HelmChart/Public/oneuptime/templates/secrets.yaml
@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ printf "%s-%s" $.Release.Name "secrets" }}
+type: Opaque
+data:
+ oneuptime-secret: {{ randAlphaNum 32 | b64enc | quote }}
+ encryption-secret: {{ randAlphaNum 32 | b64enc | quote }}
\ No newline at end of file
diff --git a/HelmChart/Public/oneuptime/templates/workers.yaml b/HelmChart/Public/oneuptime/templates/workers.yaml
index caa81088cc..a21450d341 100644
--- a/HelmChart/Public/oneuptime/templates/workers.yaml
+++ b/HelmChart/Public/oneuptime/templates/workers.yaml
@@ -1,7 +1,8 @@
# OneUptime workers Deployment
# attach certs volume to workers whcih is used to store custom status page certs which is then used by nginx
-{{- $workerVolumes := dict "certs" (printf "%s-%s" $.Release.Name "certs") }}
+{{- $certVolume := dict "Name" (printf "%s-%s" $.Release.Name "certs") "MountPath" "/etc/nginx/certs" }}
+{{- $workerVolumes := dict "certs" $certVolume }}
{{- $workersEnv := dict "PORT" $.Values.port.workers -}}
{{- $workersDeploymentArgs :=dict "IsServer" true "ServiceName" "workers" "Port" $.Values.port.workers "Release" $.Release "Values" $.Values "Env" $workersEnv "Volumes" $workerVolumes -}}
{{- include "oneuptime.deployment" $workersDeploymentArgs }}
diff --git a/HelmChart/Public/oneuptime/values.yaml b/HelmChart/Public/oneuptime/values.yaml
index 77a29afb4c..e37f8afeef 100644
--- a/HelmChart/Public/oneuptime/values.yaml
+++ b/HelmChart/Public/oneuptime/values.yaml
@@ -48,6 +48,9 @@ clickhouse:
auth:
username: oneuptime
password: please-change-this-to-random-value
+ initdbScripts:
+ db-init.sql: |
+ CREATE DATABASE oneuptime;
redis:
architecture: standalone
diff --git a/HelmChart/README.md b/HelmChart/README.md
index 64522b5f78..3c10512740 100755
--- a/HelmChart/README.md
+++ b/HelmChart/README.md
@@ -1,4 +1,4 @@
# Helm Chart for OneUptime
-[Read Docs here](Public/README.md)
+[Read Docs here](Public/oneuptime/README.md)