-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
229 additions
and
31 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
169 changes: 169 additions & 0 deletions
169
sentry/templates/deployment-sentry-post-process-forwarder-transactions.yaml
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,169 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "sentry.fullname" . }}-post-process-forward-transactions | ||
labels: | ||
app: sentry | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
app.kubernetes.io/managed-by: "Helm" | ||
{{- if .Values.asHook }} | ||
{{- /* Add the Helm annotations so that deployment after asHook from true to false works */}} | ||
annotations: | ||
meta.helm.sh/release-name: "{{ .Release.Name }}" | ||
meta.helm.sh/release-namespace: "{{ .Release.Namespace }}" | ||
"helm.sh/hook": "post-install,post-upgrade" | ||
"helm.sh/hook-weight": "10" | ||
{{- end }} | ||
spec: | ||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} | ||
selector: | ||
matchLabels: | ||
app: sentry | ||
release: "{{ .Release.Name }}" | ||
role: sentry-post-process-forward-transactions | ||
replicas: {{ .Values.sentry.postProcessForwardTransactions.replicas }} | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/configYml: {{ .Values.config.configYml | toYaml | toString | sha256sum }} | ||
checksum/sentryConfPy: {{ .Values.config.sentryConfPy | sha256sum }} | ||
checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-sentry.yaml") . | sha256sum }} | ||
{{- if .Values.sentry.postProcessForwardTransactions.annotations }} | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.annotations | indent 8 }} | ||
{{- end }} | ||
labels: | ||
app: sentry | ||
release: "{{ .Release.Name }}" | ||
role: sentry-post-process-forward-transactions | ||
{{- if .Values.sentry.postProcessForwardTransactions.podLabels }} | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.podLabels | indent 8 }} | ||
{{- end }} | ||
spec: | ||
affinity: | ||
{{- if .Values.sentry.postProcessForwardTransactions.affinity }} | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.affinity | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.postProcessForwardTransactions.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.postProcessForwardTransactions.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.tolerations | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.images.sentry.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{ toYaml .Values.images.sentry.imagePullSecrets | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.dnsPolicy }} | ||
dnsPolicy: {{ .Values.dnsPolicy | quote }} | ||
{{- end }} | ||
{{- if .Values.dnsConfig }} | ||
dnsConfig: | ||
{{ toYaml .Values.dnsConfig | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.postProcessForwardTransactions.securityContext }} | ||
securityContext: | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.securityContext | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }}-post-process-forward-transactions | ||
image: "{{ template "sentry.image" . }}" | ||
imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} | ||
command: ["sentry"] | ||
args: | ||
- "run" | ||
- "post-process-forwarder" | ||
- "--commit-batch-size" | ||
- "{{ default "1" .Values.sentry.postProcessForwardTransactions.commitBatchSize }}" | ||
- "--entity" | ||
- "transactions" | ||
- "--commit-log-topic=snuba-transactions-commit-log" | ||
- "--synchronize-commit-group" | ||
- "transactions_group" | ||
env: | ||
- name: SNUBA | ||
value: http://{{ template "sentry.fullname" . }}-snuba:{{ template "snuba.port" }} | ||
{{- if .Values.sentry.existingSecret }} | ||
- name: SENTRY_SECRET_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.sentry.existingSecret }} | ||
key: {{ default "key" .Values.sentry.existingSecretKey }} | ||
{{- else }} | ||
- name: SENTRY_SECRET_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ template "sentry.fullname" . }}-sentry-secret | ||
key: "key" | ||
{{- end }} | ||
{{- if .Values.postgresql.enabled }} | ||
- name: POSTGRES_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ default (include "sentry.postgresql.fullname" .) .Values.postgresql.existingSecret }} | ||
key: {{ default "postgresql-password" .Values.postgresql.existingSecretKey }} | ||
{{- else if .Values.externalPostgresql.password }} | ||
- name: POSTGRES_PASSWORD | ||
value: {{ .Values.externalPostgresql.password | quote }} | ||
{{- else if .Values.externalPostgresql.existingSecret }} | ||
- name: POSTGRES_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.externalPostgresql.existingSecret }} | ||
key: {{ default "postgresql-password" .Values.externalPostgresql.existingSecretKey }} | ||
{{- end }} | ||
{{ if and (eq .Values.filestore.backend "gcs") .Values.filestore.gcs.secretName }} | ||
- name: GOOGLE_APPLICATION_CREDENTIALS | ||
value: /var/run/secrets/google/{{ .Values.filestore.gcs.credentialsFile }} | ||
{{ end }} | ||
{{- if .Values.sentry.postProcessForwardTransactions.env }} | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.env | indent 8 }} | ||
{{- end }} | ||
volumeMounts: | ||
- mountPath: /etc/sentry | ||
name: config | ||
readOnly: true | ||
- mountPath: {{ .Values.filestore.filesystem.path }} | ||
name: sentry-data | ||
{{- if and (eq .Values.filestore.backend "gcs") .Values.filestore.gcs.secretName }} | ||
- name: sentry-google-cloud-key | ||
mountPath: /var/run/secrets/google | ||
{{ end }} | ||
resources: | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.resources | indent 12 }} | ||
{{- if .Values.sentry.postProcessForwardTransactions.sidecars }} | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.sidecars | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.serviceAccount.enabled }} | ||
serviceAccountName: {{ .Values.serviceAccount.name }}-post-process-forwarder-transactions | ||
{{- end }} | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: {{ template "sentry.fullname" . }}-sentry | ||
- name: sentry-data | ||
{{- if and (eq .Values.filestore.backend "filesystem") .Values.filestore.filesystem.persistence.enabled (.Values.filestore.filesystem.persistence.persistentWorkers) }} | ||
{{- if .Values.filestore.filesystem.persistence.existingClaim }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.filestore.filesystem.persistence.existingClaim }} | ||
{{- else }} | ||
persistentVolumeClaim: | ||
claimName: {{ template "sentry.fullname" . }}-data | ||
{{- end }} | ||
{{- else }} | ||
emptyDir: {} | ||
{{ end }} | ||
{{- if and (eq .Values.filestore.backend "gcs") .Values.filestore.gcs.secretName }} | ||
- name: sentry-google-cloud-key | ||
secret: | ||
secretName: {{ .Values.filestore.gcs.secretName }} | ||
{{ end }} | ||
{{- if .Values.sentry.postProcessForwardTransactions.volumes }} | ||
{{ toYaml .Values.sentry.postProcessForwardTransactions.volumes | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.sentry.postProcessForwardTransactions.priorityClassName }} | ||
priorityClassName: "{{ .Values.sentry.postProcessForwardTransactions.priorityClassName }}" | ||
{{- 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
10 changes: 10 additions & 0 deletions
10
sentry/templates/serviceaccount-sentry-post-process-forwarder-transactions.yaml
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,10 @@ | ||
{{- if .Values.serviceAccount.enabled }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.serviceAccount.name }}-post-process-forwarder-transactions | ||
{{- if .Values.serviceAccount.annotations }} | ||
annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} | ||
{{- end }} | ||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} | ||
{{- 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