-
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
1 parent
d8be166
commit b58f8a3
Showing
10 changed files
with
754 additions
and
1 deletion.
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
141 changes: 141 additions & 0 deletions
141
sentry/templates/deployment-sentry-ingest-profiles.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,141 @@ | ||
{{- if .Values.sentry.features.enableProfiling }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "sentry.fullname" . }}-ingest-profiles | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
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: {{ template "sentry.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
role: ingest-profiles | ||
{{- if not .Values.sentry.ingestProfiles.autoscaling.enabled }} | ||
replicas: {{ .Values.sentry.ingestProfiles.replicas }} | ||
{{- end }} | ||
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.ingestProfiles.annotations }} | ||
{{ toYaml .Values.sentry.ingestProfiles.annotations | indent 8 }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
role: ingest-profiles | ||
{{- if .Values.sentry.ingestProfiles.podLabels }} | ||
{{ toYaml .Values.sentry.ingestProfiles.podLabels | indent 8 }} | ||
{{- end }} | ||
spec: | ||
affinity: | ||
{{- if .Values.sentry.ingestProfiles.affinity }} | ||
{{ toYaml .Values.sentry.ingestProfiles.affinity | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.ingestProfiles.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.sentry.ingestProfiles.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.ingestProfiles.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.sentry.ingestProfiles.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.ingestProfiles.securityContext }} | ||
securityContext: | ||
{{ toYaml .Values.sentry.ingestProfiles.securityContext | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }}-ingest-profiles | ||
image: "{{ template "sentry.image" . }}" | ||
imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} | ||
command: ["sentry"] | ||
args: | ||
- "run" | ||
- "ingest-profiles" | ||
env: | ||
- name: C_FORCE_ROOT | ||
value: "true" | ||
{{ include "sentry.env" . | indent 8 }} | ||
{{- if .Values.sentry.ingestProfiles.env }} | ||
{{ toYaml .Values.sentry.ingestProfiles.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 }} | ||
{{- if .Values.sentry.ingestProfiles.volumeMounts }} | ||
{{ toYaml .Values.sentry.ingestProfiles.volumeMounts | indent 8 }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.sentry.ingestProfiles.resources | indent 12 }} | ||
{{- if .Values.sentry.ingestProfiles.containerSecurityContext }} | ||
securityContext: | ||
{{ toYaml .Values.sentry.ingestProfiles.containerSecurityContext | indent 12 }} | ||
{{- end }} | ||
{{- if .Values.sentry.ingestProfiles.sidecars }} | ||
{{ toYaml .Values.sentry.ingestProfiles.sidecars | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.serviceAccount.enabled }} | ||
serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-replay-recordings | ||
{{- 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.ingestProfiles.volumes }} | ||
{{ toYaml .Values.sentry.ingestProfiles.volumes | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.sentry.ingestProfiles.priorityClassName }} | ||
priorityClassName: "{{ .Values.sentry.ingestProfiles.priorityClassName }}" | ||
{{- end }} | ||
{{- end }} |
150 changes: 150 additions & 0 deletions
150
sentry/templates/deployment-snuba-profiling-functions-consumer.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,150 @@ | ||
{{- if .Values.sentry.features.enableProfiling }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "sentry.fullname" . }}-snuba-profiling-functions-consumer | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
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": "12" | ||
{{- end }} | ||
spec: | ||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} | ||
selector: | ||
matchLabels: | ||
app: {{ template "sentry.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
role: snuba-profiling-functions-consumer | ||
replicas: {{ .Values.snuba.profilingFunctionsConsumer.replicas }} | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} | ||
checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.annotations }} | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.annotations | indent 8 }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
role: snuba-profiling-functions-consumer | ||
{{- if .Values.snuba.profilingFunctionsConsumer.podLabels }} | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.podLabels | indent 8 }} | ||
{{- end }} | ||
spec: | ||
affinity: | ||
{{- if .Values.snuba.profilingFunctionsConsumer.affinity }} | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.affinity | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.tolerations | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.images.snuba.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{ toYaml .Values.images.snuba.imagePullSecrets | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.dnsPolicy }} | ||
dnsPolicy: {{ .Values.dnsPolicy | quote }} | ||
{{- end }} | ||
{{- if .Values.dnsConfig }} | ||
dnsConfig: | ||
{{ toYaml .Values.dnsConfig | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.securityContext }} | ||
securityContext: | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.securityContext | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }}-snuba | ||
image: "{{ template "snuba.image" . }}" | ||
imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} | ||
command: | ||
- "snuba" | ||
- "consumer" | ||
- "--storage" | ||
- "functions_raw" | ||
- "--consumer-group" | ||
- "functions_raw_group" | ||
- "--auto-offset-reset" | ||
- "{{ .Values.snuba.profilingFunctionsConsumer.autoOffsetReset }}" | ||
- "--max-batch-time-ms" | ||
- "750" | ||
{{- if .Values.snuba.profilingFunctionsConsumer.maxBatchSize }} | ||
- "--max-batch-size" | ||
- "{{ .Values.snuba.profilingFunctionsConsumer.maxBatchSize }}" | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.processes }} | ||
- "--processes" | ||
- "{{ .Values.snuba.profilingFunctionsConsumer.processes }}" | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.inputBlockSize }} | ||
- "--input-block-size" | ||
- "{{ .Values.snuba.profilingFunctionsConsumer.inputBlockSize }}" | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.outputBlockSize }} | ||
- "--output-block-size" | ||
- "{{ .Values.snuba.profilingFunctionsConsumer.outputBlockSize }}" | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.maxBatchTimeMs }} | ||
- "--max-batch-time-ms" | ||
- "{{ .Values.snuba.profilingFunctionsConsumer.maxBatchTimeMs }}" | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.queuedMaxMessagesKbytes }} | ||
- "--queued-max-messages-kbytes" | ||
- "{{ .Values.snuba.profilingFunctionsConsumer.queuedMaxMessagesKbytes }}" | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.queuedMinMessages }} | ||
- "--queued-min-messages" | ||
- "{{ .Values.snuba.profilingFunctionsConsumer.queuedMinMessages }}" | ||
{{- end }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.noStrictOffsetReset }} | ||
- "--no-strict-offset-reset" | ||
{{- end }} | ||
ports: | ||
- containerPort: {{ template "snuba.port" }} | ||
env: | ||
{{ include "sentry.snuba.env" . | indent 8 }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.env }} | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.env | indent 8 }} | ||
{{- end }} | ||
envFrom: | ||
- secretRef: | ||
name: {{ template "sentry.fullname" . }}-snuba-env | ||
volumeMounts: | ||
- mountPath: /etc/snuba | ||
name: config | ||
readOnly: true | ||
{{- if .Values.snuba.profilingFunctionsConsumer.volumeMounts }} | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.volumeMounts | indent 8 }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.resources | indent 12 }} | ||
{{- if .Values.snuba.profilingFunctionsConsumer.containerSecurityContext }} | ||
securityContext: | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.containerSecurityContext | indent 12 }} | ||
{{- end }} | ||
{{- if .Values.serviceAccount.enabled }} | ||
serviceAccountName: {{ .Values.serviceAccount.name }}-snuba | ||
{{- end }} | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: {{ template "sentry.fullname" . }}-snuba | ||
{{- if .Values.snuba.profilingFunctionsConsumer.volumes }} | ||
{{ toYaml .Values.snuba.profilingFunctionsConsumer.volumes | indent 8 }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.