Skip to content

Commit

Permalink
add support for additional sentry configs (#32)
Browse files Browse the repository at this point in the history
* add support for addtional sentry configs

* remove unused variable
  • Loading branch information
bennsimon authored Sep 10, 2021
1 parent ba51c44 commit 45e31c8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/opensrp-server-web/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.10
version: 0.1.11

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: v3.0.2-SNAPSHOT
appVersion: v3.0.3-SNAPSHOT
5 changes: 5 additions & 0 deletions charts/opensrp-server-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,8 @@ The following table lists the configurable parameters of the Opensrp-server-web
| `tomcatRemoteIpValve.internalProxies` | `dynamically populated if not specified, control the hostPortion by updating hostOctetPortion e.g for 2 is equivalent to ip/16` | `nil` |
| `useTomcatRemoteIpValve` | | `false` |
| `commonLabels` | | `{}` |
| `sentry.dsn` | | `""` |
| `sentry.environment` | | `"staging"` |
| `sentry.minimumEventLevel` | | `"error"` |
| `sentry.minimumBreadcrumbLevel` | | `"info"` |
| `sentry.tags` | | `{}` |
11 changes: 11 additions & 0 deletions charts/opensrp-server-web/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,14 @@ Find the podCIDRPattern
{{- end }}
{{- end }}
{{- end }}

{{/*
Get sentry tags
*/}}
{{- define "opensrp-server-web.sentryTags" }}
{{- $dynamicTagMap := dict "release-name" .Release.Name -}}
{{- range $index, $element:=.Values.sentry.tags }}
{{- $_ := set $dynamicTagMap $index $element -}}
{{- end }}
{{- $dynamicTagMap | toJson }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,13 @@ rabbitmq.reply.timeout={{ .Values.rabbitmq.reply_timeout }}
rabbitmq.concurrent.consumers={{ .Values.rabbitmq.concurrent_consumers }}
rabbitmq.max.concurrent.consumers={{ .Values.rabbitmq.max_concurrent_consumers }}


sentry.dsn={{ .Values.sentry.dsn }}
sentry.release={{ .Values.image.tag }}
sentry.release={{ .Values.sentry.release | default .Values.image.tag }}
sentry.environment={{ .Values.sentry.environment }}
sentry.minimumBreadcrumbLevel={{ .Values.sentry.minimumBreadcrumbLevel }}
sentry.minimumEventLevel={{ .Values.sentry.minimumEventLevel }}
sentry.tags={{ include "opensrp-server-web.sentryTags" . }}

{{- range $index, $element:=.Values.oauth_profiles }}
#OAuth Profile {{ $index }}
Expand Down
5 changes: 4 additions & 1 deletion charts/opensrp-server-web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: opensrp/opensrp-server-web
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v2.5.11-SNAPSHOT"
tag: "v3.0.3-SNAPSHOT"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -244,3 +244,6 @@ oauth_profiles:
sentry:
dsn: ""
environment: "staging"
minimumEventLevel: "error"
minimumBreadcrumbLevel: "info"
tags: {}

0 comments on commit 45e31c8

Please sign in to comment.