-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added (partial) support for Symbolicator deployment (#213)
- Add partial support for Symbolicator. This should work. But the cleanup cronjob of Symbolicator is not yet implemented. - The /data of Symbolicator is using emptyDir volume for now. (should we use PVC?) Notice the doc says the volume must be POSIX-compliant. - Increase the max size of Kafka events as minidump will exceed the default limit. I set it to the same value as [here](https://github.com/getsentry/onpremise/blob/e9cff2e28867eda078b3d3b103aae68252e19d91/docker-compose.yml#L94). Co-authored-by: Hans Hsieh <Hans_Hsieh@asus.com>
- Loading branch information
1 parent
3614762
commit 098fdef
Showing
7 changed files
with
220 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.symbolicator.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "sentry.fullname" . }}-symbolicator | ||
labels: | ||
app: sentry | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
data: | ||
config.yml: |- | ||
# See: https://getsentry.github.io/symbolicator/#configuration | ||
cache_dir: "/data" | ||
bind: "0.0.0.0:{{ template "symbolicator.port" }}" | ||
logging: | ||
level: "{{ .Values.symbolicator.api.logging.level }}" | ||
metrics: | ||
statsd: null | ||
sentry_dsn: null # TODO: Automatically fill this with the internal project DSN | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{{- if .Values.symbolicator.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "sentry.fullname" . }}-symbolicator-api | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ template "sentry.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
role: symbolicator-api | ||
{{- if not .Values.symbolicator.api.autoscaling.enabled }} | ||
replicas: {{ .Values.symbolicator.api.replicas }} | ||
{{- end }} | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-symbolicator.yaml") . | sha256sum }} | ||
{{- if .Values.symbolicator.api.annotations }} | ||
{{ toYaml .Values.symbolicator.api.annotations | indent 8 }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
role: symbolicator-api | ||
{{- if .Values.symbolicator.api.podLabels }} | ||
{{ toYaml .Values.symbolicator.api.podLabels | indent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.symbolicator.api.affinity }} | ||
affinity: | ||
{{ toYaml .Values.symbolicator.api.affinity | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.symbolicator.api.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.symbolicator.api.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.symbolicator.api.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.symbolicator.api.tolerations | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.images.symbolicator.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{ toYaml .Values.images.symbolicator.imagePullSecrets | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }}-symbolicator | ||
image: "{{ template "symbolicator.image" . }}" | ||
imagePullPolicy: {{ default "IfNotPresent" .Values.images.symbolicator.pullPolicy }} | ||
args: ["run", "-c", "/etc/symbolicator/config.yml"] | ||
ports: | ||
- containerPort: {{ template "symbolicator.port" }} | ||
env: | ||
{{ if eq .Values.filestore.backend "gcs" }} | ||
- name: GOOGLE_APPLICATION_CREDENTIALS | ||
value: /var/run/secrets/google/{{ .Values.filestore.gcs.credentialsFile }} | ||
{{ end }} | ||
{{- if .Values.symbolicator.api.env }} | ||
{{ toYaml .Values.symbolicator.api.env | indent 8 }} | ||
{{- end }} | ||
volumeMounts: | ||
- mountPath: /etc/symbolicator | ||
name: config | ||
readOnly: true | ||
- mountPath: /data | ||
name: symbolicator-data | ||
{{- if eq .Values.filestore.backend "gcs" }} | ||
- name: sentry-google-cloud-key | ||
mountPath: /var/run/secrets/google | ||
{{ end }} | ||
livenessProbe: | ||
failureThreshold: 5 | ||
httpGet: | ||
path: /healthcheck | ||
port: {{ template "symbolicator.port" }} | ||
scheme: HTTP | ||
initialDelaySeconds: {{ .Values.symbolicator.api.probeInitialDelaySeconds }} | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 2 | ||
readinessProbe: | ||
failureThreshold: 10 | ||
httpGet: | ||
path: /healthcheck | ||
port: {{ template "symbolicator.port" }} | ||
scheme: HTTP | ||
initialDelaySeconds: {{ .Values.symbolicator.api.probeInitialDelaySeconds }} | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 2 | ||
resources: | ||
{{ toYaml .Values.symbolicator.api.resources | indent 12 }} | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: {{ template "sentry.fullname" . }}-symbolicator | ||
- name: symbolicator-data | ||
emptyDir: {} | ||
{{- if eq .Values.filestore.backend "gcs" }} | ||
- name: sentry-google-cloud-key | ||
secret: | ||
secretName: {{ .Values.filestore.gcs.secretName }} | ||
{{ end }} | ||
{{- if .Values.symbolicator.api.priorityClassName }} | ||
priorityClassName: "{{ .Values.symbolicator.api.priorityClassName }}" | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{- if .Values.symbolicator.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "sentry.fullname" . }}-symbolicator | ||
annotations: | ||
{{- range $key, $value := .Values.service.annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
{{- if .Values.service.annotations }} | ||
annotations: | ||
{{ toYaml .Values.service.annotations | indent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ template "symbolicator.port" }} | ||
targetPort: {{ template "symbolicator.port" }} | ||
protocol: TCP | ||
name: {{ .Values.service.name }} | ||
{{- if and (.Values.service.nodePort) (eq .Values.service.type "NodePort") }} | ||
nodePort: {{ .Values.service.nodePort }} | ||
{{- end }} | ||
{{- if .Values.service.externalIPs }} | ||
externalIPs: | ||
{{ toYaml .Values.service.externalIPs | indent 4 }} | ||
{{- end }} | ||
selector: | ||
app: {{ template "sentry.fullname" . }} | ||
role: symbolicator-api | ||
{{- with .Values.service.loadBalancerSourceRanges }} | ||
loadBalancerSourceRanges: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters