Skip to content

Commit

Permalink
Merge pull request #4146 from lsst-sqre/tickets/DM-48618/squareone-se…
Browse files Browse the repository at this point in the history
…ntry

DM-48618: squareone sentry
  • Loading branch information
fajpunk authored Jan 30, 2025
2 parents 37e773e + 58285d4 commit b44dfcf
Show file tree
Hide file tree
Showing 16 changed files with 94 additions and 2 deletions.
2 changes: 1 addition & 1 deletion applications/squareone/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ maintainers:
url: https://github.com/jonathansick

# The default version tag of the squareone docker image
appVersion: "0.15.0"
appVersion: "0.16.0"
7 changes: 7 additions & 0 deletions applications/squareone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,24 @@ Squareone is the homepage UI for the Rubin Science Platform.
| config.docsBaseUrl | string | `"https://rsp.lsst.io"` | Base URL for user documentation (excludes trailing slash) |
| config.docsPageMdx | string | See `values.yaml` | MDX content for the `/docs` page |
| config.emailVerifiedPageMdx | string | See `values.yaml` | MDX content for the `/enrollment/thanks-for-verifying` page |
| config.enableSentry | bool | See `values.yaml` | Enable Sentry |
| config.pendingApprovalPageMdx | string | See `values.yaml` | MDX content for the `/enrollment/pending-approval` page |
| config.pendingVerificationPageMdx | string | See `values.yaml` | MDX content for the `/enrollment/pending-confirmation` |
| config.plausibleDomain | string | `nil` | Plausible tracking domain. For example, `data.lsst.cloud`. @default null disables Plausible tracking |
| config.semaphoreUrl | string | `nil` | URL to the Semaphore (user notifications) API service. @default null disables the Semaphore integration |
| config.sentryDebug | bool | See `values.yaml` | Sentry debug mode |
| config.sentryDsn | string | See `values.yaml` | Sentry DSN |
| config.sentryReplaysOnErrorSampleRate | int | See `values.yaml` | Sentry error replays sample rate |
| config.sentryReplaysSessionSampleRate | int | See `values.yaml` | Sentry replays sample rate |
| config.sentryTracesSampleRate | int | See `values.yaml` | Sentry traces sample rate |
| config.siteDescription | string | `"Access Rubin Observatory Legacy Survey of Space and Time data.\n"` | Site description, used in meta tags |
| config.siteName | string | `"Rubin Science Platform"` | Name of the site, used in the title and meta tags. |
| config.supportPageMdx | string | See `values.yaml` | MDX content for the `/support` page |
| config.timesSquareUrl | string | `nil` | URL to the Times Square (parameterized notebooks) API service. @default null disables the Times Square integration |
| config.verifyEmailPageMdx | string | See `values.yaml` | MDX content for the `/enrollment/thanks-for-signing-up` page |
| fullnameOverride | string | `""` | Overrides the full name for resources (includes the release name) |
| global.baseUrl | string | Set by Argo CD Application | Base URL for the environment |
| global.environmentName | string | Set by Argo CD Application | Name of the Phalanx environment |
| global.host | string | Set by Argo CD Application | Host name for ingress |
| global.vaultSecretsPathPrefix | string | Set by Argo CD Application | Base path for Vault secrets |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy (tip: use Always for development) |
Expand Down
5 changes: 5 additions & 0 deletions applications/squareone/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sentry-dsn:
description: >-
The Sentry DSN for the the squareone Sentry project.
This is a URL that includes an authentication token that tells the Sentry SDK where to send events.
It can be found here: https://rubin-observatory.sentry.io/settings/projects/squareone/keys/
8 changes: 8 additions & 0 deletions applications/squareone/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data:
squareone.config.yaml: |
siteName: {{ .Values.config.siteName | quote }}
baseUrl: {{ .Values.global.baseUrl | quote }}
environmentName: {{ .Values.global.environmentName | quote }}
siteDescription: {{ .Values.config.siteDescription | quote }}
docsBaseUrl: {{ .Values.config.docsBaseUrl | quote }}
{{- if .Values.config.semaphoreUrl }}
Expand All @@ -29,3 +30,10 @@ data:
emailVerifiedPageMdx: {{ .Values.config.emailVerifiedPageMdx | quote }}
pendingApprovalPageMdx: {{ .Values.config.pendingApprovalPageMdx | quote }}
pendingVerificationPageMdx: {{ .Values.config.pendingVerificationPageMdx | quote }}
{{- if .Values.config.sentryDsn }}
sentryDsn: {{ .Values.config.sentryDsn | quote }}
{{- end}}
sentryTracesSampleRate: {{ .Values.config.sentryTracesSampleRate }}
sentryReplaysSessionSampleRate: {{ .Values.config.sentryReplaysSessionSampleRate }}
sentryReplaysOnErrorSampleRate: {{ .Values.config.sentryReplaysOnErrorSampleRate }}
sentryDebug: {{ .Values.config.sentryDebug }}
7 changes: 7 additions & 0 deletions applications/squareone/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ spec:
env:
- name: "SQUAREONE_CONFIG_PATH"
value: "/etc/squareone/squareone.config.yaml"
{{- if .Values.config.enableSentry }}
- name: "SENTRY_DSN"
valueFrom:
secretKeyRef:
name: {{ template "squareone.fullname" . }}-secret
key: "sentry-dsn"
{{- end }}
volumeMounts:
- name: "config"
mountPath: "/etc/squareone"
Expand Down
10 changes: 10 additions & 0 deletions applications/squareone/templates/vault-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ metadata:
spec:
path: "{{- .Values.global.vaultSecretsPathPrefix }}/pull-secret"
type: kubernetes.io/dockerconfigjson
---
apiVersion: ricoberger.de/v1alpha1
kind: VaultSecret
metadata:
name: {{ template "squareone.fullname" . }}-secret
labels:
{{- include "squareone.labels" . | nindent 4 }}
spec:
path: "{{- .Values.global.vaultSecretsPathPrefix }}/squareone"
type: "Opaque"
5 changes: 4 additions & 1 deletion applications/squareone/values-idfdev.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
image:
pullPolicy: Always
# tag: tickets-DM-34723

ingress:
timesSquareScope: "exec:admin"
Expand All @@ -25,3 +24,7 @@ config:
- [data-int.lsst.cloud](https://data-int.lsst.cloud) — for Rubin RSP developers
Don't forget to check the <Link href="/docs">documentation</Link>.
enableSentry: true
sentryTracesSampleRate: 1.0
sentryReplaysOnErrorSampleRate: 1.0
4 changes: 4 additions & 0 deletions applications/squareone/values-idfint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,7 @@ config:
[#dm-rsp-team channel](https://lsstc.slack.com/archives/C8EEUGDSA).
Don't forget to check the <Link href="/docs">documentation</Link>.
enableSentry: true
sentryTracesSampleRate: 1.0
sentryReplaysOnErrorSampleRate: 1.0
3 changes: 3 additions & 0 deletions applications/squareone/values-idfprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ config:
semaphoreUrl: "https://data.lsst.cloud/semaphore"
coManageRegistryUrl: "https://id.lsst.cloud"
plausibleDomain: "data.lsst.cloud"
enableSentry: true
sentryTracesSampleRate: 1.0
sentryReplaysOnErrorSampleRate: 1.0
3 changes: 3 additions & 0 deletions applications/squareone/values-roundtable-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
config:
siteName: "Roundtable (dev)"
enableSentry: true
sentryTracesSampleRate: 1.0
sentryReplaysOnErrorSampleRate: 1.0
3 changes: 3 additions & 0 deletions applications/squareone/values-roundtable-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
config:
siteName: "Roundtable"
enableSentry: true
sentryTracesSampleRate: 1.0
sentryReplaysOnErrorSampleRate: 1.0
3 changes: 3 additions & 0 deletions applications/squareone/values-usdfdev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ config:
semaphoreUrl: "https://usdf-rsp-dev.slac.stanford.edu/semaphore"
timesSquareUrl: "https://usdf-rsp-dev.slac.stanford.edu/times-square/api"
docsBaseUrl: "https://rsp.lsst.io/v/usdfdev"
enableSentry: true
sentryTracesSampleRate: 1.0
sentryReplaysOnErrorSampleRate: 1.0
ingress:
timesSquareScope: "exec:notebook"
3 changes: 3 additions & 0 deletions applications/squareone/values-usdfint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ config:
semaphoreUrl: "https://usdf-rsp-int.slac.stanford.edu/semaphore"
docsBaseUrl: "https://rsp.lsst.io/v/usdfint"
timesSquareUrl: "https://usdf-rsp-int.slac.stanford.edu/times-square/api"
enableSentry: true
sentryTracesSampleRate: 1.0
sentryReplaysOnErrorSampleRate: 1.0
3 changes: 3 additions & 0 deletions applications/squareone/values-usdfprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ config:
semaphoreUrl: "https://usdf-rsp.slac.stanford.edu/semaphore"
timesSquareUrl: "https://usdf-rsp.slac.stanford.edu/times-square/api"
docsBaseUrl: "https://rsp.lsst.io/v/usdfprod"
enableSentry: true
sentryTracesSampleRate: 1.0
sentryReplaysOnErrorSampleRate: 1.0
ingress:
timesSquareScope: "exec:notebook"
28 changes: 28 additions & 0 deletions applications/squareone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,30 @@ config:
<Link href="../support"><a>contact us</a></Link> to have the confirmation
email resent.
# -- Enable Sentry
# @default -- See `values.yaml`
enableSentry: false

# -- Sentry DSN
# @default -- See `values.yaml`
sentryDsn: null

# -- Sentry traces sample rate
# @default -- See `values.yaml`
sentryTracesSampleRate: 0

# -- Sentry replays sample rate
# @default -- See `values.yaml`
sentryReplaysSessionSampleRate: 0

# -- Sentry error replays sample rate
# @default -- See `values.yaml`
sentryReplaysOnErrorSampleRate: 0

# -- Sentry debug mode
# @default -- See `values.yaml`
sentryDebug: false

# Global parameters are set by parameters injected by the Argo CD Application
# and should not be set in the individual environment values files.
global:
Expand All @@ -346,3 +370,7 @@ global:
# -- Base path for Vault secrets
# @default -- Set by Argo CD Application
vaultSecretsPathPrefix: ""

# -- Name of the Phalanx environment
# @default -- Set by Argo CD Application
environmentName: ""
2 changes: 2 additions & 0 deletions environments/templates/applications/rsp/squareone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
value: "https://{{ .Values.fqdn }}"
- name: "global.vaultSecretsPathPrefix"
value: {{ .Values.vaultPathPrefix | quote }}
- name: "global.environmentName"
value: {{ .Values.name | quote }}
valueFiles:
- "values.yaml"
- "values-{{ .Values.name }}.yaml"
Expand Down

0 comments on commit b44dfcf

Please sign in to comment.