Skip to content

Commit

Permalink
Sentry fix using proper helm chart and use postgres module chart (#373)
Browse files Browse the repository at this point in the history
* init get forked chart

Signed-off-by: DavidSpek <[email protected]>

* migrate sentry to postgres module chart

Signed-off-by: DavidSpek <[email protected]>

* add dummy values so helm template works

Signed-off-by: DavidSpek <[email protected]>

* use dedicated rabbitmq host

Signed-off-by: David van der Spek <[email protected]>

* bump chart version

Signed-off-by: David van der Spek <[email protected]>

Signed-off-by: DavidSpek <[email protected]>
Signed-off-by: David van der Spek <[email protected]>
  • Loading branch information
davidspek authored Nov 30, 2022
1 parent 34e7864 commit 94dd793
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 363 deletions.
14 changes: 10 additions & 4 deletions sentry/helm/sentry/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
dependencies:
- name: sentry
repository: file://../../../../sentry-charts/sentry
version: 11.3.0
digest: sha256:c48f77f631263700f3fa72c494d4fab83a5a516383ead579dda441833daf8b77
generated: "2021-05-23T13:56:58.887417-04:00"
repository: https://pluralsh.github.io/plural-helm-charts
version: 11.3.3
- name: postgres
repository: https://pluralsh.github.io/module-library
version: 0.1.13
- name: rabbitmq
repository: https://pluralsh.github.io/module-library
version: 0.1.0
digest: sha256:a6f313004f4a04708f794e65065069e31dfd3c286983a7b426f204d257db6650
generated: "2022-11-30T17:32:48.936765+01:00"
16 changes: 11 additions & 5 deletions sentry/helm/sentry/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ apiVersion: v2
name: sentry
description: A Helm chart for deploying sentry on plural
type: application
version: 0.2.15
appVersion: "1.16.0"

version: 0.2.16
appVersion: "21.5.1"
dependencies:
- name: sentry
version: 11.3.0
repository: file://../../../../sentry-charts/sentry
version: 11.3.3
repository: https://pluralsh.github.io/plural-helm-charts
- name: postgres
version: 0.1.13
repository: https://pluralsh.github.io/module-library
condition: postgres.enabled
- name: rabbitmq
version: 0.1.0
repository: https://pluralsh.github.io/module-library
Binary file added sentry/helm/sentry/charts/postgres-0.1.13.tgz
Binary file not shown.
Binary file added sentry/helm/sentry/charts/rabbitmq-0.1.0.tgz
Binary file not shown.
Binary file removed sentry/helm/sentry/charts/sentry-11.3.0.tgz
Binary file not shown.
Binary file added sentry/helm/sentry/charts/sentry-11.3.3.tgz
Binary file not shown.
68 changes: 0 additions & 68 deletions sentry/helm/sentry/runbooks/db-scaling.xml

This file was deleted.

59 changes: 0 additions & 59 deletions sentry/helm/sentry/templates/dashboards.yaml

This file was deleted.

87 changes: 0 additions & 87 deletions sentry/helm/sentry/templates/postgres.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions sentry/helm/sentry/templates/prometheusrule.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions sentry/helm/sentry/templates/proxies.yaml

This file was deleted.

68 changes: 0 additions & 68 deletions sentry/helm/sentry/templates/runbooks.yaml
Original file line number Diff line number Diff line change
@@ -1,73 +1,5 @@
apiVersion: platform.plural.sh/v1alpha1
kind: Runbook
metadata:
name: db-scaling
labels:
platform.plural.sh/pinned: 'true'
{{ include "sentry-plural.labels" . | indent 4 }}
spec:
name: Postgres Scaling
description: overview of how to accurately scale sentry's postgres instance
alerts:
- name: SentryPostgresMEM
- name: SentryPostgresCPU
display: |-
{{ .Files.Get "runbooks/db-scaling.xml" | indent 4 }}
datasources:
- name: cpu
type: prometheus
prometheus:
format: cpu
legend: $pod
query: sum(rate(container_cpu_usage_seconds_total{namespace="{{ .Release.Namespace }}",pod=~"plural-sentry-[0-9]+"}[5m])) by (pod)
- name: memory
type: prometheus
prometheus:
format: memory
legend: $pod
query: sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-sentry-[0-9]+"}) by (pod)
- name: volume
type: prometheus
prometheus:
format: none
legend: $persistentvolumeclaim
query: (kubelet_volume_stats_capacity_bytes{namespace="{{ .Release.Namespace }}", persistentvolumeclaim=~"pgdata-plural-sentry-.*"} - kubelet_volume_stats_available_bytes{namespace="{{ .Release.Namespace }}", persistentvolumeclaim=~"pgdata-plural-sentry-.*"}) / kubelet_volume_stats_capacity_bytes{namespace="{{ .Release.Namespace }}", persistentvolumeclaim=~"pgdata-plural-sentry-.*"}
- name: statefulset
type: kubernetes
kubernetes:
resource: statefulset
name: plural-sentry
- name: nodes
type: nodes
actions:
- name: scale
action: config
redirectTo: '/'
configuration:
updates:
- path:
- sentry
- postgres
- resources
- requests
- cpu
valueFrom: cpu
- path:
- sentry
- postgres
- resources
- requests
- memory
valueFrom: memory
- path:
- sentry
- postgres
- storage
- size
valueFrom: volume
---
apiVersion: platform.plural.sh/v1alpha1
kind: Runbook
metadata:
name: clickhouse-scaling
labels:
Expand Down
Loading

0 comments on commit 94dd793

Please sign in to comment.