Skip to content

Commit

Permalink
[Sentry] upgrade to postgresql 12 via postgres-ng chart (#6115)
Browse files Browse the repository at this point in the history
Co-authored-by: Sandro Jäckel <sandro.jaeckel@sap.com>
  • Loading branch information
rajivmucheli and SuperSandro2000 committed Mar 7, 2024
1 parent a491e87 commit a2bf833
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 128 deletions.
20 changes: 10 additions & 10 deletions system/sentry/Chart.lock
@@ -1,21 +1,21 @@
dependencies:
- name: pgbackup
repository: https://charts.eu-de-2.cloud.sap
version: 0.1.14
version: 0.1.44
- name: pgmetrics
repository: https://charts.eu-de-2.cloud.sap
version: 0.4.2
version: 0.4.21
- name: owner-info
repository: https://charts.eu-de-2.cloud.sap
version: 0.2.0
version: 0.2.3
- name: redis
repository: https://charts.eu-de-2.cloud.sap
version: 1.4.3
- name: postgresql
repository: file://../../common/postgresql
version: 0.3.0
version: 1.4.4
- name: postgresql-ng
repository: https://charts.eu-de-2.cloud.sap
version: 1.0.10
- name: linkerd-support
repository: oci://keppel.eu-de-1.cloud.sap/ccloud-helm
version: 0.1.3
digest: sha256:ba3d3c60b6bc585b5bf4af6455aa1762ec5565c7327dc679502dea585633f155
generated: "2024-02-29T19:49:21.847863+05:30"
version: 0.1.4
digest: sha256:114c94302a37c129161e42936478a3dd32b29822c447d34e64edbaa031e07cfc
generated: "2024-03-07T09:10:33.006061+05:30"
19 changes: 10 additions & 9 deletions system/sentry/Chart.yaml
@@ -1,23 +1,24 @@
apiVersion: v2
description: A Helm chart for Kubernetes
name: sentry
version: 0.2.0
version: 0.3.0
dependencies:
- name: pgbackup
repository: https://charts.eu-de-2.cloud.sap
version: 0.1.14
version: 0.1.44
- name: pgmetrics
repository: https://charts.eu-de-2.cloud.sap
version: 0.4.2 # WARNING: further updates are not possible because of ancient Postgres version (postgres-exporter >= 0.12 fails with `pq: function pg_current_wal_lsn() does not exist`)
version: 0.4.21
- name: owner-info
repository: https://charts.eu-de-2.cloud.sap
version: 0.2.0
version: 0.2.3
- name: redis
repository: https://charts.eu-de-2.cloud.sap
version: 1.4.3
- name: postgresql
repository: file://../../common/postgresql
version: 0.3.0
version: 1.4.4
- name: postgresql-ng
alias: postgresql
repository: https://charts.eu-de-2.cloud.sap
version: 1.0.10
- name: linkerd-support
repository: oci://keppel.eu-de-1.cloud.sap/ccloud-helm
version: 0.1.3
version: 0.1.4
3 changes: 1 addition & 2 deletions system/sentry/ci/test-values.yaml
Expand Up @@ -2,9 +2,8 @@ global:
registry: keppel.example.com/ccloud
dockerHubMirror: keppel.example.com/dockerhub
quayIoMirror: keppel.example.com/quayio
dockerHubMirrorAlternateRegion: registry-other.example.com/dockerhub

pgbackup:
database:
password: supersecret
swift:
os_password: alsoverysecret
4 changes: 3 additions & 1 deletion system/sentry/templates/_env.tpl
Expand Up @@ -11,8 +11,10 @@
valueFrom: { secretKeyRef: { name: {{ template "redis.fullname" . }}, key: redis-password } }
- name: SENTRY_SECRET_KEY
valueFrom: { secretKeyRef: { name: {{ template "fullname" . }}, key: sentry-secret-key } }
- name: SENTRY_DB_USER
value: "sentry"
- name: SENTRY_DB_PASSWORD
valueFrom: { secretKeyRef: { name: {{ template "postgresql.fullname" . }}, key: postgres-password } }
valueFrom: { secretKeyRef: { name: '{{ $.Release.Name }}-pguser-sentry', key: postgres-password } }
{{- if .Values.emailHost }}
- name: SENTRY_EMAIL_HOST
value: {{ .Values.emailHost | squote }}
Expand Down
223 changes: 117 additions & 106 deletions system/sentry/values.yaml
@@ -1,6 +1,7 @@
# Default values for sentry.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
---
serverReplicaCount: 1
workerReplicaCount: 1

Expand All @@ -9,161 +10,171 @@ global:

# SENTRY_FILESTORE_DIR
#
#secretKey: $(docker run --rm sentry config generate-secret-key)
#emailHost:
#serverEmail: '"Sentry" <root@localhost>'
#singleOrganization: false
#githubAppId:
#githubApiSecret:
#useSsl: false
# secretKey: $(docker run --rm sentry config generate-secret-key)
# emailHost:
# serverEmail: '"Sentry" <root@localhost>'
# singleOrganization: false
# githubAppId:
# githubApiSecret:
# useSsl: false
#
#extraEnvVars:
# extraEnvVars:
# e.g.
# GITHUB_BASE_DOMAIN: github.example.com
# GITHUB_API_DOMAIN: api.github.example.com
#
# initial user:
# adminEmail:
# adminPassword:
# yamllint disable-line rule:line-length
# Generate with: python -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex+ uuid.uuid4().hex)
# adminToken:
organizationName: Monsoon
organizationSlug: monsoon
image:
repository: sentry
tag: 9.1.2-r4
pullPolicy: IfNotPresent
repository: sentry
tag: 9.1.2-r4
pullPolicy: IfNotPresent
service:
name: sentry
type: ClusterIP
externalPort: 80
internalPort: 9000
name: sentry
type: ClusterIP
externalPort: 80
internalPort: 9000
pruning_time: '0315'

owner-info:
support-group: identity
service: sentry
maintainers:
- Rajiv Mucheli
- Olaf Heydorn
helm-chart-url: https://github.com/sapcc/helm-charts/tree/master/system/sentry
support-group: identity
service: sentry
maintainers:
- Rajiv Mucheli
- Olaf Heydorn
helm-chart-url: https://github.com/sapcc/helm-charts/tree/master/system/sentry

ingress:
enabled: false
enabled: false
# host:
# tls_crt:
# tls_key:

rbac:
create: true
create: true

operator:
#sentryEndpoint: https://sentry.$region.cloud.sap/api/0/
enabled: false
image:
repository: kube-sentry
tag: 0.3.0
pullPolicy: IfNotPresent
# sentryEndpoint: https://sentry.$region.cloud.sap/api/0/
enabled: false
image:
repository: kube-sentry
tag: 0.3.0
pullPolicy: IfNotPresent

postgresql:
postgresDatabase: sentry
persistence:
enabled: true
accessMode: ReadWriteMany
size: 50Gi
resources:
requests:
memory: 10Gi
cpu: 4
limits:
memory: 10Gi
cpu: 4
alerts:
support_group: identity
#postgresql image:
imageTag: 9.5
postgresVersion: 12
postgresDatabase: sentry
persistence:
enabled: true
accessMode: ReadWriteMany
size: 50Gi
resources:
requests:
memory: 10Gi
cpu: 4
limits:
memory: 10Gi
cpu: 4
alerts:
support_group: identity
# postgresql image:
imageTag: '20240306170746'
users:
sentry: {}
tableOwner: sentry
debug: true

redis:
# redisPassword:
persistence:
enabled: true
# redisPassword:
persistence:
enabled: true
accessMode: ReadWriteMany
size: 10Gi
resources:
requests:
memory: 5Gi
cpu: 2
limits:
memory: 10Gi
cpu: 2
resources:
requests:
memory: 5Gi
cpu: 2
limits:
memory: 10Gi
cpu: 2

sentry:
resources:
requests:
memory: 5Gi
cpu: 4
limits:
memory: 10Gi
cpu: 4
resources:
requests:
memory: 5Gi
cpu: 4
limits:
memory: 10Gi
cpu: 4

serviceAccount:
annotations: {}
enabled: true
name: "sentry"
automountServiceAccountToken: true
annotations: {}
enabled: true
name: "sentry"
automountServiceAccountToken: true

# Deploy Sentry Prometheus alerts.
alerts:
enabled: true
enabled: true
# Name of the Prometheus to which the alerts should be assigned to.
prometheus: openstack
prometheus: openstack

pgbackup:
database:
name: sentry
alerts:
support_group: identity
isPostgresNG: true
database:
name: sentry
alerts:
support_group: identity

pgmetrics:
db_name: sentry
alerts:
large_database_size_enabled: false
support_group: identity

customMetrics:
sentry_unresolved_issues:
query: >
SELECT o.slug AS organization, p.slug AS project, COUNT(*) FROM sentry_groupedmessage gm
JOIN sentry_project p ON gm.project_id = p.id
JOIN sentry_organization o ON p.organization_id = o.id
WHERE gm.status = 0
GROUP BY o.slug, p.slug
metrics:
- organization: {usage: LABEL, description: "Sentry organization"}
- project: {usage: LABEL, description: "Sentry project"}
- gauge: {usage: GAUGE, description: "Number of unresolved issues in project"}

sentry_unresolved_issues_nova:
query: >
SELECT o.slug AS organization, p.slug AS project, message, COUNT(*) FROM sentry_groupedmessage gm
JOIN sentry_project p ON gm.project_id = p.id
JOIN sentry_organization o ON p.organization_id = o.id
WHERE gm.status = 0 AND p.slug = 'nova'
GROUP BY o.slug, p.slug, message
metrics:
- organization: {usage: LABEL, description: "Sentry organization"}
- project: {usage: LABEL, description: "Sentry project"}
- message: {usage: LABEL, description: "Issue message"}
- gauge: {usage: GAUGE, description: "Number of unresolved issues in project"}
isPostgresNG: true
db_name: sentry
alerts:
large_database_size_enabled: false
support_group: identity

customMetrics:
sentry_unresolved_issues:
query: >
SELECT o.slug AS organization, p.slug AS project, COUNT(*) FROM sentry_groupedmessage gm
JOIN sentry_project p ON gm.project_id = p.id
JOIN sentry_organization o ON p.organization_id = o.id
WHERE gm.status = 0
GROUP BY o.slug, p.slug
metrics:
- organization: {usage: LABEL, description: "Sentry organization"}
- project: {usage: LABEL, description: "Sentry project"}
- gauge: {usage: GAUGE, description: "Number of unresolved issues in project"}

sentry_unresolved_issues_nova:
query: >
SELECT o.slug AS organization, p.slug AS project, message, COUNT(*) FROM sentry_groupedmessage gm
JOIN sentry_project p ON gm.project_id = p.id
JOIN sentry_organization o ON p.organization_id = o.id
WHERE gm.status = 0 AND p.slug = 'nova'
GROUP BY o.slug, p.slug, message
metrics:
- organization: {usage: LABEL, description: "Sentry organization"}
- project: {usage: LABEL, description: "Sentry project"}
- message: {usage: LABEL, description: "Issue message"}
- gauge: {usage: GAUGE, description: "Number of unresolved issues in project"}

probe:
enabled: false
enabled: false

# yamllint disable-line rule:line-length
# yamllint disable-line rule:line-length
# enable when Sentry version is upgraded, also validate if GEOIP_PATH_MMDB is configured.
databaseUpgrade:
enabled: false
enabled: false

# sentry-sentry-tls is used, keeping the config for future reference.
secretIngress:
tls_crt:
enabled: false
tls_crt:
enabled: false

0 comments on commit a2bf833

Please sign in to comment.