Skip to content

Commit

Permalink
Add helper variables for sentry name and release.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewelinagr committed Jan 6, 2025
1 parent a18faea commit 2dcd892
Show file tree
Hide file tree
Showing 50 changed files with 343 additions and 91 deletions.
6 changes: 3 additions & 3 deletions charts/app-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ A Helm chart for RADAR-base application config (app-config) backend service whic
| jdbc.dialect | string | `"org.hibernate.dialect.PostgreSQLDialect"` | JDBC dialect to use for JDBC Connection |
| sentry.dsn | string | `nil` | DSN (Data Source Name) of the sentry server |
| sentry.level | string | `"ERROR"` | Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR) |
| sentry.service.name | string | `nil` | Name of the sentry service |
| sentry.service.release | string | `nil` | App version of the sentry service |
| sentry.service.name | string | `nil` | Name of the service to be displayed in the sentry dashboard |
| sentry.service.release | string | `nil` | App version to be displayed in the sentry dashboard |
| sentry.service.environment | string | `"production"` | Environment of the sentry service |
| sentry.stacktrace.enabled | bool | `true` | Set to true, if stack trace should be enabled |
| sentry.stacktrace.packages | string | `""` | Comma-separated list of package prefixes to be included in the stacktrace |
| sentry.stacktrace.packages | string | `"org.radarbase.appconfig,org.radarbase.lang,comparisons"` | Comma-separated list of package prefixes to be included in the stacktrace |
21 changes: 21 additions & 0 deletions charts/app-config/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,24 @@ Create the name of the service account to use
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Service name to be used by Sentry
*/}}
{{- define "app-config.sentryName" -}}
{{- if .Values.sentry.service.name }}
{{- printf "%s" .Values.sentry.service.name -}}
{{- else -}}
{{- printf "%s" (include "app-config.fullname" .) -}}{{- end -}}
{{- end }}

{{/*
App release to be used by Sentry
*/}}
{{- define "app-config.sentryRelease" -}}
{{- if .Values.sentry.service.release }}
{{- printf "%s" .Values.sentry.service.release -}}
{{- else -}}
{{- printf "%s" .Chart.AppVersion -}}
{{- end -}}
{{- end }}
4 changes: 2 additions & 2 deletions charts/app-config/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ spec:
value: {{ .Values.sentry.stacktrace.packages}}
{{- end }}
- name: SENTRY_NAME
value: {{ .Values.sentry.service.name }}
value: {{ include "app-config.sentryName" . }}
- name: SENTRY_RELEASE
value: {{ .Values.sentry.service.release }}
value: {{ include "app-config.sentryRelease" . }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.service.environment }}
{{- else }}
Expand Down
4 changes: 2 additions & 2 deletions charts/app-config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ sentry:
# -- Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR)
level: ERROR
service:
# -- Name of the sentry service
# -- Name of the service to be displayed in the sentry dashboard
name:
# -- App version of the sentry service
# -- App version to be displayed in the sentry dashboard
release:
# -- Environment of the sentry service
environment: production
Expand Down
6 changes: 3 additions & 3 deletions charts/catalog-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ A Helm chart for RADAR-base catalogue server. This application creates RADAR-bas
| cc.schemaRegistryApiSecret | string | `"srApiSecret"` | API secret of the Confluent Cloud based schema registry |
| sentry.dsn | string | `nil` | DSN (Data Source Name) of the sentry server |
| sentry.level | string | `"ERROR"` | Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR) |
| sentry.service.name | string | `nil` | Name of the sentry service |
| sentry.service.release | string | `nil` | App version of the sentry service |
| sentry.service.name | string | `nil` | Name of the service to be displayed in the sentry dashboard |
| sentry.service.release | string | `nil` | App version to be displayed in the sentry dashboard |
| sentry.service.environment | string | `"production"` | Environment of the sentry service |
| sentry.stacktrace.enabled | bool | `true` | Set to true, if stack trace should be enabled |
| sentry.stacktrace.packages | string | `""` | Comma-separated list of package prefixes to be included in the stacktrace |
| sentry.stacktrace.packages | string | `"org.radarbase.schema,org.radarbase.stream"` | Comma-separated list of package prefixes to be included in the stacktrace |
21 changes: 21 additions & 0 deletions charts/catalog-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,24 @@ Create chart name and version as used by the chart label.
{{- define "catalog-server.saslJaasConfig" -}}
{{- printf "org.apache.kafka.common.security.plain.PlainLoginModule required username='%s' password='%s';" .apiKey .apiSecret | b64enc | quote -}}
{{- end -}}

{{/*
Service name to be used by Sentry
*/}}
{{- define "catalog-server.sentryName" -}}
{{- if .Values.sentry.service.name }}
{{- printf "%s" .Values.sentry.service.name -}}
{{- else -}}
{{- printf "%s" (include "catalog-server.fullname" .) -}}{{- end -}}
{{- end }}

{{/*
App release to be used by Sentry
*/}}
{{- define "catalog-server.sentryRelease" -}}
{{- if .Values.sentry.service.release }}
{{- printf "%s" .Values.sentry.service.release -}}
{{- else -}}
{{- printf "%s" .Chart.AppVersion -}}
{{- end -}}
{{- end }}
8 changes: 4 additions & 4 deletions charts/catalog-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ spec:
value: {{ .Values.sentry.stacktrace.packages}}
{{- end }}
- name: SENTRY_NAME
value: {{ .Values.sentry.service.name }}
value: {{ include "catalog-server.sentryName" . }}
- name: SENTRY_RELEASE
value: {{ .Values.sentry.service.release }}
value: {{ include "catalog-server.sentryRelease" . }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.service.environment }}
{{- else }}
Expand Down Expand Up @@ -137,9 +137,9 @@ spec:
value: {{ .Values.sentry.stacktrace.packages}}
{{- end }}
- name: SENTRY_NAME
value: {{ .Values.sentry.service.name }}
value: {{ include "catalog-server.sentryName" . }}
- name: SENTRY_RELEASE
value: {{ .Values.sentry.service.release }}
value: {{ include "catalog-server.sentryRelease" . }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.service.environment }}
{{- else }}
Expand Down
4 changes: 2 additions & 2 deletions charts/catalog-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ sentry:
# -- Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR)
level: ERROR
service:
# -- Name of the sentry service
# -- Name of the service to be displayed in the sentry dashboard
name:
# -- App version of the sentry service
# -- App version to be displayed in the sentry dashboard
release:
# -- Environment of the sentry service
environment: production
Expand Down
8 changes: 4 additions & 4 deletions charts/data-dashboard-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ API for data in the data dashboard
| jdbc.properties."hibernate.physical_naming_strategy" | string | `"org.radarbase.datadashboard.api.domain.model.CamelCaseToUppercaseColumnNamingStrategy"` | Must be _CamelCaseToUppercaseColumnNamingStrategy_ for compatibility with table created by jdbc-connector |
| sentry.dsn | string | `nil` | DSN (Data Source Name) of the sentry server |
| sentry.level | string | `"ERROR"` | Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR) |
| sentry.service.name | string | `nil` | Name of the sentry service |
| sentry.service.release | string | `nil` | App version of the sentry service |
| sentry.service.environment | string | `"production"` | Environment of the sentry service |
| sentry.service.name | string | `nil` | Name of the service to be displayed in the sentry dashboard |
| sentry.service.release | string | `nil` | App version to be displayed in the sentry dashboard |
| sentry.service.environment | string | `"production"` | The environment name for this installation. |
| sentry.stacktrace.enabled | bool | `true` | Set to true, if stack trace should be enabled |
| sentry.stacktrace.packages | string | `""` | Comma-separated list of package prefixes to be included in the stacktrace |
| sentry.stacktrace.packages | string | `"org.radarbase.datadashboard,org.radarbase.upload"` | Comma-separated list of package prefixes to be included in the stacktrace |
21 changes: 21 additions & 0 deletions charts/data-dashboard-backend/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,24 @@ Selector labels
app.kubernetes.io/name: {{ include "data-dashboard-backend.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Service name to be used by Sentry
*/}}
{{- define "data-dashboard-backend.sentryName" -}}
{{- if .Values.sentry.service.name }}
{{- printf "%s" .Values.sentry.service.name -}}
{{- else -}}
{{- printf "%s" (include "data-dashboard-backend.fullname" .) -}}{{- end -}}
{{- end }}

{{/*
App release to be used by Sentry
*/}}
{{- define "data-dashboard-backend.sentryRelease" -}}
{{- if .Values.sentry.service.release }}
{{- printf "%s" .Values.sentry.service.release -}}
{{- else -}}
{{- printf "%s" .Chart.AppVersion -}}
{{- end -}}
{{- end }}
4 changes: 2 additions & 2 deletions charts/data-dashboard-backend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ spec:
value: {{ .Values.sentry.stacktrace.packages}}
{{- end }}
- name: SENTRY_NAME
value: {{ .Values.sentry.service.name }}
value: {{ include "data-dashboard-backend.sentryName" . }}
- name: SENTRY_RELEASE
value: {{ .Values.sentry.service.release }}
value: {{ include "data-dashboard-backend.sentryRelease" . }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.service.environment }}
{{- else }}
Expand Down
6 changes: 3 additions & 3 deletions charts/data-dashboard-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ sentry:
# -- Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR)
level: ERROR
service:
# -- Name of the sentry service
# -- Name of the service to be displayed in the sentry dashboard
name:
# -- App version of the sentry service
# -- App version to be displayed in the sentry dashboard
release:
# -- Environment of the sentry service
# -- The environment name for this installation.
environment: production
stacktrace:
# -- Set to true, if stack trace should be enabled
Expand Down
6 changes: 3 additions & 3 deletions charts/management-portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ A Helm chart for RADAR-Base Management Portal to manage projects and participant
| oauth_clients | object | check `values.yaml` | OAuth2 Client configuration |
| sentry.dsn | string | `nil` | DSN (Data Source Name) of the sentry server |
| sentry.level | string | `"ERROR"` | Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR) |
| sentry.service.name | string | `nil` | Name of the sentry service |
| sentry.service.release | string | `nil` | App version of the sentry service |
| sentry.service.name | string | `nil` | Name of the service to be displayed in the sentry dashboard |
| sentry.service.release | string | `nil` | App version to be displayed in the sentry dashboard |
| sentry.service.environment | string | `"production"` | Environment of the sentry service |
| sentry.stacktrace.enabled | bool | `true` | Set to true, if stack trace should be enabled |
| sentry.stacktrace.packages | string | `""` | Comma-separated list of package prefixes to be included in the stacktrace |
| sentry.stacktrace.packages | string | `"org.radarbase.management,org.radarbase.auth"` | Comma-separated list of package prefixes to be included in the stacktrace |

## OAuth Client Configuration
List of OAuth client configurations supported by RADAR-base. Each client should be enabled separately, if relevant and used in the installation.
Expand Down
21 changes: 21 additions & 0 deletions charts/management-portal/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,24 @@ Return true if a secret object should be created
{{- true -}}
{{- end -}}
{{- end -}}

{{/*
Service name to be used by Sentry
*/}}
{{- define "management-portal.sentryName" -}}
{{- if .Values.sentry.service.name }}
{{- printf "%s" .Values.sentry.service.name -}}
{{- else -}}
{{- printf "%s" (include "management-portal.fullname" .) -}}{{- end -}}
{{- end }}

{{/*
App release to be used by Sentry
*/}}
{{- define "management-portal.sentryRelease" -}}
{{- if .Values.sentry.service.release }}
{{- printf "%s" .Values.sentry.service.release -}}
{{- else -}}
{{- printf "%s" .Chart.AppVersion -}}
{{- end -}}
{{- end }}
4 changes: 2 additions & 2 deletions charts/management-portal/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ spec:
value: {{ .Values.sentry.stacktrace.packages}}
{{- end }}
- name: SENTRY_NAME
value: {{ .Values.sentry.service.name }}
value: {{ include "management-portal.sentryName" . }}
- name: SENTRY_RELEASE
value: {{ .Values.sentry.service.release }}
value: {{ include "management-portal.sentryRelease" . }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.service.environment }}
{{- else }}
Expand Down
4 changes: 2 additions & 2 deletions charts/management-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,9 @@ sentry:
# -- Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR)
level: ERROR
service:
# -- Name of the sentry service
# -- Name of the service to be displayed in the sentry dashboard
name:
# -- App version of the sentry service
# -- App version to be displayed in the sentry dashboard
release:
# -- Environment of the sentry service
environment: production
Expand Down
6 changes: 3 additions & 3 deletions charts/radar-appserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ A Helm chart for the backend application of RADAR-base Appserver
| upload.storage.path.collection_per_day | bool | `false` | if set to true, a new folder will be created for each day |
| sentry.dsn | string | `nil` | DSN (Data Source Name) of the sentry server |
| sentry.level | string | `"ERROR"` | Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR) |
| sentry.service.name | string | `nil` | Name of the sentry service |
| sentry.service.release | string | `nil` | App version of the sentry service |
| sentry.service.name | string | `nil` | Name of the service to be displayed in the sentry dashboard |
| sentry.service.release | string | `nil` | App version to be displayed in the sentry dashboard |
| sentry.service.environment | string | `"production"` | Environment of the sentry service |
| sentry.stacktrace.enabled | bool | `true` | Set to true, if stack trace should be enabled |
| sentry.stacktrace.packages | string | `""` | Comma-separated list of package prefixes to be included in the stacktrace |
| sentry.stacktrace.packages | string | `"org.radarbase.appserver,org.radarbase.auth,org.radarbase.fcm"` | Comma-separated list of package prefixes to be included in the stacktrace |
21 changes: 21 additions & 0 deletions charts/radar-appserver/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,24 @@ Selector labels
app.kubernetes.io/name: {{ include "radar-appserver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Service name to be used by Sentry
*/}}
{{- define "radar-appserver.sentryName" -}}
{{- if .Values.sentry.service.name }}
{{- printf "%s" .Values.sentry.service.name -}}
{{- else -}}
{{- printf "%s" (include "radar-appserver.fullname" .) -}}{{- end -}}
{{- end }}

{{/*
App release to be used by Sentry
*/}}
{{- define "radar-appserver.sentryRelease" -}}
{{- if .Values.sentry.service.release }}
{{- printf "%s" .Values.sentry.service.release -}}
{{- else -}}
{{- printf "%s" .Chart.AppVersion -}}
{{- end -}}
{{- end }}
4 changes: 2 additions & 2 deletions charts/radar-appserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ spec:
value: {{ .Values.sentry.stacktrace.packages}}
{{- end }}
- name: SENTRY_NAME
value: {{ .Values.sentry.service.name }}
value: {{ include "radar-appserver.sentryName" . }}
- name: SENTRY_RELEASE
value: {{ .Values.sentry.service.release }}
value: {{ include "radar-appserver.sentryRelease" . }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.service.environment }}
{{- else }}
Expand Down
4 changes: 2 additions & 2 deletions charts/radar-appserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ sentry:
# -- Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR)
level: ERROR
service:
# -- Name of the sentry service
# -- Name of the service to be displayed in the sentry dashboard
name:
# -- App version of the sentry service
# -- App version to be displayed in the sentry dashboard
release:
# -- Environment of the sentry service
environment: production
Expand Down
6 changes: 3 additions & 3 deletions charts/radar-fitbit-connector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ A Helm chart for RADAR-base fitbit connector. This application collects data fro
| user_cache_refresh_interval_ms | int | `3600000` | How often to invalidate the cache and poll for new user registrations. Only use to speed up processing times during e2e testing. |
| sentry.dsn | string | `nil` | DSN (Data Source Name) of the sentry server |
| sentry.level | string | `"ERROR"` | Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR) |
| sentry.service.name | string | `nil` | Name of the sentry service |
| sentry.service.release | string | `nil` | App version of the sentry service |
| sentry.service.name | string | `nil` | Name of the service to be displayed in the sentry dashboard |
| sentry.service.release | string | `nil` | App version to be displayed in the sentry dashboard |
| sentry.service.environment | string | `"production"` | Environment of the sentry service |
| sentry.stacktrace.enabled | bool | `true` | Set to true, if stack trace should be enabled |
| sentry.stacktrace.packages | string | `""` | Comma-separated list of package prefixes to be included in the stacktrace |
| sentry.stacktrace.packages | string | `"org.radarbase.connect"` | Comma-separated list of package prefixes to be included in the stacktrace |
21 changes: 21 additions & 0 deletions charts/radar-fitbit-connector/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,24 @@ Create chart name and version as used by the chart label.
{{- define "radar-fitbit-connector.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Service name to be used by Sentry
*/}}
{{- define "radar-fitbit-connector.sentryName" -}}
{{- if .Values.sentry.service.name }}
{{- printf "%s" .Values.sentry.service.name -}}
{{- else -}}
{{- printf "%s" (include "radar-fitbit-connector.fullname" .) -}}{{- end -}}
{{- end }}

{{/*
App release to be used by Sentry
*/}}
{{- define "radar-fitbit-connector.sentryRelease" -}}
{{- if .Values.sentry.service.release }}
{{- printf "%s" .Values.sentry.service.release -}}
{{- else -}}
{{- printf "%s" .Chart.AppVersion -}}
{{- end -}}
{{- end }}
4 changes: 2 additions & 2 deletions charts/radar-fitbit-connector/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ spec:
value: {{ .Values.sentry.stacktrace.packages}}
{{- end }}
- name: SENTRY_NAME
value: {{ .Values.sentry.service.name }}
value: {{ include "radar-fitbit-connector.sentryName" . }}
- name: SENTRY_RELEASE
value: {{ .Values.sentry.service.release }}
value: {{ include "radar-fitbit-connector.sentryRelease" . }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.service.environment }}
{{- else }}
Expand Down
4 changes: 2 additions & 2 deletions charts/radar-fitbit-connector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ sentry:
# -- Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR)
level: ERROR
service:
# -- Name of the sentry service
# -- Name of the service to be displayed in the sentry dashboard
name:
# -- App version of the sentry service
# -- App version to be displayed in the sentry dashboard
release:
# -- Environment of the sentry service
environment: production
Expand Down
6 changes: 3 additions & 3 deletions charts/radar-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ A Helm chart for RADAR-base gateway. REST Gateway to Kafka, for incoming partici
| serverName | string | `"localhost"` | Resolvable server name, needed to find the advertised URL and callback URL |
| sentry.dsn | string | `nil` | DSN (Data Source Name) of the sentry server |
| sentry.level | string | `"ERROR"` | Log level for sentry (TRACE, DEBUG, INFO, WARN, or ERROR) |
| sentry.service.name | string | `nil` | Name of the sentry service |
| sentry.service.release | string | `nil` | App version of the sentry service |
| sentry.service.name | string | `nil` | Name of the service to be displayed in the sentry dashboard |
| sentry.service.release | string | `nil` | App version to be displayed in the sentry dashboard |
| sentry.service.environment | string | `"production"` | Environment of the sentry service |
| sentry.stacktrace.enabled | bool | `true` | Set to true, if stack trace should be enabled |
| sentry.stacktrace.packages | string | `""` | Comma-separated list of package prefixes to be included in the stacktrace |
| sentry.stacktrace.packages | string | `"org.radarbase.gateway,org.apache.avro"` | Comma-separated list of package prefixes to be included in the stacktrace |
Loading

0 comments on commit 2dcd892

Please sign in to comment.