From 0d0c4638c1ff3b1c134dbc50c9aff2ebf6e43beb Mon Sep 17 00:00:00 2001 From: Hayk Davtyan <46712946+hayk96@users.noreply.github.com> Date: Sun, 19 Mar 2023 01:30:03 +0400 Subject: [PATCH] Release - alerta-web 0.1.4 (#22) * Updated ConfigMap * Updated Helm values according to the new version of bitnami/postgres * Upgrade requirement * Bump Helm chart version * Bump version -> 9.0.0 --- .github/workflows/docker-image.yml | 2 +- charts/alerta-web/Chart.yaml | 6 +- charts/alerta-web/README.md | 86 ++++++++++++---------- charts/alerta-web/templates/configmap.yaml | 2 +- charts/alerta-web/values.yaml | 22 +++--- 5 files changed, 64 insertions(+), 54 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 12ba34e..87e91ed 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,7 +2,7 @@ name: Alerta Web Docker Image CI env: IMAGE_NAME: alerta-web - IMAGE_TAG: 8.7.0 + IMAGE_TAG: 9.0.0 on: pull_request: diff --git a/charts/alerta-web/Chart.yaml b/charts/alerta-web/Chart.yaml index 79ee805..d2dbfe5 100644 --- a/charts/alerta-web/Chart.yaml +++ b/charts/alerta-web/Chart.yaml @@ -1,13 +1,13 @@ apiVersion: v2 -appVersion: "8.7.0" +appVersion: "9.0.0" description: A Helm chart for Kubernetes name: alerta-web -version: 0.1.3 +version: 0.1.4 home: https://github.com/hayk96/alerta-web icon: https://raw.githubusercontent.com/hayk96/alerta-web/main/logo/mstile-310x310.png.png dependencies: - name: postgresql - version: "10.16.2" + version: "12.2.3" repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami condition: postgresql.enabled sources: diff --git a/charts/alerta-web/README.md b/charts/alerta-web/README.md index c3ab5eb..5d7f01f 100644 --- a/charts/alerta-web/README.md +++ b/charts/alerta-web/README.md @@ -45,43 +45,49 @@ helm upgrade [RELEASE_NAME] alerta-web/alerta-web ## Values -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| replicaCount | int | `1` | | -| image.repository | string | `"hayk96/alerta-web"` | | -| image.tag | string | `"8.7.0"` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| service.service | string | `"ClusterIP"` | | -| service.port | int | `80` | | -| ingress.enabled | bool| `false` | | -| ingress.annotations | object | `{}` | | -| ingress.path | string | `"/"` | | -| ingress.hosts | list | `"alerta.example.com"` | | -| ingress.tls | list | `[]` | | -| resources.limits.cpu | string | `"200m"` | | -| resources.limits.memory | string | `"1Gi"` | | -| resources.requests.cpu | string | `"100m"` | | -| resources.requests.memory | string | `"128Mi"` | | -| alertaAdminPassword | string | `"ALERTA_ADMIN_PASSWORD"` | | -| alertaAdminUsers | list | `"admin"` | The list of the admin users | -| alertaAdminKey | string | `"ALERTA_ADMIN_KEY"` | | -| alertaApiKey | string | `"alertaApiKey"` | | -| alertaInstallPlugins | list | `["prometheus", "normalise", "enhance"]` | | -| alertaConfig.DEBUG | string | `"False"` | Debug mode for increased logging | -| alertaConfig.AUTH_REQUIRED | string | `"True"` | Users must authenticate when using web UI or command-line tool | -| alertaConfig.SIGNUP_ENABLED | string | `"False"` | Prevent self-service sign-up of new users via the web UI | -| alertaConfig.DELETE_EXPIRED_AFTER | int | `60` | Time period before deleting expired alerts | -| alertaConfig.DELETE_INFO_AFTER | int | `60` | Time period before deleting informational alerts | -| alertaConfig.COLUMNS | string | `"['severity', 'status', 'lastReceiveTime', 'environment', 'service', 'resource', 'event', 'value', 'text']"` | User defined columns and column order for alert list view | -| alertaConfig.ACTIONS | string | `"['createIssue', 'updateIssue']"` | Adds buttons to web console for operators to trigger custom actions against alert | -| alertaConfig.PLUGINS | string | `"['prometheus', 'normalise', 'enhance']"` | List of enabled plugins | -| alertaConfig.ALERTMANAGER_API_URL | string | `'"http://prometheus-alertmanager.svc"'` | | -| alertaConfig.ALERTMANAGER_SILENCE_FROM_ACK | string | `"True"` | | -| alertaConfig.LOG_HANDLERS | string | `"['console']"` | List of log handlers eg. console, file, wsgi | -| alertaConfig.COLOR_MAP | string | `"{'severity': {'security': '#000000', 'critical': 'red', 'major' : '#F89407', 'minor' : '#f8bc07', 'warning': '#1E90FF', 'indeterminate': '#a32cf2', 'informational': 'green', 'ok': '#00CC00', 'normal': '#0aab78', 'unknown': 'silver'}, 'text': 'white'}"` | Dictionary of severity colors, text and highlight color | -| postgresql.enabled | bool | `true` | Enable PgSQL as backend database | -| postgresql.postgresqlDatabase | string | `"alerta"` | | -| postgresql.postgresqlUsername | string | `"alerta"` | | -| postgresql.postgresqlPassword | string | `"PG_ALERTA_PASSWORD"` | | -| postgresql.persistence.enabled | bool | `true` | | -| postgresql.persistence.size | str | `"1Gi"` | | +| Key | Type | Default | Description | +|--------------------------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| +| replicaCount | int | `1` | | +| image.repository | string | `"hayk96/alerta-web"` | | +| image.tag | string | `"9.0.0"` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| service.service | string | `"ClusterIP"` | | +| service.port | int | `80` | | +| ingress.enabled | bool | `false` | | +| ingress.annotations | object | `{}` | | +| ingress.path | string | `"/"` | | +| ingress.hosts | list | `"alerta.example.com"` | | +| ingress.tls | list | `[]` | | +| resources.limits.cpu | string | `"200m"` | | +| resources.limits.memory | string | `"1Gi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"128Mi"` | | +| alertaAdminPassword | string | `"ALERTA_ADMIN_PASSWORD"` | | +| alertaAdminUsers | list | `"admin"` | The list of the admin users | +| alertaAdminKey | string | `"ALERTA_ADMIN_KEY"` | | +| alertaApiKey | string | `"alertaApiKey"` | | +| alertaInstallPlugins | list | `["prometheus", "normalise", "enhance"]` | | +| alertaConfig.DEBUG | string | `"False"` | Debug mode for increased logging | +| alertaConfig.AUTH_REQUIRED | string | `"True"` | Users must authenticate when using web UI or command-line tool | +| alertaConfig.SIGNUP_ENABLED | string | `"False"` | Prevent self-service sign-up of new users via the web UI | +| alertaConfig.DELETE_EXPIRED_AFTER | int | `60` | Time period before deleting expired alerts | +| alertaConfig.DELETE_INFO_AFTER | int | `60` | Time period before deleting informational alerts | +| alertaConfig.COLUMNS | string | `"['severity', 'status', 'lastReceiveTime', 'environment', 'service', 'resource', 'event', 'value', 'text']"` | User defined columns and column order for alert list view | +| alertaConfig.ACTIONS | string | `"['createIssue', 'updateIssue']"` | Adds buttons to web console for operators to trigger custom actions against alert | +| alertaConfig.PLUGINS | string | `"['prometheus', 'normalise', 'enhance']"` | List of enabled plugins | +| alertaConfig.ALERTMANAGER_API_URL | string | `'"http://prometheus-alertmanager.svc"'` | | +| alertaConfig.ALERTMANAGER_SILENCE_FROM_ACK | string | `"True"` | | +| alertaConfig.LOG_HANDLERS | string | `"['console']"` | List of log handlers eg. console, file, wsgi | +| alertaConfig.COLOR_MAP | string | `"{'severity': {'security': '#000000', 'critical': 'red', 'major' : '#F89407', 'minor' : '#f8bc07', 'warning': '#1E90FF', 'indeterminate': '#a32cf2', 'informational': 'green', 'ok': '#00CC00', 'normal': '#0aab78', 'unknown': 'silver'}, 'text': 'white'}"` | Dictionary of severity colors, text and highlight color | +| postgresql.enabled | bool | `true` | Enable PgSQL as backend database | +| postgresql.auth.database | string | `"alerta"` | | +| postgresql.auth.username | string | `"alerta"` | | +| postgresql.auth.password | string | `"PG_ALERTA_PASSWORD"` | | +| postgresql.primary.persistence.enabled | bool | `true` | | +| postgresql.primary.persistence.size | str | `"1Gi"` | | +| useExistingDatabase.type | str | `"postgresql"` | Type of the database. Currently only Postgresql supported | +| useExistingDatabase.endpoint | str | `"example-postgresql.default.svc:5432"` | The address and port of the database | +| useExistingDatabase.database | str | `"EXISTING_DATABASE_NAME"` | Name of the existing database | +| useExistingDatabase.auth.enabled | bool | `true` | Use basic auth to connect with database | +| useExistingDatabase.auth.username | str | `"EXISTING_USERNAME"` | Username of the existing database | +| useExistingDatabase.auth.password | str | `"EXISTING_PASSWORD"` | Password of the existing database | diff --git a/charts/alerta-web/templates/configmap.yaml b/charts/alerta-web/templates/configmap.yaml index 3c39b60..01d03f2 100644 --- a/charts/alerta-web/templates/configmap.yaml +++ b/charts/alerta-web/templates/configmap.yaml @@ -7,7 +7,7 @@ data: {{- end }} {{- end }} {{ if .Values.postgresql.enabled -}} - DATABASE_URL = "postgresql://{{ .Values.postgresql.postgresqlUsername }}:{{ .Values.postgresql.postgresqlPassword }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.postgresqlDatabase }}" + DATABASE_URL = "postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}" {{ else if and (.Values.useExistingDatabase) (eq .Values.useExistingDatabase.type "postgresql") }} {{ if eq .Values.useExistingDatabase.type "postgresql" }} DATABASE_URL = "postgresql://{{- if .Values.useExistingDatabase.auth.enabled -}}{{ .Values.useExistingDatabase.auth.username }}:{{ .Values.useExistingDatabase.auth.password }}@{{- end -}}{{ .Values.useExistingDatabase.endpoint }}/{{ .Values.useExistingDatabase.database }}" diff --git a/charts/alerta-web/values.yaml b/charts/alerta-web/values.yaml index faa9428..fdf7d1d 100644 --- a/charts/alerta-web/values.yaml +++ b/charts/alerta-web/values.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: hayk96/alerta-web - tag: 8.7.0 + tag: 9.0.0 pullPolicy: IfNotPresent service: @@ -54,7 +54,7 @@ alertaConfig: DELETE_INFO_AFTER: 60 COLUMNS: "['severity', 'status', 'lastReceiveTime', 'environment', 'service', 'resource', 'event', 'value', 'text']" ACTIONS: "['createIssue', 'updateIssue']" - PLUGINS: "['prometheus', 'normalise', 'enhance']" + PLUGINS: "['prometheus', 'enhance']" ALERTMANAGER_API_URL: '"http://prometheus-alertmanager.svc"' ALERTMANAGER_SILENCE_FROM_ACK: "True" LOG_HANDLERS: "['console']" @@ -76,14 +76,18 @@ alertaConfig: postgresql: enabled: true - postgresqlDatabase: alerta - postgresqlUsername: alerta - postgresqlPassword: PG_ALERTA_PASSWORD - persistence: - enabled: true - size: 1Gi + auth: + database: alerta + username: alerta + password: PG_ALERTA_PASSWORD + primary: + persistence: + enabled: true + size: 1Gi + # Disables persistence of replicas PgSQL + readReplicas: {persistence: {enabled: false}} -# Use already existing database. Currently, supported type is Postgres with version 11.x +# Use already existing database. Currently, supported type is Postgres. useExistingDatabase: {} # type: postgresql # endpoint: example-postgresql.default.svc:5432