Skip to content

Commit

Permalink
chore(oncall): use CNPG instead of RDS
Browse files Browse the repository at this point in the history
  • Loading branch information
SmaineTF1 committed Nov 24, 2024
1 parent 6cbe537 commit 19fdea7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: oncall-sqlinstance-password
name: xplane-oncall-cnpg-oncall
spec:
dataFrom:
- extract:
conversionStrategy: Default
key: observability/grafana/oncall-sqlinstance
key: cnpg/xplane-oncall/oncall
refreshInterval: 20m
secretStoreRef:
kind: ClusterSecretStore
name: clustersecretstore
target:
creationPolicy: Owner
deletionPolicy: Retain
name: oncall-pg-masterpassword
name: xplane-oncall-cnpg-oncall
8 changes: 3 additions & 5 deletions observability/base/grafana-oncall/helmrelease-oncall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
kind: HelmRepository
name: grafana
namespace: observability
version: "1.11.5"
version: "1.13.3"
interval: 5m0s
timeout: 15m
install:
Expand Down Expand Up @@ -66,14 +66,12 @@ spec:
enabled: false

externalPostgresql:
host: xplane-oncall-rds-service
host: xplane-oncall-cnpg-cluster-rw
port: 5432
db_name: "oncall"
user: "oncall"
existingSecret: "xplane-oncall-owner-oncall"
existingSecret: "xplane-oncall-cnpg-oncall"
passwordKey: "password"
options: >-
sslmode=require

rabbitmq:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
kind: HelmRepository
name: bitnami
namespace: flux-system
version: "15.0.3"
version: "15.0.6"
interval: 5m0s
timeout: 15m
install:
Expand Down
2 changes: 1 addition & 1 deletion observability/base/grafana-oncall/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ namespace: observability

resources:
- externalsecret-admin.yaml
- externalsecret-cnpg-oncall.yaml
- externalsecret-rabbitmq.yaml
- externalsecret-slackapp.yaml
- externalsecret-sqlinstance-password.yaml
- externalsecret-valkey.yaml
- helmrelease-oncall.yaml
- helmrelease-rabbitmq.yaml
Expand Down
28 changes: 11 additions & 17 deletions observability/base/grafana-oncall/sqlinstance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@ apiVersion: cloud.ogenki.io/v1alpha1
kind: SQLInstance
metadata:
name: xplane-oncall
namespace: tooling
namespace: "observability"
spec:
parameters:
engine: postgres
engineVersion: "16"
size: small
storageGB: 20
databases:
- owner: oncall
name: oncall
passwordSecretRef:
namespace: tooling
name: oncall-pg-masterpassword
key: password
compositionRef:
name: xsqlinstances.cloud.ogenki.io
writeConnectionSecretToRef:
name: xplane-oncall-rds
size: "small"
storageGB: 20
databases:
- owner: "oncall"
name: "oncall"
cnpg:
instances: 1
backup:
schedule: "0 0 * * *"
bucketName: "oncall-rds-instance-backups"
2 changes: 1 addition & 1 deletion security/base/cert-manager/openbao-clusterissuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
auth:
appRole:
path: approle
roleId: f52c783d-0259-86a4-c80d-2380a9cc443f # !! This value changes each time I recreate the whole platform
roleId: 4b20b17b-705d-80d9-18b0-7cb8a1a0b560 # !! This value changes each time I recreate the whole platform
secretRef:
name: cert-manager-openbao-approle
key: secret_id

0 comments on commit 19fdea7

Please sign in to comment.