From 6c0e2a4925d83c758b1d1232ce89bbc08109a56f Mon Sep 17 00:00:00 2001 From: Laura Barcziova Date: Thu, 23 May 2024 15:21:03 +0200 Subject: [PATCH] Expose Sentry related env vars in dashboard pod Related to packit/dashboard#410 --- docs/deployment/secrets.md | 1 + openshift/dashboard.yml.j2 | 4 ++++ openshift/secret-sentry.yml.j2 | 1 + 3 files changed, 6 insertions(+) diff --git a/docs/deployment/secrets.md b/docs/deployment/secrets.md index 8508535..25a2abc 100644 --- a/docs/deployment/secrets.md +++ b/docs/deployment/secrets.md @@ -125,6 +125,7 @@ In both cases you have to do some tweaks before using them: - `extra-vars.yml` - would be nice to use your tokens/api keys in `packit_service.authentication`, but it's not crucial since it's for staging instances - `sentry.dsn`: just empty it to not send your devel bugs to Sentry + - `sentry.auth_token`: used only for dashboard Sentry integration, applies same as for dsn - `fedora_messaging`: replace with a new generated (`uuidgen`) one (if you'll run [fedmsg](https://github.com/packit/packit-service-fedmsg)) - `copr`: would be nice to use [your own token](https://copr.fedorainfracloud.org/api/) if you're planning to build in Copr - `id_ed25519[.pub]`: replace with your ssh keys diff --git a/openshift/dashboard.yml.j2 b/openshift/dashboard.yml.j2 index 9b4da9d..8063aef 100644 --- a/openshift/dashboard.yml.j2 +++ b/openshift/dashboard.yml.j2 @@ -34,6 +34,10 @@ spec: env: - name: DEPLOYMENT value: {{ deployment }} + - name: SENTRY_AUTH_TOKEN + valueFrom: {secretKeyRef: {name: sentry, key: auth_token}} + - name: VITE_SENTRY_DSN + valueFrom: {secretKeyRef: {name: sentry, key: dsn}} resources: requests: memory: "128Mi" diff --git a/openshift/secret-sentry.yml.j2 b/openshift/secret-sentry.yml.j2 index 8c9aaa1..18cdd57 100644 --- a/openshift/secret-sentry.yml.j2 +++ b/openshift/secret-sentry.yml.j2 @@ -9,3 +9,4 @@ metadata: type: Opaque data: dsn: "{{ vault.sentry.dsn | b64encode }}" + auth_token: "{{ vault.sentry.auth_token | b64encode }}"