diff --git a/README.md b/README.md index 86ee197..56f47bb 100644 --- a/README.md +++ b/README.md @@ -1,127 +1,9 @@ - -

oneuptime logo

- +# 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) +- *oneuptime* : Chart for deploying OneUpitme app. [Read Docs here](oneuptime/README.md) -## 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/index.yaml b/index.yaml index 516dd69..eaa08dc 100644 --- a/index.yaml +++ b/index.yaml @@ -1,6 +1,37 @@ apiVersion: v1 entries: oneuptime: + - annotations: + artifacthub.io/category: monitoring-logging + artifacthub.io/license: MIT + artifacthub.io/prerelease: "false" + artifacthub.io/signKey: | + fingerprint: 83F2C1DDF58A052464C4A1729D87E494AC016697 + url: https://keybase.io/oneuptime/pgp_keys.asc + apiVersion: v2 + appVersion: 7.0.834 + created: "2023-10-04T19:55:56.945087866Z" + dependencies: + - name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 12.12.5 + - name: redis + repository: https://charts.bitnami.com/bitnami + version: 18.1.0 + - name: clickhouse + repository: https://charts.bitnami.com/bitnami + version: 4.0.2 + - name: minio + repository: https://charts.bitnami.com/bitnami + version: 12.8.9 + description: The Complete Open-Source Observability Platform + digest: 158847c481b4a37c9ba7701b41cfc8ccf268ad8cfbfd34dc24dcefe51f23b389 + icon: https://raw.githubusercontent.com/OneUptime/oneuptime/master/Home/public/img/OneUptimePNG/1.png + name: oneuptime + type: application + urls: + - oneuptime-7.0.834.tgz + version: 7.0.834 - annotations: artifacthub.io/category: monitoring-logging artifacthub.io/license: MIT @@ -10,7 +41,7 @@ entries: url: https://keybase.io/oneuptime/pgp_keys.asc apiVersion: v2 appVersion: 7.0.829 - created: "2023-10-04T12:23:29.544218879Z" + created: "2023-10-04T19:55:56.922357387Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -41,7 +72,7 @@ entries: url: https://keybase.io/oneuptime/pgp_keys.asc apiVersion: v2 appVersion: 7.0.826 - created: "2023-10-04T12:23:29.512887543Z" + created: "2023-10-04T19:55:56.898609409Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -72,7 +103,7 @@ entries: url: https://keybase.io/oneuptime/pgp_keys.asc apiVersion: v2 appVersion: 7.0.823 - created: "2023-10-04T12:23:29.483924538Z" + created: "2023-10-04T19:55:56.87567613Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -103,7 +134,7 @@ entries: url: https://keybase.io/oneuptime/pgp_keys.asc apiVersion: v2 appVersion: 7.0.818 - created: "2023-10-04T12:23:29.453503153Z" + created: "2023-10-04T19:55:56.851423052Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -134,7 +165,7 @@ entries: url: https://keybase.io/oneuptime/pgp_keys.asc apiVersion: v2 appVersion: 7.0.817 - created: "2023-10-04T12:23:29.427679622Z" + created: "2023-10-04T19:55:56.826805175Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -165,7 +196,7 @@ entries: url: https://keybase.io/oneuptime/pgp_keys.asc apiVersion: v2 appVersion: 7.0.814 - created: "2023-10-04T12:23:29.400883838Z" + created: "2023-10-04T19:55:56.803581496Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -189,7 +220,7 @@ entries: version: 7.0.814 - apiVersion: v2 appVersion: 7.0.810 - created: "2023-10-04T12:23:29.373242007Z" + created: "2023-10-04T19:55:56.780355917Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -213,7 +244,7 @@ entries: version: 7.0.810 - apiVersion: v2 appVersion: 7.0.804 - created: "2023-10-04T12:23:29.34641482Z" + created: "2023-10-04T19:55:56.756494739Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -237,7 +268,7 @@ entries: version: 7.0.804 - apiVersion: v2 appVersion: 7.0.797 - created: "2023-10-04T12:23:29.318881195Z" + created: "2023-10-04T19:55:56.73360906Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -261,7 +292,7 @@ entries: version: 7.0.797 - apiVersion: v2 appVersion: 7.0.796 - created: "2023-10-04T12:23:29.290111201Z" + created: "2023-10-04T19:55:56.709227082Z" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami @@ -283,4 +314,4 @@ entries: urls: - oneuptime-7.0.796.tgz version: 7.0.796 -generated: "2023-10-04T12:23:29.26011994Z" +generated: "2023-10-04T19:55:56.685845703Z" diff --git a/oneuptime-7.0.834.tgz b/oneuptime-7.0.834.tgz new file mode 100644 index 0000000..cd718cc Binary files /dev/null and b/oneuptime-7.0.834.tgz differ diff --git a/oneuptime-7.0.834.tgz.prov b/oneuptime-7.0.834.tgz.prov new file mode 100644 index 0000000..0b50554 --- /dev/null +++ b/oneuptime-7.0.834.tgz.prov @@ -0,0 +1,50 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA512 + +annotations: + artifacthub.io/category: monitoring-logging + artifacthub.io/license: MIT + artifacthub.io/prerelease: "false" + artifacthub.io/signKey: | + fingerprint: 83F2C1DDF58A052464C4A1729D87E494AC016697 + url: https://keybase.io/oneuptime/pgp_keys.asc +apiVersion: v2 +appVersion: 7.0.834 +dependencies: +- - name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 12.12.5 +- - name: redis + repository: https://charts.bitnami.com/bitnami + version: 18.1.0 +- - name: clickhouse + repository: https://charts.bitnami.com/bitnami + version: 4.0.2 +- - name: minio + repository: https://charts.bitnami.com/bitnami + version: 12.8.9 +description: The Complete Open-Source Observability Platform +icon: https://raw.githubusercontent.com/OneUptime/oneuptime/master/Home/public/img/OneUptimePNG/1.png +name: oneuptime +type: application +version: 7.0.834 + +... +files: + oneuptime-7.0.834.tgz: sha256:158847c481b4a37c9ba7701b41cfc8ccf268ad8cfbfd34dc24dcefe51f23b389 +-----BEGIN PGP SIGNATURE----- + +wsFcBAEBCgAQBQJlHcNMCRCdh+SUrAFmlwAAVXIQAE0AsdRG89ATCOclMGBmYmel +DtmnNAVBFOUUAtbqimrC/VOTG8gh2HwHKh7eVUQk7Ev4o/Hrw8e90CNmumf52NSw +fcpW7kNBa+lwalxGCqesZHyVQljdxeSz7EUA7Kjrr3KzVCy3w++9FeYmfN5avYOL +o3Br5P4DI3+NAS48mmTLCc7fjt3THty6woZJBIbe3P7MqSlMnp6OAe+C3mOy4zBB +PDT2Nv4W4gC5QQjCqXH0JNDuXvt4Z3myqQ1jgNtUrxbjGapBLz/E9W/jjdw836aU +fQ8TxCgAy01Q0X9y6taImZf9gDYkFxzeBnSjiYSmwiSqtU6nqw9nK1i61OtOLfKT +EyJU93/Zf/geTOk3SKb0qSiYjtg/pg0nS3GaIC/JDoezQ97UKy+YXz4lVpm0+Eo0 +9nmAplzuQUB/1ooXqCDrbRdLovEnrl9jqZZjtT8//ZBHbXrYCkX4ARPmyH2i0U7t +2E1VHY+hTbHqFh16gOdXurOoBRXwmjvjzlXSGptBTDowqavtYTNNlZN0/5E31Wmc +rEoCyyBssDdsLnB5c3p8AJkgHRYTDGQvMyCC97BszViIb34SWm/zneXtsSJziTqV +OLfIWlNJTBSSsIIWRxTL8f+2jx1QUrPp4vlMsBdpodAe+tp0DilZvAlMymZcLbv6 +XGOrufqhtbfu+9HemjXK +=PlWC +-----END PGP SIGNATURE----- \ No newline at end of file diff --git a/oneuptime/README.md b/oneuptime/README.md index 86ee197..2503f7a 100644 --- a/oneuptime/README.md +++ b/oneuptime/README.md @@ -11,35 +11,15 @@ OneUptime is a comprehensive solution for monitoring and managing your online se ## Install Helm Chart -#### Create values.yaml file and change the default secrets. +#### Create values.yaml file. -Create a values.yaml file and change the default secrets. +Create a values.yaml file and change the host. ```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 +host: + +# If hosted on non-ssl server then change this to http +httpProtocol: https ``` #### Pick a Storage Class @@ -85,8 +65,6 @@ The following table lists the configurable parameters of the OneUptime chart and | `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` | | @@ -100,9 +78,7 @@ The following table lists the configurable parameters of the OneUptime chart and | `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` | | diff --git a/oneuptime/templates/_helpers.tpl b/oneuptime/templates/_helpers.tpl index f4159a5..3053f78 100644 --- a/oneuptime/templates/_helpers.tpl +++ b/oneuptime/templates/_helpers.tpl @@ -93,11 +93,6 @@ {{- 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 }} @@ -111,27 +106,39 @@ 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 }} + valueFrom: + secretKeyRef: + name: {{ printf "%s-%s" $.Release.Name "clickhouse" }} + key: admin-password - name: CLICKHOUSE_HOST value: {{ $.Release.Name }}-clickhouse.{{ $.Release.Namespace }}.svc.cluster.local - 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 - name: REDIS_PORT value: {{ printf "6379" | squote}} - name: REDIS_PASSWORD - value: {{ $.Values.redis.auth.password }} + valueFrom: + secretKeyRef: + name: {{ printf "%s-%s" $.Release.Name "redis" }} + key: redis-password - name: REDIS_DB value: {{ printf "0" | squote}} - name: REDIS_USERNAME @@ -144,7 +151,10 @@ - name: DATABASE_USERNAME value: {{ $.Values.postgresql.auth.username }} - name: DATABASE_PASSWORD - value: {{ $.Values.postgresql.auth.password }} + valueFrom: + secretKeyRef: + name: {{ printf "%s-%s" $.Release.Name "postgresql" }} + key: password - name: DATABASE_DATABASE value: {{ $.Values.postgresql.auth.database }} @@ -241,7 +251,7 @@ spec: {{- range $key, $val := $.Volumes }} - name: {{ $key }} persistentVolumeClaim: - claimName: {{ $val }} + claimName: {{ $val.Name }} {{- end }} {{- end }} containers: @@ -266,6 +276,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/oneuptime/templates/haraka.yaml b/oneuptime/templates/haraka.yaml index 1fe94bf..372ad10 100644 --- a/oneuptime/templates/haraka.yaml +++ b/oneuptime/templates/haraka.yaml @@ -1,5 +1,5 @@ # OneUptime haraka Deployment -{{- $harakaEnv := dict "SMTP_USERNAME" "oneuptime" "SMTP_PASSWORD" $.Values.internalSmtp.password "DKIM_SELECTOR" "oneuptime" "DOMAIN" $.Values.internalSmtp.sendingDomain "DKIM_PRIVATE_KEY" $.Values.internalSmtp.dkimPrivateKey "DKIM_PUBLIC_KEY" $.Values.internalSmtp.dkimPublicKey -}} +{{- $harakaEnv := dict "SMTP_USERNAME" "oneuptime" "SMTP_PASSWORD" "internal_smtp_password" "DKIM_SELECTOR" "oneuptime" "DOMAIN" $.Values.internalSmtp.sendingDomain "DKIM_PRIVATE_KEY" $.Values.internalSmtp.dkimPrivateKey "DKIM_PUBLIC_KEY" $.Values.internalSmtp.dkimPublicKey -}} {{- $harakaDeploymentArgs :=dict "ServiceName" "haraka" "Port" $.Values.port.haraka "Release" $.Release "Values" $.Values "Env" $harakaEnv -}} {{- include "oneuptime.deployment" $harakaDeploymentArgs }} --- diff --git a/oneuptime/templates/home.yaml b/oneuptime/templates/home.yaml index 78f3f44..ac8dc79 100644 --- a/oneuptime/templates/home.yaml +++ b/oneuptime/templates/home.yaml @@ -1,16 +1,19 @@ +{{- if $.Values.billing.enabled }} + # OneUptime home Deployment {{- $homeEnv := dict "PORT" $.Values.port.home -}} {{- $homeDeploymentArgs :=dict "IsUI" true "ServiceName" "home" "Port" $.Values.port.home "Release" $.Release "Values" $.Values "Env" $homeEnv -}} {{- include "oneuptime.deployment" $homeDeploymentArgs }} --- +# OneUptime home autoscaler +{{- $homeAutoScalerArgs := dict "ServiceName" "home" "Release" $.Release "Values" $.Values -}} +{{- include "oneuptime.autoscaler" $homeAutoScalerArgs }} +--- +{{- end }} + # OneUptime home Service {{- $homeServiceArgs := dict "ServiceName" "home" "Port" $.Values.port.home "Release" $.Release "Values" $.Values -}} {{- include "oneuptime.service" $homeServiceArgs }} ---- - -# OneUptime home autoscaler -{{- $homeAutoScalerArgs := dict "ServiceName" "home" "Release" $.Release "Values" $.Values -}} -{{- include "oneuptime.autoscaler" $homeAutoScalerArgs }} --- \ No newline at end of file diff --git a/oneuptime/templates/nginx.yaml b/oneuptime/templates/nginx.yaml index c1328c4..7e22a4f 100644 --- a/oneuptime/templates/nginx.yaml +++ b/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/oneuptime/templates/notification.yaml b/oneuptime/templates/notification.yaml index 53d995b..8efa293 100644 --- a/oneuptime/templates/notification.yaml +++ b/oneuptime/templates/notification.yaml @@ -1,5 +1,5 @@ # OneUptime notification Deployment -{{- $notificationEnv := dict "PORT" $.Values.port.notification "SMS_DEFAULT_COST_IN_CENTS" $.Values.billing.smsDefaultValueInCents "CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE" $.Values.billing.callDefaultValueInCentsPerMinute "INTERNAL_SMTP_EMAIL" $.Values.internalSmtp.email "INTERNAL_SMTP_PASSWORD" $.Values.internalSmtp.password -}} +{{- $notificationEnv := dict "PORT" $.Values.port.notification "SMS_DEFAULT_COST_IN_CENTS" $.Values.billing.smsDefaultValueInCents "CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE" $.Values.billing.callDefaultValueInCentsPerMinute "INTERNAL_SMTP_EMAIL" $.Values.internalSmtp.email "INTERNAL_SMTP_PASSWORD" "internal_smtp_password" -}} {{- $notificationDeploymentArgs :=dict "IsServer" true "ServiceName" "notification" "Port" $.Values.port.notification "Release" $.Release "Values" $.Values "Env" $notificationEnv -}} {{- include "oneuptime.deployment" $notificationDeploymentArgs }} --- diff --git a/oneuptime/templates/probe.yaml b/oneuptime/templates/probe.yaml index 73dec23..8c546d1 100644 --- a/oneuptime/templates/probe.yaml +++ b/oneuptime/templates/probe.yaml @@ -1,11 +1,56 @@ {{- range $key, $val := $.Values.probes }} - -# OneUptime probe Deployment -{{- $probeEnv := dict "PORT" $.Values.port.probe "PROBE_API_URL" (include "oneuptime.env.probe-api-url" $) "PROBE_NAME" $val.name "PROBE_DESCRIPTION" $val.description "PROBE_MONITORING_WORKERS" $val.monitoringWorkers "PROBE_KEY" $val.key "PROBE_MONITOR_FETCH_LIMIT" $val.monitorFetchLimit "ONEUPTIME_SECRET" $.Values.secrets.oneuptime -}} -{{- $probeDeploymentArgs :=dict "ServiceName" (printf "probe-%s" $key) "Release" $.Release "Values" $.Values "Env" $probeEnv "ImageName" "probe" -}} -{{- include "oneuptime.deployment" $probeDeploymentArgs }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ printf "%s-%s" $.Release.Name (printf "probe-%s" $key) }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ printf "%s-%s" $.Release.Name (printf "probe-%s" $key) }} + app.kubernetes.io/part-of: oneuptime + app.kubernetes.io/managed-by: Helm + appname: oneuptime +spec: + selector: + matchLabels: + app: {{ printf "%s-%s" $.Release.Name (printf "probe-%s" $key) }} + replicas: {{ $.Values.deployment.replicaCount }} + template: + metadata: + labels: + app: {{ printf "%s-%s" $.Release.Name (printf "probe-%s" $key) }} + spec: + containers: + - image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "probe" $.Values.image.tag }} + name: {{ printf "%s-%s" $.Release.Name (printf "probe-%s" $key) }} + imagePullPolicy: {{ $.Values.image.pullPolicy }} + env: + - name: PORT + value: {{ $.Values.port.probe }} + - name: PROBE_API_URL + value: {{ $.Release.Name }}-probe-api.{{ $.Release.Namespace }}.svc.cluster.local + - name: PROBE_NAME + value: {{ $val.name }} + - name: PROBE_DESCRIPTION + value: {{ $val.description }} + - name: PROBE_MONITORING_WORKERS + value: {{ $val.monitoringWorkers | squote }} + - name: PROBE_KEY + valueFrom: + secretKeyRef: + name: {{ printf "%s-%s" $.Release.Name "secrets" }} + key: {{printf "probe-%s" $key}} + - name: PROBE_MONITOR_FETCH_LIMIT + value: {{ $val.monitorFetchLimit | squote }} + - name: ONEUPTIME_SECRET + valueFrom: + secretKeyRef: + name: {{ printf "%s-%s" $.Release.Name "secrets" }} + key: oneuptime-secret + + restartPolicy: {{ $.Values.image.restartPolicy }} --- + # OneUptime probe autoscaler {{- $probeAutoScalerArgs := dict "ServiceName" (printf "probe-%s" $key) "Release" $.Release "Values" $.Values -}} {{- include "oneuptime.autoscaler" $probeAutoScalerArgs }} diff --git a/oneuptime/templates/secrets.yaml b/oneuptime/templates/secrets.yaml new file mode 100644 index 0000000..bb911db --- /dev/null +++ b/oneuptime/templates/secrets.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ printf "%s-%s" $.Release.Name "secrets" }} + annotations: + "helm.sh/resource-policy": "keep" +type: Opaque +data: + internal-smtp: {{ randAlphaNum 32 | b64enc | quote }} + oneuptime-secret: {{ randAlphaNum 32 | b64enc | quote }} + encryption-secret: {{ randAlphaNum 32 | b64enc | quote }} + {{- range $key, $val := $.Values.probes }} + {{printf "probe-%s" $key}}: {{ randAlphaNum 32 | b64enc | quote }} + {{- end }} \ No newline at end of file diff --git a/oneuptime/templates/test-server.yaml b/oneuptime/templates/test-server.yaml index a531478..7d03e24 100644 --- a/oneuptime/templates/test-server.yaml +++ b/oneuptime/templates/test-server.yaml @@ -1,3 +1,5 @@ +{{- if $.Values.testServer.enabled }} + # OneUptime testServer Deployment {{- $testServerEnv := dict "PORT" $.Values.port.testServer -}} {{- $testServerDeploymentArgs :=dict "IsUI" true "ServiceName" "test-server" "Port" $.Values.port.testServer "Release" $.Release "Values" $.Values "Env" $testServerEnv -}} @@ -13,4 +15,6 @@ # OneUptime testServer autoscaler {{- $testServerAutoScalerArgs := dict "ServiceName" "test-server" "Release" $.Release "Values" $.Values -}} {{- include "oneuptime.autoscaler" $testServerAutoScalerArgs }} ---- \ No newline at end of file +--- + +{{- end }} \ No newline at end of file diff --git a/oneuptime/templates/workers.yaml b/oneuptime/templates/workers.yaml index caa8108..a21450d 100644 --- a/oneuptime/templates/workers.yaml +++ b/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/oneuptime/values.yaml b/oneuptime/values.yaml index 77a29af..fd4ebc0 100644 --- a/oneuptime/values.yaml +++ b/oneuptime/values.yaml @@ -28,7 +28,6 @@ ingress: postgresql: auth: username: oneuptime - password: please-change-this-to-random-value database: oneuptimedb architecture: standalone primary: @@ -47,12 +46,14 @@ clickhouse: size: 25Gi auth: username: oneuptime - password: please-change-this-to-random-value + initdbScripts: + db-init.sql: | + CREATE DATABASE oneuptime; redis: architecture: standalone auth: - password: please-change-this-to-random-value + enabled: true master: persistence: size: 25Gi @@ -98,7 +99,6 @@ analytics: key: internalSmtp: - password: please-change-this-to-random-value sendingDomain: dkimPrivateKey: dkimPublicKey: @@ -111,21 +111,15 @@ incidents: statusPage: cnameRecord: -secrets: - oneuptime: please-change-this-to-random-value - encryption: please-change-this-to-random-value - probes: one: name: "Probe 1" description: "Probe 1" - key: please-change-this-to-random-value monitoringWorkers: 3 monitorFetchLimit: 10 two: name: "Probe 2" description: "Probe 2" - key: please-change-this-to-random-value monitoringWorkers: 3 monitorFetchLimit: 10 @@ -149,3 +143,7 @@ port: adminDashboard: 3158 nginx: 80 haraka: 2525 + + +testServer: + enabled: false \ No newline at end of file