Skip to content

Commit cabfd43

Browse files
feat: Split Sentry configuration for individual services (#355)
* feat: Split Sentry configuration per service - bump chart version to 1.16.1 --------- Signed-off-by: Cristian Gauxachs Marin <[email protected]>
1 parent 4026fa5 commit cabfd43

File tree

6 files changed

+158
-128
lines changed

6 files changed

+158
-128
lines changed

deployment/chainloop/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Chainloop is an open source software supply chain control plane, a
44

55
type: application
66
# Bump the patch (not minor, not major) version on each change in the Chart Source code
7-
version: 1.16.0
7+
version: 1.16.1
88
# Do not update appVersion, this is handled automatically by the release process
99
appVersion: v0.18.0
1010

deployment/chainloop/README.md

+111-94
Large diffs are not rendered by default.

deployment/chainloop/templates/_helpers.tpl

+7
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,13 @@ null
274274
{{- end -}}
275275
{{- end -}}
276276

277+
{{- define "chainloop.sentry" -}}
278+
observability:
279+
sentry:
280+
dsn: {{ required "Sentry DSN required" .dsn | quote }}
281+
environment: {{ required "Sentry environment required" .environment | quote }}
282+
{{- end -}}
283+
277284
{{/*
278285
##############################################################################
279286
sql-proxy helpers

deployment/chainloop/templates/cas/config.secret.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ metadata:
66
{{- include "chainloop.cas.labels" . | nindent 4 }}
77
type: Opaque
88
stringData:
9-
{{- if and .Values.sentry .Values.sentry.enabled }}
9+
{{- if and .Values.cas.sentry .Values.cas.sentry.enabled }}
1010
config.observability.yaml: |
11-
observability:
12-
sentry:
13-
dsn: {{ required "Sentry DSN required" .Values.sentry.dsn | quote }}
14-
environment: {{ required "Sentry environment required" .Values.sentry.environment | quote }}
11+
{{- include "chainloop.sentry" .Values.cas.sentry | nindent 4 }}
1512
{{- end }}
1613
config.secret.yaml: |
1714
credentials_service: {{- include "chainloop.credentials_service_settings" . | indent 6 }}

deployment/chainloop/templates/controlplane/config.secret.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ data:
1111
generated_jws_hmac_secret: {{ $hmacpass }}
1212
stringData:
1313
{{- if and .Values.sentry .Values.sentry.enabled }}
14+
{{- fail "configuring sentry at the top level is no longer supported. Add the configuration to the controlplane section in the values.yaml file" }}
15+
{{- end -}}
16+
{{- if and .Values.controlplane.sentry .Values.controlplane.sentry.enabled }}
1417
config.observability.yaml: |
15-
observability:
16-
sentry:
17-
dsn: {{ required "Sentry DSN required" .Values.sentry.dsn | quote }}
18-
environment: {{ required "Sentry environment required" .Values.sentry.environment | quote }}
18+
{{- include "chainloop.sentry" .Values.controlplane.sentry | nindent 4 }}
1919
{{- end }}
2020
config.secret.yaml: |
2121
data:

deployment/chainloop/values.yaml

+33-24
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,12 @@ development: false
1717
GKEMonitoring:
1818
enabled: false
1919

20-
## @param sentry.enabled Enable sentry.io alerting
21-
## @param sentry.dsn DSN endpoint https://docs.sentry.io/product/sentry-basics/dsn-explainer/
22-
## @param sentry.environment Environment tag
23-
sentry:
24-
enabled: false
25-
dsn: ""
26-
environment: production
27-
2820
## @section Secrets Backend
2921
##
3022

3123
## Location where to store sensitive data. If development.true? and no overrides provided, the setup will connect to a development instance of Vault
3224
secretsBackend:
33-
## @param secretsBackend.backend Secrets backend type ("vault", "awsSecretManager" or "gcpSecretManager")
25+
## @param secretsBackend.backend Secrets backend type ("vault", "awsSecretManager" or "gcpSecretManager")
3426
##
3527
backend: "vault" # "awsSecretManager"
3628
## @param secretsBackend.secretPrefix Prefix that will be pre-pended to all secrets in the storage backend
@@ -90,7 +82,7 @@ casJWTPublicKey: ""
9082

9183
## @section Control Plane
9284
###################################
93-
## CONTROL PLANE #
85+
## CONTROL PLANE #
9486
###################################
9587
controlplane:
9688
## @param controlplane.replicaCount Number of replicas
@@ -103,7 +95,7 @@ controlplane:
10395
# Overrides the image tag whose default is the chart appVersion.
10496
# tag: latest
10597

106-
## @param controlplane.secret.name name of a secret containing TLS certificate to be used by the controlplane grpc server.
98+
## @param controlplane.tlsConfig.secret.name name of a secret containing TLS certificate to be used by the controlplane grpc server.
10799
tlsConfig:
108100
secret:
109101
# the secret must contains 2 keys: tls.crt and tls.key respectively containing the certificate and private key.
@@ -151,7 +143,7 @@ controlplane:
151143
sqlProxy:
152144
## @param controlplane.sqlProxy.enabled Enable sidecar to connect to DB via Google Cloud SQL proxy
153145
enabled: false
154-
## @param controlplane.sqlProxy.connectionName Google Cloud SQL connection name
146+
## @param controlplane.sqlProxy.connectionName Google Cloud SQL connection name
155147
connectionName: ""
156148
## @param controlplane.sqlProxy.resources Sidecar container resources
157149
resources: {}
@@ -169,7 +161,7 @@ controlplane:
169161
url: ""
170162
clientID: ""
171163
clientSecret: ""
172-
164+
173165
## @section Control Plane Networking
174166
service:
175167
## @param controlplane.service.type Service type
@@ -181,7 +173,8 @@ controlplane:
181173
## @extra controlplane.service.nodePorts.http Node port for HTTP. NOTE: choose port between <30000-32767>
182174
# nodePorts:
183175
# http: "30800"
184-
annotations: {}
176+
annotations:
177+
{}
185178
## @skip controlplane.service.annotations
186179

187180
serviceAPI:
@@ -332,7 +325,7 @@ controlplane:
332325
## @skip controlplane.ingressAPI.annotations.nginx.ingress.kubernetes.io/backend-protocol
333326
## Tell Nginx Ingress Controller to expect gRPC traffic
334327
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
335-
328+
336329
## @param controlplane.ingressAPI.tls Enable TLS configuration for the host defined at `controlplane.ingress.hostname` parameter
337330
## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.controlplane.ingress.hostname }}`
338331
## You can:
@@ -433,10 +426,18 @@ controlplane:
433426
maxReplicas: 100
434427
targetCPUUtilizationPercentage: 80
435428
targetMemoryUtilizationPercentage: 80
436-
429+
430+
## @param controlplane.sentry.enabled Enable sentry.io alerting
431+
## @param controlplane.sentry.dsn DSN endpoint https://docs.sentry.io/product/sentry-basics/dsn-explainer/
432+
## @param controlplane.sentry.environment Environment tag
433+
sentry:
434+
enabled: false
435+
dsn: ""
436+
environment: production
437+
437438
## @section Artifact Content Addressable (CAS) API
438439
##################################
439-
# Artifacts CAS #
440+
# Artifacts CAS #
440441
##################################
441442
cas:
442443
## @param cas.replicaCount Number of replicas
@@ -476,7 +477,8 @@ cas:
476477
## @extra cas.service.nodePorts.http Node port for HTTP. NOTE: choose port between <30000-32767>
477478
# nodePorts:
478479
# http: "30800"
479-
annotations: {}
480+
annotations:
481+
{}
480482
## @skip cas.service.annotations
481483

482484
serviceAPI:
@@ -626,13 +628,13 @@ cas:
626628
annotations:
627629
# Nginx Ingress settings
628630
## @skip cas.ingressAPI.annotations.nginx.ingress.kubernetes.io/proxy-body-size
629-
# Limit file uploads/downloads to 100MB. Alternatively you can disable this limitation by setting it to 0
631+
# Limit file uploads/downloads to 100MB. Alternatively you can disable this limitation by setting it to 0
630632
# Even though we send data in chunks of 1MB, this size refers to all the data sent during the whole streaming session
631633
nginx.ingress.kubernetes.io/proxy-body-size: "100m"
632634
## @skip cas.ingressAPI.annotations.nginx.ingress.kubernetes.io/backend-protocol
633635
## Tell Nginx Ingress Controller to expect gRPC traffic
634636
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
635-
637+
636638
## @param cas.ingressAPI.tls Enable TLS configuration for the host defined at `controlplane.ingress.hostname` parameter
637639
## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.controlplane.ingress.hostname }}`
638640
## You can:
@@ -733,10 +735,18 @@ cas:
733735
targetCPUUtilizationPercentage: 80
734736
targetMemoryUtilizationPercentage: 80
735737

736-
## @section Dependencies
737-
# ##################################
738-
# # Dependencies #
738+
## @param cas.sentry.enabled Enable sentry.io alerting
739+
## @param cas.sentry.dsn DSN endpoint https://docs.sentry.io/product/sentry-basics/dsn-explainer/
740+
## @param cas.sentry.environment Environment tag
741+
sentry:
742+
enabled: false
743+
dsn: ""
744+
environment: production
745+
746+
## @section Dependencies
739747
# ##################################
748+
# # Dependencies #
749+
##################################
740750

741751
## PostgreSQL chart configuration
742752
## ref: https://github.com/bitnami/charts/blob/main/bitnami/postgresql/values.yaml
@@ -755,7 +765,6 @@ postgresql:
755765
database: "chainloop-cp"
756766
existingSecret: ""
757767

758-
759768
# Vault server running in development mode --set development=true
760769
# IMPORTANT: This is not meant to run in production
761770

0 commit comments

Comments
 (0)