From 1fb3d179efc5a5e5b0e52409c0598b1ea204effb Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sun, 18 Jan 2026 09:21:33 -0300 Subject: [PATCH] monitoring: add testing dashboard and switch postmark apikey --- scripts/dashboards_render_atlas.py | 58 +---- .../bstein-dev-home/backend-deployment.yaml | 4 +- services/finance/firefly-deployment.yaml | 4 +- services/keycloak/deployment.yaml | 4 +- services/keycloak/ldap-federation-job.yaml | 4 +- services/keycloak/portal-e2e-client-job.yaml | 4 +- ...al-e2e-execute-actions-email-test-job.yaml | 4 +- .../portal-e2e-target-client-job.yaml | 4 +- ...al-e2e-token-exchange-permissions-job.yaml | 4 +- .../portal-e2e-token-exchange-test-job.yaml | 4 +- services/keycloak/realm-settings-job.yaml | 4 +- services/keycloak/user-overrides-job.yaml | 4 +- services/mailu/helmrelease.yaml | 24 +- .../monitoring/dashboards/atlas-overview.json | 238 ------------------ .../{atlas-glue.json => atlas-testing.json} | 6 +- .../grafana-dashboard-overview.yaml | 238 ------------------ ...ue.yaml => grafana-dashboard-testing.yaml} | 12 +- services/monitoring/helmrelease.yaml | 4 +- services/monitoring/kustomization.yaml | 2 +- .../postmark-exporter-deployment.yaml | 4 +- services/nextcloud-mail-sync/cronjob.yaml | 4 +- services/nextcloud/deployment.yaml | 4 +- services/nextcloud/maintenance-cronjob.yaml | 4 +- services/outline/deployment.yaml | 4 +- services/planka/deployment.yaml | 4 +- services/vaultwarden/deployment.yaml | 4 +- 26 files changed, 67 insertions(+), 587 deletions(-) rename services/monitoring/dashboards/{atlas-glue.json => atlas-testing.json} (99%) rename services/monitoring/{grafana-dashboard-glue.yaml => grafana-dashboard-testing.yaml} (97%) diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index 179536e..5e3e7f0 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -1111,50 +1111,6 @@ def build_overview(): ) ) - panels.append( - { - "id": 34, - "type": "row", - "title": "Glue + Automation", - "gridPos": {"h": 1, "w": 24, "x": 0, "y": 25}, - "collapsed": False, - "panels": [], - } - ) - panels.append( - stat_panel( - 35, - "Glue Jobs Stale", - GLUE_STALE_COUNT, - {"h": 6, "w": 8, "x": 0, "y": 26}, - unit="none", - thresholds=count_thresholds, - links=link_to("atlas-glue"), - ) - ) - panels.append( - stat_panel( - 36, - "Glue Jobs Missing Success", - GLUE_MISSING_COUNT, - {"h": 6, "w": 8, "x": 8, "y": 26}, - unit="none", - thresholds=count_thresholds, - links=link_to("atlas-glue"), - ) - ) - panels.append( - stat_panel( - 37, - "Glue Jobs Suspended", - GLUE_SUSPENDED_COUNT, - {"h": 6, "w": 8, "x": 16, "y": 26}, - unit="none", - thresholds=count_thresholds, - links=link_to("atlas-glue"), - ) - ) - worker_filter = f"{WORKER_REGEX}" panels.append( timeseries_panel( @@ -2195,7 +2151,7 @@ def build_mail_dashboard(): } -def build_glue_dashboard(): +def build_testing_dashboard(): panels = [] sort_desc = [{"id": "labelsToFields", "options": {}}, {"id": "sortBy", "options": {"fields": ["Value"], "order": "desc"}}] @@ -2274,8 +2230,8 @@ def build_glue_dashboard(): ) return { - "uid": "atlas-glue", - "title": "Atlas Glue", + "uid": "atlas-testing", + "title": "Atlas Testing", "folderUid": PRIVATE_FOLDER, "editable": True, "panels": panels, @@ -2283,7 +2239,7 @@ def build_glue_dashboard(): "annotations": {"list": []}, "schemaVersion": 39, "style": "dark", - "tags": ["atlas", "glue"], + "tags": ["atlas", "testing"], } @@ -2380,9 +2336,9 @@ DASHBOARDS = { "builder": build_mail_dashboard, "configmap": ROOT / "services" / "monitoring" / "grafana-dashboard-mail.yaml", }, - "atlas-glue": { - "builder": build_glue_dashboard, - "configmap": ROOT / "services" / "monitoring" / "grafana-dashboard-glue.yaml", + "atlas-testing": { + "builder": build_testing_dashboard, + "configmap": ROOT / "services" / "monitoring" / "grafana-dashboard-testing.yaml", }, "atlas-gpu": { "builder": build_gpu_dashboard, diff --git a/services/bstein-dev-home/backend-deployment.yaml b/services/bstein-dev-home/backend-deployment.yaml index 9d820b7..ba6ca74 100644 --- a/services/bstein-dev-home/backend-deployment.yaml +++ b/services/bstein-dev-home/backend-deployment.yaml @@ -38,8 +38,8 @@ spec: export SMTP_PORT="587" export SMTP_STARTTLS="true" export SMTP_USE_TLS="false" - export SMTP_USERNAME="{{ index .Data.data "relay-username" }}" - export SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export SMTP_USERNAME="{{ index .Data.data "apikey" }}" + export SMTP_PASSWORD="{{ index .Data.data "apikey" }}" export SMTP_FROM="no-reply-portal@bstein.dev" {{ end }} spec: diff --git a/services/finance/firefly-deployment.yaml b/services/finance/firefly-deployment.yaml index f43bdc3..9c684fe 100644 --- a/services/finance/firefly-deployment.yaml +++ b/services/finance/firefly-deployment.yaml @@ -38,8 +38,8 @@ spec: export STATIC_CRON_TOKEN="$(cat /vault/secrets/firefly-cron-token)" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export MAIL_USERNAME="{{ index .Data.data "relay-username" }}" - export MAIL_PASSWORD="{{ index .Data.data "relay-password" }}" + export MAIL_USERNAME="{{ index .Data.data "apikey" }}" + export MAIL_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} vault.hashicorp.com/agent-inject-secret-firefly-db-password: "kv/data/atlas/finance/firefly-db" vault.hashicorp.com/agent-inject-template-firefly-db-password: | diff --git a/services/keycloak/deployment.yaml b/services/keycloak/deployment.yaml index bf8a47c..3d241c9 100644 --- a/services/keycloak/deployment.yaml +++ b/services/keycloak/deployment.yaml @@ -45,8 +45,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: sso-vault diff --git a/services/keycloak/ldap-federation-job.yaml b/services/keycloak/ldap-federation-job.yaml index 2f911f1..184ad90 100644 --- a/services/keycloak/ldap-federation-job.yaml +++ b/services/keycloak/ldap-federation-job.yaml @@ -34,8 +34,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: affinity: diff --git a/services/keycloak/portal-e2e-client-job.yaml b/services/keycloak/portal-e2e-client-job.yaml index 399a32b..cc2c2b4 100644 --- a/services/keycloak/portal-e2e-client-job.yaml +++ b/services/keycloak/portal-e2e-client-job.yaml @@ -34,8 +34,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: restartPolicy: Never diff --git a/services/keycloak/portal-e2e-execute-actions-email-test-job.yaml b/services/keycloak/portal-e2e-execute-actions-email-test-job.yaml index 5653148..736ca8d 100644 --- a/services/keycloak/portal-e2e-execute-actions-email-test-job.yaml +++ b/services/keycloak/portal-e2e-execute-actions-email-test-job.yaml @@ -34,8 +34,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: restartPolicy: Never diff --git a/services/keycloak/portal-e2e-target-client-job.yaml b/services/keycloak/portal-e2e-target-client-job.yaml index 66426e0..64352bb 100644 --- a/services/keycloak/portal-e2e-target-client-job.yaml +++ b/services/keycloak/portal-e2e-target-client-job.yaml @@ -34,8 +34,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: restartPolicy: Never diff --git a/services/keycloak/portal-e2e-token-exchange-permissions-job.yaml b/services/keycloak/portal-e2e-token-exchange-permissions-job.yaml index a6dd621..597187c 100644 --- a/services/keycloak/portal-e2e-token-exchange-permissions-job.yaml +++ b/services/keycloak/portal-e2e-token-exchange-permissions-job.yaml @@ -34,8 +34,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: restartPolicy: Never diff --git a/services/keycloak/portal-e2e-token-exchange-test-job.yaml b/services/keycloak/portal-e2e-token-exchange-test-job.yaml index 8b7beed..38547da 100644 --- a/services/keycloak/portal-e2e-token-exchange-test-job.yaml +++ b/services/keycloak/portal-e2e-token-exchange-test-job.yaml @@ -35,8 +35,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: restartPolicy: Never diff --git a/services/keycloak/realm-settings-job.yaml b/services/keycloak/realm-settings-job.yaml index 0cef1cb..c74537d 100644 --- a/services/keycloak/realm-settings-job.yaml +++ b/services/keycloak/realm-settings-job.yaml @@ -34,8 +34,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: affinity: diff --git a/services/keycloak/user-overrides-job.yaml b/services/keycloak/user-overrides-job.yaml index a81ea7c..ff2aa91 100644 --- a/services/keycloak/user-overrides-job.yaml +++ b/services/keycloak/user-overrides-job.yaml @@ -34,8 +34,8 @@ spec: export LDAP_BIND_PASSWORD="${LDAP_ADMIN_PASSWORD}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export KEYCLOAK_SMTP_USER="{{ index .Data.data "relay-username" }}" - export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export KEYCLOAK_SMTP_USER="{{ index .Data.data "apikey" }}" + export KEYCLOAK_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: affinity: diff --git a/services/mailu/helmrelease.yaml b/services/mailu/helmrelease.yaml index ceb3e0c..7342141 100644 --- a/services/mailu/helmrelease.yaml +++ b/services/mailu/helmrelease.yaml @@ -335,8 +335,8 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "relay-username" }}" - export RELAYPASSWORD="{{ index .Data.data "relay-password" }}" + export RELAYUSER="{{ index .Data.data "apikey" }}" + export RELAYPASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -397,8 +397,8 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "relay-username" }}" - export RELAYPASSWORD="{{ index .Data.data "relay-password" }}" + export RELAYUSER="{{ index .Data.data "apikey" }}" + export RELAYPASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -459,8 +459,8 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "relay-username" }}" - export RELAYPASSWORD="{{ index .Data.data "relay-password" }}" + export RELAYUSER="{{ index .Data.data "apikey" }}" + export RELAYPASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -521,8 +521,8 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "relay-username" }}" - export RELAYPASSWORD="{{ index .Data.data "relay-password" }}" + export RELAYUSER="{{ index .Data.data "apikey" }}" + export RELAYPASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -583,8 +583,8 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "relay-username" }}" - export RELAYPASSWORD="{{ index .Data.data "relay-password" }}" + export RELAYUSER="{{ index .Data.data "apikey" }}" + export RELAYPASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -645,8 +645,8 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "relay-username" }}" - export RELAYPASSWORD="{{ index .Data.data "relay-password" }}" + export RELAYUSER="{{ index .Data.data "apikey" }}" + export RELAYPASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: mailu-vault-sync diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index 8732391..c5f30d1 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -1601,244 +1601,6 @@ ], "description": "Shares are normalized within the selected filter. Switching scope changes the denominator." }, - { - "id": 34, - "type": "row", - "title": "Glue + Automation", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 25 - }, - "collapsed": false, - "panels": [] - }, - { - "id": 35, - "type": "stat", - "title": "Glue Jobs Stale", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 26 - }, - "targets": [ - { - "expr": "(sum((((time() - kube_cronjob_status_last_successful_time{label_atlas_bstein_dev_glue=\"true\"}) > bool 129600) unless on(namespace,cronjob) kube_cronjob_spec_suspend{label_atlas_bstein_dev_glue=\"true\"} == 1)) + count(((kube_cronjob_labels{label_atlas_bstein_dev_glue=\"true\"} unless kube_cronjob_status_last_successful_time{label_atlas_bstein_dev_glue=\"true\"}) unless on(namespace,cronjob) kube_cronjob_spec_suspend{label_atlas_bstein_dev_glue=\"true\"} == 1)))", - "refId": "A" - } - ], - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "orange", - "value": 2 - }, - { - "color": "red", - "value": 3 - } - ] - }, - "unit": "none", - "custom": { - "displayMode": "auto" - } - }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "links": [ - { - "title": "Open atlas-glue dashboard", - "url": "/d/atlas-glue", - "targetBlank": true - } - ] - }, - { - "id": 36, - "type": "stat", - "title": "Glue Jobs Missing Success", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 26 - }, - "targets": [ - { - "expr": "count(((kube_cronjob_labels{label_atlas_bstein_dev_glue=\"true\"} unless kube_cronjob_status_last_successful_time{label_atlas_bstein_dev_glue=\"true\"}) unless on(namespace,cronjob) kube_cronjob_spec_suspend{label_atlas_bstein_dev_glue=\"true\"} == 1))", - "refId": "A" - } - ], - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "orange", - "value": 2 - }, - { - "color": "red", - "value": 3 - } - ] - }, - "unit": "none", - "custom": { - "displayMode": "auto" - } - }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "links": [ - { - "title": "Open atlas-glue dashboard", - "url": "/d/atlas-glue", - "targetBlank": true - } - ] - }, - { - "id": 37, - "type": "stat", - "title": "Glue Jobs Suspended", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 26 - }, - "targets": [ - { - "expr": "sum(kube_cronjob_spec_suspend{label_atlas_bstein_dev_glue=\"true\"} == 1)", - "refId": "A" - } - ], - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "orange", - "value": 2 - }, - { - "color": "red", - "value": 3 - } - ] - }, - "unit": "none", - "custom": { - "displayMode": "auto" - } - }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "links": [ - { - "title": "Open atlas-glue dashboard", - "url": "/d/atlas-glue", - "targetBlank": true - } - ] - }, { "id": 14, "type": "timeseries", diff --git a/services/monitoring/dashboards/atlas-glue.json b/services/monitoring/dashboards/atlas-testing.json similarity index 99% rename from services/monitoring/dashboards/atlas-glue.json rename to services/monitoring/dashboards/atlas-testing.json index 732d36c..831d960 100644 --- a/services/monitoring/dashboards/atlas-glue.json +++ b/services/monitoring/dashboards/atlas-testing.json @@ -1,6 +1,6 @@ { - "uid": "atlas-glue", - "title": "Atlas Glue", + "uid": "atlas-testing", + "title": "Atlas Testing", "folderUid": "atlas-internal", "editable": true, "panels": [ @@ -334,6 +334,6 @@ "style": "dark", "tags": [ "atlas", - "glue" + "testing" ] } diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index 0f6cd72..8ad7523 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -1610,244 +1610,6 @@ data: ], "description": "Shares are normalized within the selected filter. Switching scope changes the denominator." }, - { - "id": 34, - "type": "row", - "title": "Glue + Automation", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 25 - }, - "collapsed": false, - "panels": [] - }, - { - "id": 35, - "type": "stat", - "title": "Glue Jobs Stale", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 26 - }, - "targets": [ - { - "expr": "(sum((((time() - kube_cronjob_status_last_successful_time{label_atlas_bstein_dev_glue=\"true\"}) > bool 129600) unless on(namespace,cronjob) kube_cronjob_spec_suspend{label_atlas_bstein_dev_glue=\"true\"} == 1)) + count(((kube_cronjob_labels{label_atlas_bstein_dev_glue=\"true\"} unless kube_cronjob_status_last_successful_time{label_atlas_bstein_dev_glue=\"true\"}) unless on(namespace,cronjob) kube_cronjob_spec_suspend{label_atlas_bstein_dev_glue=\"true\"} == 1)))", - "refId": "A" - } - ], - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "orange", - "value": 2 - }, - { - "color": "red", - "value": 3 - } - ] - }, - "unit": "none", - "custom": { - "displayMode": "auto" - } - }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "links": [ - { - "title": "Open atlas-glue dashboard", - "url": "/d/atlas-glue", - "targetBlank": true - } - ] - }, - { - "id": 36, - "type": "stat", - "title": "Glue Jobs Missing Success", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 26 - }, - "targets": [ - { - "expr": "count(((kube_cronjob_labels{label_atlas_bstein_dev_glue=\"true\"} unless kube_cronjob_status_last_successful_time{label_atlas_bstein_dev_glue=\"true\"}) unless on(namespace,cronjob) kube_cronjob_spec_suspend{label_atlas_bstein_dev_glue=\"true\"} == 1))", - "refId": "A" - } - ], - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "orange", - "value": 2 - }, - { - "color": "red", - "value": 3 - } - ] - }, - "unit": "none", - "custom": { - "displayMode": "auto" - } - }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "links": [ - { - "title": "Open atlas-glue dashboard", - "url": "/d/atlas-glue", - "targetBlank": true - } - ] - }, - { - "id": 37, - "type": "stat", - "title": "Glue Jobs Suspended", - "datasource": { - "type": "prometheus", - "uid": "atlas-vm" - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 26 - }, - "targets": [ - { - "expr": "sum(kube_cronjob_spec_suspend{label_atlas_bstein_dev_glue=\"true\"} == 1)", - "refId": "A" - } - ], - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "orange", - "value": 2 - }, - { - "color": "red", - "value": 3 - } - ] - }, - "unit": "none", - "custom": { - "displayMode": "auto" - } - }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "links": [ - { - "title": "Open atlas-glue dashboard", - "url": "/d/atlas-glue", - "targetBlank": true - } - ] - }, { "id": 14, "type": "timeseries", diff --git a/services/monitoring/grafana-dashboard-glue.yaml b/services/monitoring/grafana-dashboard-testing.yaml similarity index 97% rename from services/monitoring/grafana-dashboard-glue.yaml rename to services/monitoring/grafana-dashboard-testing.yaml index 7aeec74..2215a2d 100644 --- a/services/monitoring/grafana-dashboard-glue.yaml +++ b/services/monitoring/grafana-dashboard-testing.yaml @@ -1,15 +1,15 @@ -# services/monitoring/grafana-dashboard-glue.yaml +# services/monitoring/grafana-dashboard-testing.yaml apiVersion: v1 kind: ConfigMap metadata: - name: grafana-dashboard-glue + name: grafana-dashboard-testing labels: grafana_dashboard: "1" data: - atlas-glue.json: | + atlas-testing.json: | { - "uid": "atlas-glue", - "title": "Atlas Glue", + "uid": "atlas-testing", + "title": "Atlas Testing", "folderUid": "atlas-internal", "editable": true, "panels": [ @@ -343,6 +343,6 @@ data: "style": "dark", "tags": [ "atlas", - "glue" + "testing" ] } diff --git a/services/monitoring/helmrelease.yaml b/services/monitoring/helmrelease.yaml index c99a8ca..bc818da 100644 --- a/services/monitoring/helmrelease.yaml +++ b/services/monitoring/helmrelease.yaml @@ -273,8 +273,8 @@ spec: export GF_SECURITY_ADMIN_PASSWORD="{{ index .Data.data "admin-password" }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export GF_SMTP_USER="{{ index .Data.data "relay-username" }}" - export GF_SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export GF_SMTP_USER="{{ index .Data.data "apikey" }}" + export GF_SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} persistence: enabled: true diff --git a/services/monitoring/kustomization.yaml b/services/monitoring/kustomization.yaml index 69ad326..7d0b01b 100644 --- a/services/monitoring/kustomization.yaml +++ b/services/monitoring/kustomization.yaml @@ -14,7 +14,7 @@ resources: - grafana-dashboard-network.yaml - grafana-dashboard-gpu.yaml - grafana-dashboard-mail.yaml - - grafana-dashboard-glue.yaml + - grafana-dashboard-testing.yaml - dcgm-exporter.yaml - jetson-tegrastats-exporter.yaml - postmark-exporter-service.yaml diff --git a/services/monitoring/postmark-exporter-deployment.yaml b/services/monitoring/postmark-exporter-deployment.yaml index 5e6c837..72972ed 100644 --- a/services/monitoring/postmark-exporter-deployment.yaml +++ b/services/monitoring/postmark-exporter-deployment.yaml @@ -21,8 +21,8 @@ spec: vault.hashicorp.com/agent-inject-secret-postmark-env: "kv/data/atlas/monitoring/postmark-exporter" vault.hashicorp.com/agent-inject-template-postmark-env: | {{- with secret "kv/data/atlas/monitoring/postmark-exporter" -}} - export POSTMARK_SERVER_TOKEN="{{ index .Data.data "relay-username" }}" - export POSTMARK_SERVER_TOKEN_FALLBACK="{{ index .Data.data "relay-password" }}" + export POSTMARK_SERVER_TOKEN="{{ index .Data.data "apikey" }}" + export POSTMARK_SERVER_TOKEN_FALLBACK="{{ index .Data.data "apikey" }}" {{- if index .Data.data "sending-limit" }} export POSTMARK_SENDING_LIMIT="{{ index .Data.data "sending-limit" }}" {{- end }} diff --git a/services/nextcloud-mail-sync/cronjob.yaml b/services/nextcloud-mail-sync/cronjob.yaml index cb42d49..b4baa9c 100644 --- a/services/nextcloud-mail-sync/cronjob.yaml +++ b/services/nextcloud-mail-sync/cronjob.yaml @@ -37,8 +37,8 @@ spec: export OIDC_CLIENT_SECRET="{{ index .Data.data "client-secret" }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export SMTP_NAME="{{ index .Data.data "relay-username" }}" - export SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export SMTP_NAME="{{ index .Data.data "apikey" }}" + export SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} {{ with secret "kv/data/atlas/shared/keycloak-admin" }} export KC_ADMIN_USER="{{ .Data.data.username }}" diff --git a/services/nextcloud/deployment.yaml b/services/nextcloud/deployment.yaml index cfa91b2..82f7538 100644 --- a/services/nextcloud/deployment.yaml +++ b/services/nextcloud/deployment.yaml @@ -37,8 +37,8 @@ spec: export OIDC_CLIENT_SECRET="{{ index .Data.data "client-secret" }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export SMTP_NAME="{{ index .Data.data "relay-username" }}" - export SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export SMTP_NAME="{{ index .Data.data "apikey" }}" + export SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} {{ with secret "kv/data/atlas/shared/keycloak-admin" }} export KC_ADMIN_USER="{{ .Data.data.username }}" diff --git a/services/nextcloud/maintenance-cronjob.yaml b/services/nextcloud/maintenance-cronjob.yaml index cc9720f..d4008c7 100644 --- a/services/nextcloud/maintenance-cronjob.yaml +++ b/services/nextcloud/maintenance-cronjob.yaml @@ -33,8 +33,8 @@ spec: export OIDC_CLIENT_SECRET="{{ index .Data.data "client-secret" }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export SMTP_NAME="{{ index .Data.data "relay-username" }}" - export SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export SMTP_NAME="{{ index .Data.data "apikey" }}" + export SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} {{ with secret "kv/data/atlas/shared/keycloak-admin" }} export KC_ADMIN_USER="{{ .Data.data.username }}" diff --git a/services/outline/deployment.yaml b/services/outline/deployment.yaml index cca3964..80a81dd 100644 --- a/services/outline/deployment.yaml +++ b/services/outline/deployment.yaml @@ -45,8 +45,8 @@ spec: {{ end }} export SMTP_FROM_EMAIL="no-reply-outline@bstein.dev" {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export SMTP_USERNAME="{{ index .Data.data "relay-username" }}" - export SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export SMTP_USERNAME="{{ index .Data.data "apikey" }}" + export SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: outline-vault diff --git a/services/planka/deployment.yaml b/services/planka/deployment.yaml index 155ac80..9750039 100644 --- a/services/planka/deployment.yaml +++ b/services/planka/deployment.yaml @@ -48,8 +48,8 @@ spec: {{ end }} export SMTP_FROM="no-reply-planka@bstein.dev" {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export SMTP_USER="{{ index .Data.data "relay-username" }}" - export SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export SMTP_USER="{{ index .Data.data "apikey" }}" + export SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: planka-vault diff --git a/services/vaultwarden/deployment.yaml b/services/vaultwarden/deployment.yaml index c3b7d27..0567f46 100644 --- a/services/vaultwarden/deployment.yaml +++ b/services/vaultwarden/deployment.yaml @@ -30,8 +30,8 @@ spec: export ADMIN_TOKEN="{{ .Data.data.ADMIN_TOKEN }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export SMTP_USERNAME="{{ index .Data.data "relay-username" }}" - export SMTP_PASSWORD="{{ index .Data.data "relay-password" }}" + export SMTP_USERNAME="{{ index .Data.data "apikey" }}" + export SMTP_PASSWORD="{{ index .Data.data "apikey" }}" {{ end }} spec: serviceAccountName: vaultwarden-vault