diff --git a/charts/sentry/Chart.yaml b/charts/sentry/Chart.yaml index 0b292eb..2ab57e1 100644 --- a/charts/sentry/Chart.yaml +++ b/charts/sentry/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 21.5.1 +appVersion: 24.2.0 dependencies: - condition: redis.enabled name: redis @@ -29,4 +29,4 @@ dependencies: description: A Helm chart for Kubernetes name: sentry type: application -version: 11.3.3 +version: 11.3.4 diff --git a/charts/sentry/templates/configmap-sentry.yaml b/charts/sentry/templates/configmap-sentry.yaml index 90f1736..5bc5633 100644 --- a/charts/sentry/templates/configmap-sentry.yaml +++ b/charts/sentry/templates/configmap-sentry.yaml @@ -322,6 +322,7 @@ data: "organizations:discover", "organizations:discover-basic", "organizations:discover-query", + "organizations:discover-frontend-use-events-endpoint", "organizations:enterprise-perf", "organizations:event-attachments", "organizations:events", @@ -349,6 +350,7 @@ data: "organizations:onboarding", "organizations:org-saved-searches", "organizations:performance-view", + "organizations:performance-frontend-use-events-endpoint", "organizations:project-detail", "organizations:relay", "organizations:release-performance-views", @@ -368,6 +370,57 @@ data: "organizations:unhandled-issue-flag", "organizations:invite-members-rate-limits", "organizations:dashboards-v2", + "organizations:reprocessing-v2", + "organizations:metrics", + "organizations:metrics-extraction", + "organizations:transaction-metrics-extraction", + + {{- if .Values.sentry.features.enableSessionReplay}} + "organizations:session-replay", + "organizations:session-replay-ui", + "organizations:session-replay-sdk", + "organizations:session-replay-count-query-optimize", + "organizations:session-replay-sdk-errors-only", + "organizations:session-replay-recording-scrubbing", + "organizations:session-replay-a11y-tab", + "organizations:session-replay-slack-new-issue", + "organizations:session-replay-issue-emails", + "organizations:session-replay-event-linking", + "organizations:session-replay-weekly-email", + "organizations:session-replay-trace-table", + "organizations:session-replay-rage-dead-selectors", + "organizations:session-replay-new-event-counts", + "organizations:session-replay-new-timeline", + "organizations:issue-details-replay-event", + {{ end -}} + + "organizations:issue-platform", + + {{- if .Values.sentry.features.enableProfiling }} + "organizations:profiling", + "organizations:profiling-ui-frames", + "organizations:profiling-using-transactions", + "organizations:profiling-beta", + "organizations:profiling-stacktrace-links", + "organizations:profiling-global-suspect-functions", + "organizations:profiling-cpu-chart", + "organizations:profiling-memory-chart", + "organizations:profiling-view", + {{ end -}} + + {{- if .Values.sentry.features.enableFeedback }} + "organizations:user-feedback-ui", + "organizations:user-feedback-ingest", + "organizations:feedback-ingest", + "organizations:feedback-post-process-group", + "organizations:feedback-visible", + {{ end -}} + + "organizations:dashboards-mep", + "organizations:mep-rollout-flag", + "organizations:dashboards-rh-widget", + "organizations:metrics-extraction", + "organizations:transaction-metrics-extraction", "projects:alert-filters", "projects:custom-inbound-filters", diff --git a/charts/sentry/templates/configmap-snuba.yaml b/charts/sentry/templates/configmap-snuba.yaml index deec4b4..7ae738e 100644 --- a/charts/sentry/templates/configmap-snuba.yaml +++ b/charts/sentry/templates/configmap-snuba.yaml @@ -18,15 +18,52 @@ data: DEBUG = env("DEBUG", "0").lower() in ("1", "true") - # Clickhouse Options - CLUSTERS[0]["host"] = env("CLICKHOUSE_HOST", {{ include "sentry.clickhouse.host" . | quote }}) - CLUSTERS[0]["port"] = int({{ include "sentry.clickhouse.port" . }}) - CLUSTERS[0]["http_port"] = int({{ include "sentry.clickhouse.http_port" . }}) - CLUSTERS[0]["database"] = env("CLICKHOUSE_DATABASE", "default") - CLUSTERS[0]["user"] = env("CLICKHOUSE_USER", "default") - CLUSTERS[0]["password"] = env("CLICKHOUSE_PASSWORD", "") - # FIXME: Snuba will be able to migrate multi node clusters in the future - CLUSTERS[0]["single_node"] = env("CLICKHOUSE_SINGLE_NODE", "false").lower() == "true" + CLUSTERS = [ + { + "host": env("CLICKHOUSE_HOST", {{ include "sentry.clickhouse.host" . | quote }}), + "port": int({{ include "sentry.clickhouse.port" . }}), + "user": env("CLICKHOUSE_USER", "default"), + "password": env("CLICKHOUSE_PASSWORD", ""), + "database": env("CLICKHOUSE_DATABASE", "default"), + "http_port": {{ include "sentry.clickhouse.http_port" . }}, + "storage_sets": { + "cdc", + "discover", + "events", + "events_ro", + "metrics", + "metrics_summaries", + "migrations", + "outcomes", + "querylog", + "sessions", + "transactions", + "profiles", + "functions", + "replays", + "generic_metrics_sets", + "generic_metrics_distributions", + "search_issues", + "generic_metrics_counters", + "spans", + "group_attributes", + "generic_metrics_gauges", + }, + {{- /* + The default clickhouse installation runs in distributed mode, while the external + clickhouse configured can be configured any way you choose + */}} + {{- if and .Values.externalClickhouse.singleNode (not .Values.clickhouse.enabled) }} + "single_node": True, + {{- else }} + "single_node": False, + {{- end }} + {{- if or .Values.clickhouse.enabled (not .Values.externalClickhouse.singleNode) }} + "cluster_name": {{ include "sentry.clickhouse.cluster.name" . | quote }}, + "distributed_cluster_name": {{ include "sentry.clickhouse.cluster.name" . | quote }}, + {{- end }} + }, + ] # Redis Options REDIS_HOST = {{ include "sentry.redis.host" . | quote }} diff --git a/charts/sentry/templates/deployment-sentry-generic-metrics-consumer.yaml b/charts/sentry/templates/deployment-sentry-generic-metrics-consumer.yaml new file mode 100644 index 0000000..4b7fb36 --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-generic-metrics-consumer.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-generic-metrics-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": "10" + {{- end }} +spec: + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + selector: + matchLabels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: generic-metrics-consumer + replicas: {{ .Values.sentry.genericMetricsConsumer.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.genericMetricsConsumer.annotations }} +{{ toYaml .Values.sentry.genericMetricsConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: generic-metrics-consumer + {{- if .Values.sentry.genericMetricsConsumer.podLabels }} +{{ toYaml .Values.sentry.genericMetricsConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.genericMetricsConsumer.affinity }} +{{ toYaml .Values.sentry.genericMetricsConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.genericMetricsConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.genericMetricsConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.genericMetricsConsumer.tolerations }} + tolerations: +{{ toYaml .Values.sentry.genericMetricsConsumer.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.genericMetricsConsumer.securityContext }} + securityContext: +{{ toYaml .Values.sentry.genericMetricsConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-generic-metrics-consumer + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "ingest-generic-metrics" + - "--consumer-group" + - "generic-metrics-consumer" + {{- if .Values.sentry.genericMetricsConsumer.concurrency }} + - "--concurrency" + - "{{ .Values.sentry.genericMetricsConsumer.concurrency }}" + {{- end }} + {{- if .Values.sentry.genericMetricsConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.sentry.genericMetricsConsumer.maxBatchSize }}" + {{- end }} + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.genericMetricsConsumer.env }} +{{ toYaml .Values.sentry.genericMetricsConsumer.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.genericMetricsConsumer.volumeMounts }} +{{ toYaml .Values.sentry.genericMetricsConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.genericMetricsConsumer.resources | indent 12 }} +{{- if .Values.sentry.genericMetricsConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.genericMetricsConsumer.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.genericMetricsConsumer.sidecars }} +{{ toYaml .Values.sentry.genericMetricsConsumer.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-generic-metrics-consumer + {{- 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.genericMetricsConsumer.volumes }} +{{ toYaml .Values.sentry.genericMetricsConsumer.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.genericMetricsConsumer.priorityClassName }} + priorityClassName: "{{ .Values.sentry.genericMetricsConsumer.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-ingest-consumer-attachments.yaml b/charts/sentry/templates/deployment-sentry-ingest-consumer-attachments.yaml new file mode 100644 index 0000000..6526883 --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-ingest-consumer-attachments.yaml @@ -0,0 +1,150 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-ingest-consumer-attachments + 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-consumer +{{- if not .Values.sentry.ingestConsumer.autoscaling.enabled }} + replicas: {{ .Values.sentry.ingestConsumer.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.ingestConsumer.annotations }} +{{ toYaml .Values.sentry.ingestConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: ingest-consumer + {{- if .Values.sentry.ingestConsumer.podLabels }} +{{ toYaml .Values.sentry.ingestConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.ingestConsumer.affinity }} +{{ toYaml .Values.sentry.ingestConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.ingestConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestConsumer.tolerations }} + tolerations: +{{ toYaml .Values.sentry.ingestConsumer.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.ingestConsumer.securityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-ingest-consumer-attachments + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "ingest-attachments" + - "--consumer-group" + - "ingest-consumer" + {{- if .Values.sentry.ingestConsumer.concurrency }} + - "--concurrency" + - "{{ .Values.sentry.ingestConsumer.concurrency }}" + {{- end }} + {{- if .Values.sentry.ingestConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.sentry.ingestConsumer.maxBatchSize }}" + {{- end }} + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.ingestConsumer.env }} +{{ toYaml .Values.sentry.ingestConsumer.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.ingestConsumer.volumeMounts }} +{{ toYaml .Values.sentry.ingestConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.ingestConsumer.resources | indent 12 }} +{{- if .Values.sentry.ingestConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestConsumer.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.ingestConsumer.sidecars }} +{{ toYaml .Values.sentry.ingestConsumer.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-consumer-attachments + {{- 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.ingestConsumer.volumes }} +{{ toYaml .Values.sentry.ingestConsumer.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.ingestConsumer.priorityClassName }} + priorityClassName: "{{ .Values.sentry.ingestConsumer.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-ingest-consumer.yaml b/charts/sentry/templates/deployment-sentry-ingest-consumer-events.yaml similarity index 77% rename from charts/sentry/templates/deployment-sentry-ingest-consumer.yaml rename to charts/sentry/templates/deployment-sentry-ingest-consumer-events.yaml index 6c442b0..92edc53 100644 --- a/charts/sentry/templates/deployment-sentry-ingest-consumer.yaml +++ b/charts/sentry/templates/deployment-sentry-ingest-consumer-events.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ template "sentry.fullname" . }}-ingest-consumer + name: {{ template "sentry.fullname" . }}-ingest-consumer-events labels: app: {{ template "sentry.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" @@ -43,7 +43,6 @@ spec: {{ toYaml .Values.sentry.ingestConsumer.podLabels | indent 8 }} {{- end }} spec: - serviceAccountName: {{ template "sentry.serviceAccountName" . }} affinity: {{- if .Values.sentry.ingestConsumer.affinity }} {{ toYaml .Values.sentry.ingestConsumer.affinity | indent 8 }} @@ -59,38 +58,41 @@ spec: {{- 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.ingestConsumer.securityContext }} securityContext: {{ toYaml .Values.sentry.ingestConsumer.securityContext | indent 8 }} {{- end }} containers: - - name: {{ .Chart.Name }}-ingest-consumer + - name: {{ .Chart.Name }}-ingest-consumer-events image: "{{ template "sentry.image" . }}" imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} command: ["sentry"] args: - "run" + - "consumer" + - "ingest-events" + - "--consumer-group" - "ingest-consumer" - - "--all-consumer-types" {{- if .Values.sentry.ingestConsumer.concurrency }} - - "-c" + - "--concurrency" - "{{ .Values.sentry.ingestConsumer.concurrency }}" {{- end }} + {{- if .Values.sentry.ingestConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.sentry.ingestConsumer.maxBatchSize }}" + {{- end }} env: - - name: SNUBA - value: http://{{ template "sentry.fullname" . }}-snuba:{{ template "snuba.port" }} - name: C_FORCE_ROOT value: "true" - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ default (include "sentry.postgresql.fullname" .) .Values.postgresql.existingSecret }} - key: {{ default "postgresql-password" .Values.postgresql.existingSecretKey }} - {{ 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 }} +{{ include "sentry.env" . | indent 8 }} {{- if .Values.sentry.ingestConsumer.env }} {{ toYaml .Values.sentry.ingestConsumer.env | indent 8 }} {{- end }} @@ -104,19 +106,34 @@ spec: - name: sentry-google-cloud-key mountPath: /var/run/secrets/google {{ end }} +{{- if .Values.sentry.ingestConsumer.volumeMounts }} +{{ toYaml .Values.sentry.ingestConsumer.volumeMounts | indent 8 }} +{{- end }} resources: {{ toYaml .Values.sentry.ingestConsumer.resources | indent 12 }} +{{- if .Values.sentry.ingestConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestConsumer.containerSecurityContext | indent 12 }} +{{- end }} {{- if .Values.sentry.ingestConsumer.sidecars }} {{ toYaml .Values.sentry.ingestConsumer.sidecars | indent 6 }} {{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-consumer-events + {{- 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 }} diff --git a/charts/sentry/templates/deployment-sentry-ingest-consumer-transactions.yaml b/charts/sentry/templates/deployment-sentry-ingest-consumer-transactions.yaml new file mode 100644 index 0000000..4e9f9ed --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-ingest-consumer-transactions.yaml @@ -0,0 +1,150 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-ingest-consumer-transactions + 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-consumer +{{- if not .Values.sentry.ingestConsumer.autoscaling.enabled }} + replicas: {{ .Values.sentry.ingestConsumer.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.ingestConsumer.annotations }} +{{ toYaml .Values.sentry.ingestConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: ingest-consumer + {{- if .Values.sentry.ingestConsumer.podLabels }} +{{ toYaml .Values.sentry.ingestConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.ingestConsumer.affinity }} +{{ toYaml .Values.sentry.ingestConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.ingestConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestConsumer.tolerations }} + tolerations: +{{ toYaml .Values.sentry.ingestConsumer.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.ingestConsumer.securityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-ingest-consumer-transactions + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "ingest-transactions" + - "--consumer-group" + - "ingest-consumer" + {{- if .Values.sentry.ingestConsumer.concurrency }} + - "--concurrency" + - "{{ .Values.sentry.ingestConsumer.concurrency }}" + {{- end }} + {{- if .Values.sentry.ingestConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.sentry.ingestConsumer.maxBatchSize }}" + {{- end }} + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.ingestConsumer.env }} +{{ toYaml .Values.sentry.ingestConsumer.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.ingestConsumer.volumeMounts }} +{{ toYaml .Values.sentry.ingestConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.ingestConsumer.resources | indent 12 }} +{{- if .Values.sentry.ingestConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestConsumer.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.ingestConsumer.sidecars }} +{{ toYaml .Values.sentry.ingestConsumer.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-consumer-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.ingestConsumer.volumes }} +{{ toYaml .Values.sentry.ingestConsumer.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.ingestConsumer.priorityClassName }} + priorityClassName: "{{ .Values.sentry.ingestConsumer.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-ingest-monitors.yaml b/charts/sentry/templates/deployment-sentry-ingest-monitors.yaml new file mode 100644 index 0000000..b222e1b --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-ingest-monitors.yaml @@ -0,0 +1,142 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-ingest-monitors + 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-monitors +{{- if not .Values.sentry.ingestMonitors.autoscaling.enabled }} + replicas: {{ .Values.sentry.ingestMonitors.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.ingestMonitors.annotations }} +{{ toYaml .Values.sentry.ingestMonitors.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: ingest-monitors + {{- if .Values.sentry.ingestMonitors.podLabels }} +{{ toYaml .Values.sentry.ingestMonitors.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.ingestMonitors.affinity }} +{{ toYaml .Values.sentry.ingestMonitors.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestMonitors.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.ingestMonitors.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestMonitors.tolerations }} + tolerations: +{{ toYaml .Values.sentry.ingestMonitors.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.ingestMonitors.securityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestMonitors.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-ingest-monitors + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "ingest-monitors" + - "--consumer-group" + - "ingest-monitors" + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.ingestMonitors.env }} +{{ toYaml .Values.sentry.ingestMonitors.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.ingestMonitors.volumeMounts }} +{{ toYaml .Values.sentry.ingestMonitors.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.ingestMonitors.resources | indent 12 }} +{{- if .Values.sentry.ingestMonitors.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestMonitors.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.ingestMonitors.sidecars }} +{{ toYaml .Values.sentry.ingestMonitors.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-monitors + {{- 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.ingestMonitors.volumes }} +{{ toYaml .Values.sentry.ingestMonitors.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.ingestMonitors.priorityClassName }} + priorityClassName: "{{ .Values.sentry.ingestMonitors.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-ingest-occurrences.yaml b/charts/sentry/templates/deployment-sentry-ingest-occurrences.yaml new file mode 100644 index 0000000..c2d3d12 --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-ingest-occurrences.yaml @@ -0,0 +1,142 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-ingest-occurrences + 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-occurrences +{{- if not .Values.sentry.ingestOccurrences.autoscaling.enabled }} + replicas: {{ .Values.sentry.ingestOccurrences.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.ingestOccurrences.annotations }} +{{ toYaml .Values.sentry.ingestOccurrences.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: ingest-occurrences + {{- if .Values.sentry.ingestOccurrences.podLabels }} +{{ toYaml .Values.sentry.ingestOccurrences.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.ingestOccurrences.affinity }} +{{ toYaml .Values.sentry.ingestOccurrences.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestOccurrences.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.ingestOccurrences.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestOccurrences.tolerations }} + tolerations: +{{ toYaml .Values.sentry.ingestOccurrences.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.ingestOccurrences.securityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestOccurrences.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-ingest-occurrences + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "ingest-occurrences" + - "--consumer-group" + - "ingest-occurrences" + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.ingestOccurrences.env }} +{{ toYaml .Values.sentry.ingestOccurrences.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.ingestOccurrences.volumeMounts }} +{{ toYaml .Values.sentry.ingestOccurrences.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.ingestOccurrences.resources | indent 12 }} +{{- if .Values.sentry.ingestOccurrences.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestOccurrences.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.ingestOccurrences.sidecars }} +{{ toYaml .Values.sentry.ingestOccurrences.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-occurrences + {{- 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.ingestOccurrences.volumes }} +{{ toYaml .Values.sentry.ingestOccurrences.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.ingestOccurrences.priorityClassName }} + priorityClassName: "{{ .Values.sentry.ingestOccurrences.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-ingest-profiles.yaml b/charts/sentry/templates/deployment-sentry-ingest-profiles.yaml new file mode 100644 index 0000000..7a2af54 --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-ingest-profiles.yaml @@ -0,0 +1,144 @@ +{{- 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" + - "consumer" + - "ingest-profiles" + - "--consumer-group" + - "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-profiles + {{- 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 }} diff --git a/charts/sentry/templates/deployment-sentry-ingest-replay-recordings.yaml b/charts/sentry/templates/deployment-sentry-ingest-replay-recordings.yaml new file mode 100644 index 0000000..8f2caed --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-ingest-replay-recordings.yaml @@ -0,0 +1,142 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-ingest-replay-recordings + 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-replay-recordings +{{- if not .Values.sentry.ingestReplayRecordings.autoscaling.enabled }} + replicas: {{ .Values.sentry.ingestReplayRecordings.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.ingestReplayRecordings.annotations }} +{{ toYaml .Values.sentry.ingestReplayRecordings.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: ingest-replay-recordings + {{- if .Values.sentry.ingestReplayRecordings.podLabels }} +{{ toYaml .Values.sentry.ingestReplayRecordings.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.ingestReplayRecordings.affinity }} +{{ toYaml .Values.sentry.ingestReplayRecordings.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestReplayRecordings.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.ingestReplayRecordings.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.ingestReplayRecordings.tolerations }} + tolerations: +{{ toYaml .Values.sentry.ingestReplayRecordings.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.ingestReplayRecordings.securityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestReplayRecordings.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-ingest-replay-recordings + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "ingest-replay-recordings" + - "--consumer-group" + - "ingest-replay-recordings" + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.ingestReplayRecordings.env }} +{{ toYaml .Values.sentry.ingestReplayRecordings.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.ingestReplayRecordings.volumeMounts }} +{{ toYaml .Values.sentry.ingestReplayRecordings.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.ingestReplayRecordings.resources | indent 12 }} +{{- if .Values.sentry.ingestReplayRecordings.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.ingestReplayRecordings.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.ingestReplayRecordings.sidecars }} +{{ toYaml .Values.sentry.ingestReplayRecordings.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.ingestReplayRecordings.volumes }} +{{ toYaml .Values.sentry.ingestReplayRecordings.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.ingestReplayRecordings.priorityClassName }} + priorityClassName: "{{ .Values.sentry.ingestReplayRecordings.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-metrics-consumer.yaml b/charts/sentry/templates/deployment-sentry-metrics-consumer.yaml new file mode 100644 index 0000000..069aca0 --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-metrics-consumer.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-metrics-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": "10" + {{- end }} +spec: + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + selector: + matchLabels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: metrics-consumer + replicas: {{ .Values.sentry.metricsConsumer.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.metricsConsumer.annotations }} +{{ toYaml .Values.sentry.metricsConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: metrics-consumer + {{- if .Values.sentry.metricsConsumer.podLabels }} +{{ toYaml .Values.sentry.metricsConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.metricsConsumer.affinity }} +{{ toYaml .Values.sentry.metricsConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.metricsConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.metricsConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.metricsConsumer.tolerations }} + tolerations: +{{ toYaml .Values.sentry.metricsConsumer.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.metricsConsumer.securityContext }} + securityContext: +{{ toYaml .Values.sentry.metricsConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-metrics-consumer + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "ingest-metrics" + - "--consumer-group" + - "metrics-consumer" + {{- if .Values.sentry.metricsConsumer.concurrency }} + - "--concurrency" + - "{{ .Values.sentry.metricsConsumer.concurrency }}" + {{- end }} + {{- if .Values.sentry.metricsConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.sentry.metricsConsumer.maxBatchSize }}" + {{- end }} + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.metricsConsumer.env }} +{{ toYaml .Values.sentry.metricsConsumer.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.metricsConsumer.volumeMounts }} +{{ toYaml .Values.sentry.metricsConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.metricsConsumer.resources | indent 12 }} +{{- if .Values.sentry.metricsConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.metricsConsumer.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.metricsConsumer.sidecars }} +{{ toYaml .Values.sentry.metricsConsumer.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-metrics-consumer + {{- 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.metricsConsumer.volumes }} +{{ toYaml .Values.sentry.metricsConsumer.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.metricsConsumer.priorityClassName }} + priorityClassName: "{{ .Values.sentry.metricsConsumer.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-post-process-forwarder-errors.yaml b/charts/sentry/templates/deployment-sentry-post-process-forwarder-errors.yaml new file mode 100644 index 0000000..05dda19 --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-post-process-forwarder-errors.yaml @@ -0,0 +1,140 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-post-process-forward-errors + 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-errors + replicas: {{ .Values.sentry.postProcessForwardErrors.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.postProcessForwardErrors.annotations }} +{{ toYaml .Values.sentry.postProcessForwardErrors.annotations | indent 8 }} + {{- end }} + labels: + app: sentry + release: "{{ .Release.Name }}" + role: sentry-post-process-forward-errors + {{- if .Values.sentry.postProcessForwardErrors.podLabels }} +{{ toYaml .Values.sentry.postProcessForwardErrors.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.postProcessForwardErrors.affinity }} +{{ toYaml .Values.sentry.postProcessForwardErrors.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.postProcessForwardErrors.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.postProcessForwardErrors.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.postProcessForwardErrors.tolerations }} + tolerations: +{{ toYaml .Values.sentry.postProcessForwardErrors.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.postProcessForwardErrors.securityContext }} + securityContext: +{{ toYaml .Values.sentry.postProcessForwardErrors.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-post-process-forward-errors + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "post-process-forwarder-errors" + - "--consumer-group" + - "post-process-forwarder" + - "--synchronize-commit-log-topic=snuba-commit-log" + - "--synchronize-commit-group=snuba-consumers" + env: +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.postProcessForwardErrors.env }} +{{ toYaml .Values.sentry.postProcessForwardErrors.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.postProcessForwardErrors.volumeMounts }} +{{ toYaml .Values.sentry.postProcessForwardErrors.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.postProcessForwardErrors.resources | indent 12 }} +{{- if .Values.sentry.postProcessForwardErrors.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.postProcessForwardErrors.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.postProcessForwardErrors.sidecars }} +{{ toYaml .Values.sentry.postProcessForwardErrors.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-post-process-forwarder-errors + {{- 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.postProcessForwardErrors.volumes }} +{{ toYaml .Values.sentry.postProcessForwardErrors.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.postProcessForwardErrors.priorityClassName }} + priorityClassName: "{{ .Values.sentry.postProcessForwardErrors.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-post-process-forwarder-issue-platform.yaml b/charts/sentry/templates/deployment-sentry-post-process-forwarder-issue-platform.yaml new file mode 100644 index 0000000..453fb3a --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-post-process-forwarder-issue-platform.yaml @@ -0,0 +1,141 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-post-process-forward-issue-platform + 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-issue-platform + replicas: {{ .Values.sentry.postProcessForwardIssuePlatform.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.postProcessForwardIssuePlatform.annotations }} +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.annotations | indent 8 }} + {{- end }} + labels: + app: sentry + release: "{{ .Release.Name }}" + role: sentry-post-process-forward-issue-platform + {{- if .Values.sentry.postProcessForwardIssuePlatform.podLabels }} +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.postProcessForwardIssuePlatform.affinity }} +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.postProcessForwardIssuePlatform.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.postProcessForwardIssuePlatform.tolerations }} + tolerations: +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.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.postProcessForwardIssuePlatform.securityContext }} + securityContext: +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-post-process-forward-issue-platform + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "post-process-forwarder-issue-platform" + - "--consumer-group" + - "post-process-forwarder" + - "--synchronize-commit-log-topic=snuba-generic-events-commit-log" + - "--synchronize-commit-group" + - "generic_events_group" + env: +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.postProcessForwardIssuePlatform.env }} +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.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.postProcessForwardIssuePlatform.volumeMounts }} +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.resources | indent 12 }} +{{- if .Values.sentry.postProcessForwardIssuePlatform.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.postProcessForwardIssuePlatform.sidecars }} +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-post-process-forwarder-issue-platform + {{- 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.postProcessForwardIssuePlatform.volumes }} +{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.postProcessForwardIssuePlatform.priorityClassName }} + priorityClassName: "{{ .Values.sentry.postProcessForwardIssuePlatform.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-post-process-forwarder-transactions.yaml b/charts/sentry/templates/deployment-sentry-post-process-forwarder-transactions.yaml new file mode 100644 index 0000000..44c017b --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-post-process-forwarder-transactions.yaml @@ -0,0 +1,141 @@ +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" + - "consumer" + - "post-process-forwarder-transactions" + - "--consumer-group" + - "post-process-forwarder" + - "--synchronize-commit-log-topic=snuba-transactions-commit-log" + - "--synchronize-commit-group" + - "transactions_group" + env: +{{ include "sentry.env" . | indent 8 }} +{{- 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 }} +{{- if .Values.sentry.postProcessForwardTransactions.volumeMounts }} +{{ toYaml .Values.sentry.postProcessForwardTransactions.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.postProcessForwardTransactions.resources | indent 12 }} +{{- if .Values.sentry.postProcessForwardTransactions.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.postProcessForwardTransactions.containerSecurityContext | indent 12 }} +{{- end }} +{{- 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 }} diff --git a/charts/sentry/templates/deployment-sentry-post-process-forwarder.yaml b/charts/sentry/templates/deployment-sentry-post-process-forwarder.yaml deleted file mode 100644 index f8a0f5f..0000000 --- a/charts/sentry/templates/deployment-sentry-post-process-forwarder.yaml +++ /dev/null @@ -1,118 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "sentry.fullname" . }}-post-process-forward - 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 - replicas: {{ .Values.sentry.postProcessForward.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 }} - labels: - app: sentry - release: "{{ .Release.Name }}" - role: sentry-post-process-forward - {{- if .Values.sentry.postProcessForward.podLabels }} -{{ toYaml .Values.sentry.postProcessForward.podLabels | indent 8 }} - {{- end }} - spec: - serviceAccountName: {{ template "sentry.serviceAccountName" . }} - affinity: - {{- if .Values.sentry.postProcessForward.affinity }} -{{ toYaml .Values.sentry.postProcessForward.affinity | indent 8 }} - {{- end }} - {{- if .Values.sentry.postProcessForward.nodeSelector }} - nodeSelector: -{{ toYaml .Values.sentry.postProcessForward.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.sentry.postProcessForward.tolerations }} - tolerations: -{{ toYaml .Values.sentry.postProcessForward.tolerations | indent 8 }} - {{- end }} - {{- if .Values.images.sentry.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.images.sentry.imagePullSecrets | indent 8 }} - {{- end }} - {{- if .Values.sentry.postProcessForward.securityContext }} - securityContext: -{{ toYaml .Values.sentry.postProcessForward.securityContext | indent 8 }} - {{- end }} - containers: - - name: {{ .Chart.Name }}-post-process-forward - image: "{{ template "sentry.image" . }}" - imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} - command: ["sentry", "run", "post-process-forwarder", "--commit-batch-size", "{{ default "1" .Values.sentry.postProcessForward.commitBatchSize }}"] - env: - - name: SNUBA - value: http://{{ template "sentry.fullname" . }}-snuba:{{ template "snuba.port" }} - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ default (include "sentry.postgresql.fullname" .) .Values.postgresql.existingSecret }} - key: {{ default "postgresql-password" .Values.postgresql.existingSecretKey }} - {{ 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.postProcessForward.env }} -{{ toYaml .Values.sentry.postProcessForward.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.postProcessForward.resources | indent 12 }} -{{- if .Values.sentry.postProcessForward.sidecars }} -{{ toYaml .Values.sentry.postProcessForward.sidecars | indent 6 }} -{{- 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) }} - persistentVolumeClaim: - claimName: {{ template "sentry.fullname" . }}-data - {{- 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.postProcessForward.volumes }} -{{ toYaml .Values.sentry.postProcessForward.volumes | indent 6 }} -{{- end }} - {{- if .Values.sentry.postProcessForward.priorityClassName }} - priorityClassName: "{{ .Values.sentry.postProcessForward.priorityClassName }}" - {{- end }} \ No newline at end of file diff --git a/charts/sentry/templates/deployment-sentry-subscription-consumer-events.yaml b/charts/sentry/templates/deployment-sentry-subscription-consumer-events.yaml new file mode 100644 index 0000000..0383f0d --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-subscription-consumer-events.yaml @@ -0,0 +1,131 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-subscription-consumer-events + 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-subscription-consumer-events + replicas: {{ .Values.sentry.subscriptionConsumerEvents.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.subscriptionConsumerEvents.annotations }} +{{ toYaml .Values.sentry.subscriptionConsumerEvents.annotations | indent 8 }} + {{- end }} + labels: + app: sentry + release: "{{ .Release.Name }}" + role: sentry-subscription-consumer-events + {{- if .Values.sentry.subscriptionConsumerEvents.podLabels }} +{{ toYaml .Values.sentry.subscriptionConsumerEvents.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.subscriptionConsumerEvents.affinity }} +{{ toYaml .Values.sentry.subscriptionConsumerEvents.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerEvents.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.subscriptionConsumerEvents.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerEvents.tolerations }} + tolerations: +{{ toYaml .Values.sentry.subscriptionConsumerEvents.tolerations | indent 8 }} + {{- end }} + {{- if .Values.images.sentry.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.images.sentry.imagePullSecrets | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerEvents.securityContext }} + securityContext: +{{ toYaml .Values.sentry.subscriptionConsumerEvents.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-subscription-consumer-events + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "events-subscription-results" + - "--consumer-group" + - "query-subscription-consumer" + env: +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.subscriptionConsumerEvents.env }} +{{ toYaml .Values.sentry.subscriptionConsumerEvents.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.subscriptionConsumerEvents.volumeMounts }} +{{ toYaml .Values.sentry.subscriptionConsumerEvents.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.subscriptionConsumerEvents.resources | indent 12 }} +{{- if .Values.sentry.subscriptionConsumerEvents.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.subscriptionConsumerEvents.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.subscriptionConsumerEvents.sidecars }} +{{ toYaml .Values.sentry.subscriptionConsumerEvents.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-subscription-consumer-events + {{- 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.subscriptionConsumerEvents.volumes }} +{{ toYaml .Values.sentry.subscriptionConsumerEvents.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.subscriptionConsumerEvents.priorityClassName }} + priorityClassName: "{{ .Values.sentry.subscriptionConsumerEvents.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-subscription-consumer-generic-metrics.yaml b/charts/sentry/templates/deployment-sentry-subscription-consumer-generic-metrics.yaml new file mode 100644 index 0000000..17ee32b --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-subscription-consumer-generic-metrics.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-subscription-consumer-generic-metrics + 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: subscription-consumer-generic-metrics + replicas: {{ .Values.sentry.subscriptionConsumerGenericMetrics.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.subscriptionConsumerGenericMetrics.annotations }} +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: subscription-consumer-generic-metrics + {{- if .Values.sentry.subscriptionConsumerGenericMetrics.podLabels }} +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.subscriptionConsumerGenericMetrics.affinity }} +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerGenericMetrics.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerGenericMetrics.tolerations }} + tolerations: +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.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.subscriptionConsumerGenericMetrics.securityContext }} + securityContext: +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-subscription-consumer-generic-metrics + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "generic-metrics-subscription-results" + - "--consumer-group" + - "query-subscription-consumer" + {{- if .Values.sentry.subscriptionConsumerGenericMetrics.concurrency }} + - "--concurrency" + - "{{ .Values.sentry.subscriptionConsumerGenericMetrics.concurrency }}" + {{- end }} + {{- if .Values.sentry.subscriptionConsumerGenericMetrics.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.sentry.subscriptionConsumerGenericMetrics.maxBatchSize }}" + {{- end }} + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.subscriptionConsumerGenericMetrics.env }} +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.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.subscriptionConsumerGenericMetrics.volumeMounts }} +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.resources | indent 12 }} +{{- if .Values.sentry.subscriptionConsumerGenericMetrics.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.subscriptionConsumerGenericMetrics.sidecars }} +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-subscription-consumer-generic-metrics + {{- 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.subscriptionConsumerGenericMetrics.volumes }} +{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.subscriptionConsumerGenericMetrics.priorityClassName }} + priorityClassName: "{{ .Values.sentry.subscriptionConsumerGenericMetrics.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-subscription-consumer-metrics.yaml b/charts/sentry/templates/deployment-sentry-subscription-consumer-metrics.yaml new file mode 100644 index 0000000..fe39c89 --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-subscription-consumer-metrics.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-subscription-consumer-metrics + 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: subscription-consumer-metrics + replicas: {{ .Values.sentry.subscriptionConsumerMetrics.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.subscriptionConsumerMetrics.annotations }} +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: subscription-consumer-metrics + {{- if .Values.sentry.subscriptionConsumerMetrics.podLabels }} +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.subscriptionConsumerMetrics.affinity }} +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerMetrics.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerMetrics.tolerations }} + tolerations: +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.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.subscriptionConsumerMetrics.securityContext }} + securityContext: +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-subscription-consumer-metrics + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "metrics-subscription-results" + - "--consumer-group" + - "query-subscription-consumer" + {{- if .Values.sentry.subscriptionConsumerMetrics.concurrency }} + - "--concurrency" + - "{{ .Values.sentry.subscriptionConsumerMetrics.concurrency }}" + {{- end }} + {{- if .Values.sentry.subscriptionConsumerMetrics.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.sentry.subscriptionConsumerMetrics.maxBatchSize }}" + {{- end }} + env: + - name: C_FORCE_ROOT + value: "true" +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.subscriptionConsumerMetrics.env }} +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.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.subscriptionConsumerMetrics.volumeMounts }} +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.resources | indent 12 }} +{{- if .Values.sentry.subscriptionConsumerMetrics.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.subscriptionConsumerMetrics.sidecars }} +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-subscription-consumer-metrics + {{- 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.subscriptionConsumerMetrics.volumes }} +{{ toYaml .Values.sentry.subscriptionConsumerMetrics.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.subscriptionConsumerMetrics.priorityClassName }} + priorityClassName: "{{ .Values.sentry.subscriptionConsumerMetrics.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-sentry-subscription-consumer-transactions.yaml b/charts/sentry/templates/deployment-sentry-subscription-consumer-transactions.yaml new file mode 100644 index 0000000..dc78604 --- /dev/null +++ b/charts/sentry/templates/deployment-sentry-subscription-consumer-transactions.yaml @@ -0,0 +1,131 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-subscription-consumer-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-subscription-consumer-transactions + replicas: {{ .Values.sentry.subscriptionConsumerTransactions.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.subscriptionConsumerTransactions.annotations }} +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.annotations | indent 8 }} + {{- end }} + labels: + app: sentry + release: "{{ .Release.Name }}" + role: sentry-subscription-consumer-transactions + {{- if .Values.sentry.subscriptionConsumerTransactions.podLabels }} +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.subscriptionConsumerTransactions.affinity }} +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerTransactions.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerTransactions.tolerations }} + tolerations: +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.tolerations | indent 8 }} + {{- end }} + {{- if .Values.images.sentry.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.images.sentry.imagePullSecrets | indent 8 }} + {{- end }} + {{- if .Values.sentry.subscriptionConsumerTransactions.securityContext }} + securityContext: +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-subscription-consumer-transactions + image: "{{ template "sentry.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "consumer" + - "transactions-subscription-results" + - "--consumer-group" + - "query-subscription-consumer" + env: +{{ include "sentry.env" . | indent 8 }} +{{- if .Values.sentry.subscriptionConsumerTransactions.env }} +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.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.subscriptionConsumerTransactions.volumeMounts }} +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.resources | indent 12 }} +{{- if .Values.sentry.subscriptionConsumerTransactions.containerSecurityContext }} + securityContext: +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.sentry.subscriptionConsumerTransactions.sidecars }} +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-subscription-consumer-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.subscriptionConsumerTransactions.volumes }} +{{ toYaml .Values.sentry.subscriptionConsumerTransactions.volumes | indent 6 }} +{{- end }} + {{- if .Values.sentry.subscriptionConsumerTransactions.priorityClassName }} + priorityClassName: "{{ .Values.sentry.subscriptionConsumerTransactions.priorityClassName }}" + {{- end }} diff --git a/charts/sentry/templates/deployment-snuba-generic-metrics-counters-consumer.yaml b/charts/sentry/templates/deployment-snuba-generic-metrics-counters-consumer.yaml new file mode 100644 index 0000000..bdd420c --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-generic-metrics-counters-consumer.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-generic-metrics-counters-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-generic-metrics-counters-consumer + replicas: {{ .Values.snuba.genericMetricsCountersConsumer.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.genericMetricsCountersConsumer.annotations }} +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-generic-metrics-counters-consumer + {{- if .Values.snuba.genericMetricsCountersConsumer.podLabels }} +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.genericMetricsCountersConsumer.affinity }} +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.tolerations }} + tolerations: +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.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.genericMetricsCountersConsumer.securityContext }} + securityContext: +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "consumer" + - "--storage" + - "generic_metrics_counters_raw" + - "--consumer-group" + - "snuba-gen-metrics-counters-consumers" + - "--auto-offset-reset" + - "{{ .Values.snuba.genericMetricsCountersConsumer.autoOffsetReset }}" + - "--max-batch-time-ms" + - "750" + {{- if .Values.snuba.genericMetricsCountersConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.snuba.genericMetricsCountersConsumer.maxBatchSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.processes }} + - "--processes" + - "{{ .Values.snuba.genericMetricsCountersConsumer.processes }}" + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.inputBlockSize }} + - "--input-block-size" + - "{{ .Values.snuba.genericMetricsCountersConsumer.inputBlockSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.outputBlockSize }} + - "--output-block-size" + - "{{ .Values.snuba.genericMetricsCountersConsumer.outputBlockSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.maxBatchTimeMs }} + - "--max-batch-time-ms" + - "{{ .Values.snuba.genericMetricsCountersConsumer.maxBatchTimeMs }}" + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.queuedMaxMessagesKbytes }} + - "--queued-max-messages-kbytes" + - "{{ .Values.snuba.genericMetricsCountersConsumer.queuedMaxMessagesKbytes }}" + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.queuedMinMessages }} + - "--queued-min-messages" + - "{{ .Values.snuba.genericMetricsCountersConsumer.queuedMinMessages }}" + {{- end }} + {{- if .Values.snuba.genericMetricsCountersConsumer.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.genericMetricsCountersConsumer.env }} +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.genericMetricsCountersConsumer.volumeMounts }} +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.resources | indent 12 }} +{{- if .Values.snuba.genericMetricsCountersConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.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.genericMetricsCountersConsumer.volumes }} +{{ toYaml .Values.snuba.genericMetricsCountersConsumer.volumes | indent 8 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-generic-metrics-distributions-consumer.yaml b/charts/sentry/templates/deployment-snuba-generic-metrics-distributions-consumer.yaml new file mode 100644 index 0000000..00d83c6 --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-generic-metrics-distributions-consumer.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-generic-metrics-distributions-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-generic-metrics-distributions-consumer + replicas: {{ .Values.snuba.genericMetricsDistributionConsumer.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.annotations }} +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-generic-metrics-distributions-consumer + {{- if .Values.snuba.genericMetricsDistributionConsumer.podLabels }} +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.genericMetricsDistributionConsumer.affinity }} +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.tolerations }} + tolerations: +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.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.genericMetricsDistributionConsumer.securityContext }} + securityContext: +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "consumer" + - "--storage" + - "generic_metrics_distributions_raw" + - "--consumer-group" + - "snuba-gen-metrics-distributions-consumers" + - "--auto-offset-reset" + - "{{ .Values.snuba.genericMetricsDistributionConsumer.autoOffsetReset }}" + - "--max-batch-time-ms" + - "750" + {{- if .Values.snuba.genericMetricsDistributionConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.snuba.genericMetricsDistributionConsumer.maxBatchSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.processes }} + - "--processes" + - "{{ .Values.snuba.genericMetricsDistributionConsumer.processes }}" + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.inputBlockSize }} + - "--input-block-size" + - "{{ .Values.snuba.genericMetricsDistributionConsumer.inputBlockSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.outputBlockSize }} + - "--output-block-size" + - "{{ .Values.snuba.genericMetricsDistributionConsumer.outputBlockSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.maxBatchTimeMs }} + - "--max-batch-time-ms" + - "{{ .Values.snuba.genericMetricsDistributionConsumer.maxBatchTimeMs }}" + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.queuedMaxMessagesKbytes }} + - "--queued-max-messages-kbytes" + - "{{ .Values.snuba.genericMetricsDistributionConsumer.queuedMaxMessagesKbytes }}" + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.queuedMinMessages }} + - "--queued-min-messages" + - "{{ .Values.snuba.genericMetricsDistributionConsumer.queuedMinMessages }}" + {{- end }} + {{- if .Values.snuba.genericMetricsDistributionConsumer.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.genericMetricsDistributionConsumer.env }} +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.genericMetricsDistributionConsumer.volumeMounts }} +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.resources | indent 12 }} +{{- if .Values.snuba.genericMetricsDistributionConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.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.genericMetricsDistributionConsumer.volumes }} +{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.volumes | indent 8 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-generic-metrics-sets-consumer.yaml b/charts/sentry/templates/deployment-snuba-generic-metrics-sets-consumer.yaml new file mode 100644 index 0000000..7a5a2f7 --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-generic-metrics-sets-consumer.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-generic-metrics-sets-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-generic-metrics-sets-consumer + replicas: {{ .Values.snuba.genericMetricsSetsConsumer.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.genericMetricsSetsConsumer.annotations }} +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-generic-metrics-sets-consumer + {{- if .Values.snuba.genericMetricsSetsConsumer.podLabels }} +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.genericMetricsSetsConsumer.affinity }} +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.tolerations }} + tolerations: +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.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.genericMetricsSetsConsumer.securityContext }} + securityContext: +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "consumer" + - "--storage" + - "generic_metrics_sets_raw" + - "--consumer-group" + - "snuba-gen-metrics-sets-consumers" + - "--auto-offset-reset" + - "{{ .Values.snuba.genericMetricsSetsConsumer.autoOffsetReset }}" + - "--max-batch-time-ms" + - "750" + {{- if .Values.snuba.genericMetricsSetsConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.snuba.genericMetricsSetsConsumer.maxBatchSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.processes }} + - "--processes" + - "{{ .Values.snuba.genericMetricsSetsConsumer.processes }}" + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.inputBlockSize }} + - "--input-block-size" + - "{{ .Values.snuba.genericMetricsSetsConsumer.inputBlockSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.outputBlockSize }} + - "--output-block-size" + - "{{ .Values.snuba.genericMetricsSetsConsumer.outputBlockSize }}" + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.maxBatchTimeMs }} + - "--max-batch-time-ms" + - "{{ .Values.snuba.genericMetricsSetsConsumer.maxBatchTimeMs }}" + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.queuedMaxMessagesKbytes }} + - "--queued-max-messages-kbytes" + - "{{ .Values.snuba.genericMetricsSetsConsumer.queuedMaxMessagesKbytes }}" + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.queuedMinMessages }} + - "--queued-min-messages" + - "{{ .Values.snuba.genericMetricsSetsConsumer.queuedMinMessages }}" + {{- end }} + {{- if .Values.snuba.genericMetricsSetsConsumer.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.genericMetricsSetsConsumer.env }} +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.genericMetricsSetsConsumer.volumeMounts }} +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.resources | indent 12 }} +{{- if .Values.snuba.genericMetricsSetsConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.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.genericMetricsSetsConsumer.volumes }} +{{ toYaml .Values.snuba.genericMetricsSetsConsumer.volumes | indent 8 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-issue-occurrence-consumer.yaml b/charts/sentry/templates/deployment-snuba-issue-occurrence-consumer.yaml new file mode 100644 index 0000000..aff5d74 --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-issue-occurrence-consumer.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-issue-occurrence-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": "16" + {{- end }} +spec: + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + selector: + matchLabels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: issue-occurrence-consumer + replicas: {{ .Values.snuba.issueOccurrenceConsumer.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.issueOccurrenceConsumer.annotations }} +{{ toYaml .Values.snuba.issueOccurrenceConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: issue-occurrence-consumer + {{- if .Values.snuba.issueOccurrenceConsumer.podLabels }} +{{ toYaml .Values.snuba.issueOccurrenceConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.issueOccurrenceConsumer.affinity }} +{{ toYaml .Values.snuba.issueOccurrenceConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.issueOccurrenceConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.tolerations }} + tolerations: +{{ toYaml .Values.snuba.issueOccurrenceConsumer.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.issueOccurrenceConsumer.securityContext }} + securityContext: +{{ toYaml .Values.snuba.issueOccurrenceConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "consumer" + - "--storage" + - "search_issues" + - "--consumer-group" + - "generic_events_group" + - "--auto-offset-reset" + - "{{ .Values.snuba.issueOccurrenceConsumer.autoOffsetReset }}" + - "--max-batch-time-ms" + - "750" + {{- if .Values.snuba.issueOccurrenceConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.snuba.issueOccurrenceConsumer.maxBatchSize }}" + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.processes }} + - "--processes" + - "{{ .Values.snuba.issueOccurrenceConsumer.processes }}" + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.inputBlockSize }} + - "--input-block-size" + - "{{ .Values.snuba.issueOccurrenceConsumer.inputBlockSize }}" + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.outputBlockSize }} + - "--output-block-size" + - "{{ .Values.snuba.issueOccurrenceConsumer.outputBlockSize }}" + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.maxBatchTimeMs }} + - "--max-batch-time-ms" + - "{{ .Values.snuba.issueOccurrenceConsumer.maxBatchTimeMs }}" + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.queuedMaxMessagesKbytes }} + - "--queued-max-messages-kbytes" + - "{{ .Values.snuba.issueOccurrenceConsumer.queuedMaxMessagesKbytes }}" + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.queuedMinMessages }} + - "--queued-min-messages" + - "{{ .Values.snuba.issueOccurrenceConsumer.queuedMinMessages }}" + {{- end }} + {{- if .Values.snuba.issueOccurrenceConsumer.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.issueOccurrenceConsumer.env }} +{{ toYaml .Values.snuba.issueOccurrenceConsumer.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.issueOccurrenceConsumer.volumeMounts }} +{{ toYaml .Values.snuba.issueOccurrenceConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.issueOccurrenceConsumer.resources | indent 12 }} +{{- if .Values.snuba.issueOccurrenceConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.issueOccurrenceConsumer.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.issueOccurrenceConsumer.volumes }} +{{ toYaml .Values.snuba.issueOccurrenceConsumer.volumes | indent 8 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-metrics-consumer.yaml b/charts/sentry/templates/deployment-snuba-metrics-consumer.yaml new file mode 100644 index 0000000..7d5f2fd --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-metrics-consumer.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-metrics-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-metrics-consumer + replicas: {{ .Values.snuba.metricsConsumer.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.metricsConsumer.annotations }} +{{ toYaml .Values.snuba.metricsConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-metrics-consumer + {{- if .Values.snuba.metricsConsumer.podLabels }} +{{ toYaml .Values.snuba.metricsConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.metricsConsumer.affinity }} +{{ toYaml .Values.snuba.metricsConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.metricsConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.metricsConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.metricsConsumer.tolerations }} + tolerations: +{{ toYaml .Values.snuba.metricsConsumer.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.metricsConsumer.securityContext }} + securityContext: +{{ toYaml .Values.snuba.metricsConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "consumer" + - "--storage" + - "metrics_raw" + - "--consumer-group" + - "snuba-metrics-consumers" + - "--auto-offset-reset" + - "{{ .Values.snuba.metricsConsumer.autoOffsetReset }}" + - "--max-batch-time-ms" + - "750" + {{- if .Values.snuba.metricsConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.snuba.metricsConsumer.maxBatchSize }}" + {{- end }} + {{- if .Values.snuba.metricsConsumer.processes }} + - "--processes" + - "{{ .Values.snuba.metricsConsumer.processes }}" + {{- end }} + {{- if .Values.snuba.metricsConsumer.inputBlockSize }} + - "--input-block-size" + - "{{ .Values.snuba.metricsConsumer.inputBlockSize }}" + {{- end }} + {{- if .Values.snuba.metricsConsumer.outputBlockSize }} + - "--output-block-size" + - "{{ .Values.snuba.metricsConsumer.outputBlockSize }}" + {{- end }} + {{- if .Values.snuba.metricsConsumer.maxBatchTimeMs }} + - "--max-batch-time-ms" + - "{{ .Values.snuba.metricsConsumer.maxBatchTimeMs }}" + {{- end }} + {{- if .Values.snuba.metricsConsumer.queuedMaxMessagesKbytes }} + - "--queued-max-messages-kbytes" + - "{{ .Values.snuba.metricsConsumer.queuedMaxMessagesKbytes }}" + {{- end }} + {{- if .Values.snuba.metricsConsumer.queuedMinMessages }} + - "--queued-min-messages" + - "{{ .Values.snuba.metricsConsumer.queuedMinMessages }}" + {{- end }} + {{- if .Values.snuba.metricsConsumer.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.metricsConsumer.env }} +{{ toYaml .Values.snuba.metricsConsumer.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.metricsConsumer.volumeMounts }} +{{ toYaml .Values.snuba.metricsConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.metricsConsumer.resources | indent 12 }} +{{- if .Values.snuba.metricsConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.metricsConsumer.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.metricsConsumer.volumes }} +{{ toYaml .Values.snuba.metricsConsumer.volumes | indent 8 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-profiling-functions-consumer.yaml b/charts/sentry/templates/deployment-snuba-profiling-functions-consumer.yaml new file mode 100644 index 0000000..8111428 --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-profiling-functions-consumer.yaml @@ -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 }} diff --git a/charts/sentry/templates/deployment-snuba-profiling-profiles-consumer.yaml b/charts/sentry/templates/deployment-snuba-profiling-profiles-consumer.yaml new file mode 100644 index 0000000..fb09d4e --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-profiling-profiles-consumer.yaml @@ -0,0 +1,150 @@ +{{- if .Values.sentry.features.enableProfiling }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-profiling-profiles-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-profiles-consumer + replicas: {{ .Values.snuba.profilingProfilesConsumer.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.profilingProfilesConsumer.annotations }} +{{ toYaml .Values.snuba.profilingProfilesConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-profiling-profiles-consumer + {{- if .Values.snuba.profilingProfilesConsumer.podLabels }} +{{ toYaml .Values.snuba.profilingProfilesConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.profilingProfilesConsumer.affinity }} +{{ toYaml .Values.snuba.profilingProfilesConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.profilingProfilesConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.tolerations }} + tolerations: +{{ toYaml .Values.snuba.profilingProfilesConsumer.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.profilingProfilesConsumer.securityContext }} + securityContext: +{{ toYaml .Values.snuba.profilingProfilesConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "consumer" + - "--storage" + - "profiles" + - "--consumer-group" + - "profiles_group" + - "--auto-offset-reset" + - "{{ .Values.snuba.profilingProfilesConsumer.autoOffsetReset }}" + - "--max-batch-time-ms" + - "750" + {{- if .Values.snuba.profilingProfilesConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.snuba.profilingProfilesConsumer.maxBatchSize }}" + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.processes }} + - "--processes" + - "{{ .Values.snuba.profilingProfilesConsumer.processes }}" + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.inputBlockSize }} + - "--input-block-size" + - "{{ .Values.snuba.profilingProfilesConsumer.inputBlockSize }}" + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.outputBlockSize }} + - "--output-block-size" + - "{{ .Values.snuba.profilingProfilesConsumer.outputBlockSize }}" + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.maxBatchTimeMs }} + - "--max-batch-time-ms" + - "{{ .Values.snuba.profilingProfilesConsumer.maxBatchTimeMs }}" + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.queuedMaxMessagesKbytes }} + - "--queued-max-messages-kbytes" + - "{{ .Values.snuba.profilingProfilesConsumer.queuedMaxMessagesKbytes }}" + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.queuedMinMessages }} + - "--queued-min-messages" + - "{{ .Values.snuba.profilingProfilesConsumer.queuedMinMessages }}" + {{- end }} + {{- if .Values.snuba.profilingProfilesConsumer.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.profilingProfilesConsumer.env }} +{{ toYaml .Values.snuba.profilingProfilesConsumer.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.profilingProfilesConsumer.volumeMounts }} +{{ toYaml .Values.snuba.profilingProfilesConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.profilingProfilesConsumer.resources | indent 12 }} +{{- if .Values.snuba.profilingProfilesConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.profilingProfilesConsumer.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.profilingProfilesConsumer.volumes }} +{{ toYaml .Values.snuba.profilingProfilesConsumer.volumes | indent 8 }} +{{- end }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-replays-consumer.yaml b/charts/sentry/templates/deployment-snuba-replays-consumer.yaml new file mode 100644 index 0000000..3242e21 --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-replays-consumer.yaml @@ -0,0 +1,148 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-replays-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-replays-consumer + replicas: {{ .Values.snuba.replaysConsumer.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.replaysConsumer.annotations }} +{{ toYaml .Values.snuba.replaysConsumer.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-replays-consumer + {{- if .Values.snuba.replaysConsumer.podLabels }} +{{ toYaml .Values.snuba.replaysConsumer.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.replaysConsumer.affinity }} +{{ toYaml .Values.snuba.replaysConsumer.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.replaysConsumer.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.replaysConsumer.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.replaysConsumer.tolerations }} + tolerations: +{{ toYaml .Values.snuba.replaysConsumer.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.replaysConsumer.securityContext }} + securityContext: +{{ toYaml .Values.snuba.replaysConsumer.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "consumer" + - "--storage" + - "replays" + - "--consumer-group" + - "replays_group" + - "--auto-offset-reset" + - "{{ .Values.snuba.replaysConsumer.autoOffsetReset }}" + - "--max-batch-time-ms" + - "750" + {{- if .Values.snuba.replaysConsumer.maxBatchSize }} + - "--max-batch-size" + - "{{ .Values.snuba.replaysConsumer.maxBatchSize }}" + {{- end }} + {{- if .Values.snuba.replaysConsumer.processes }} + - "--processes" + - "{{ .Values.snuba.replaysConsumer.processes }}" + {{- end }} + {{- if .Values.snuba.replaysConsumer.inputBlockSize }} + - "--input-block-size" + - "{{ .Values.snuba.replaysConsumer.inputBlockSize }}" + {{- end }} + {{- if .Values.snuba.replaysConsumer.outputBlockSize }} + - "--output-block-size" + - "{{ .Values.snuba.replaysConsumer.outputBlockSize }}" + {{- end }} + {{- if .Values.snuba.replaysConsumer.maxBatchTimeMs }} + - "--max-batch-time-ms" + - "{{ .Values.snuba.replaysConsumer.maxBatchTimeMs }}" + {{- end }} + {{- if .Values.snuba.replaysConsumer.queuedMaxMessagesKbytes }} + - "--queued-max-messages-kbytes" + - "{{ .Values.snuba.replaysConsumer.queuedMaxMessagesKbytes }}" + {{- end }} + {{- if .Values.snuba.replaysConsumer.queuedMinMessages }} + - "--queued-min-messages" + - "{{ .Values.snuba.replaysConsumer.queuedMinMessages }}" + {{- end }} + {{- if .Values.snuba.replaysConsumer.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.replaysConsumer.env }} +{{ toYaml .Values.snuba.replaysConsumer.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.replaysConsumer.volumeMounts }} +{{ toYaml .Values.snuba.replaysConsumer.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.replaysConsumer.resources | indent 12 }} +{{- if .Values.snuba.replaysConsumer.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.replaysConsumer.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.replaysConsumer.volumes }} +{{ toYaml .Values.snuba.replaysConsumer.volumes | indent 8 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-subscription-consumer-events.yaml b/charts/sentry/templates/deployment-snuba-subscription-consumer-events.yaml new file mode 100644 index 0000000..2ab8dc3 --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-subscription-consumer-events.yaml @@ -0,0 +1,112 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-subscription-consumer-events + 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": "18" + {{- end }} +spec: + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + selector: + matchLabels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-subscription-consumer-events + replicas: {{ .Values.snuba.subscriptionConsumerEvents.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.subscriptionConsumerEvents.annotations }} +{{ toYaml .Values.snuba.subscriptionConsumerEvents.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-subscription-consumer-events + {{- if .Values.snuba.subscriptionConsumerEvents.podLabels }} +{{ toYaml .Values.snuba.subscriptionConsumerEvents.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.subscriptionConsumerEvents.affinity }} +{{ toYaml .Values.snuba.subscriptionConsumerEvents.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerEvents.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.subscriptionConsumerEvents.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerEvents.tolerations }} + tolerations: +{{ toYaml .Values.snuba.subscriptionConsumerEvents.tolerations | indent 8 }} + {{- end }} + {{- if .Values.images.snuba.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.images.snuba.imagePullSecrets | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerEvents.securityContext }} + securityContext: +{{ toYaml .Values.snuba.subscriptionConsumerEvents.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "subscriptions-scheduler-executor" + - "--auto-offset-reset={{ .Values.snuba.subscriptionConsumerEvents.autoOffsetReset }}" + - "--dataset=events" + - "--entity=events" + {{- if .Values.snuba.subscriptionConsumerEvents.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + - "--consumer-group=snuba-events-subscriptions-consumers" + - "--followed-consumer-group=snuba-consumers" + - "--schedule-ttl=60" + - "--stale-threshold-seconds=900" + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.subscriptionConsumerEvents.env }} +{{ toYaml .Values.snuba.subscriptionConsumerEvents.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.subscriptionConsumerEvents.volumeMounts }} +{{ toYaml .Values.snuba.subscriptionConsumerEvents.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.subscriptionConsumerEvents.resources | indent 12 }} +{{- if .Values.snuba.subscriptionConsumerEvents.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.subscriptionConsumerEvents.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.subscriptionConsumerEvents.volumes }} +{{ toYaml .Values.snuba.subscriptionConsumerEvents.volumes | indent 6 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-subscription-consumer-metrics.yaml b/charts/sentry/templates/deployment-snuba-subscription-consumer-metrics.yaml new file mode 100644 index 0000000..a921ccd --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-subscription-consumer-metrics.yaml @@ -0,0 +1,113 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-subscription-consumer-metrics + 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": "18" + {{- end }} +spec: + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + selector: + matchLabels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-subscription-consumer-metrics + replicas: {{ .Values.snuba.subscriptionConsumerMetrics.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.subscriptionConsumerMetrics.annotations }} +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-subscription-consumer-metrics + {{- if .Values.snuba.subscriptionConsumerMetrics.podLabels }} +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.subscriptionConsumerMetrics.affinity }} +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerMetrics.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerMetrics.tolerations }} + tolerations: +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.tolerations | indent 8 }} + {{- end }} + {{- if .Values.images.snuba.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.images.snuba.imagePullSecrets | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerMetrics.securityContext }} + securityContext: +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "subscriptions-scheduler-executor" + - "--auto-offset-reset={{ .Values.snuba.subscriptionConsumerMetrics.autoOffsetReset }}" + - "--dataset=metrics" + - "--entity=metrics_sets" + - "--entity=metrics_counters" + {{- if .Values.snuba.subscriptionConsumerMetrics.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + - "--consumer-group=nuba-metrics-subscriptions-consumers" + - "--followed-consumer-group=snuba-metrics-consumers" + - "--schedule-ttl=60" + - "--stale-threshold-seconds=900" + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.subscriptionConsumerMetrics.env }} +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.subscriptionConsumerMetrics.volumeMounts }} +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.resources | indent 12 }} +{{- if .Values.snuba.subscriptionConsumerMetrics.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.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.subscriptionConsumerMetrics.volumes }} +{{ toYaml .Values.snuba.subscriptionConsumerMetrics.volumes | indent 6 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-snuba-subscription-consumer-transactions.yaml b/charts/sentry/templates/deployment-snuba-subscription-consumer-transactions.yaml new file mode 100644 index 0000000..dbcc31c --- /dev/null +++ b/charts/sentry/templates/deployment-snuba-subscription-consumer-transactions.yaml @@ -0,0 +1,112 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-snuba-subscription-consumer-transactions + 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": "18" + {{- end }} +spec: + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + selector: + matchLabels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-subscription-consumer-transactions + replicas: {{ .Values.snuba.subscriptionConsumerTransactions.replicas }} + template: + metadata: + annotations: + checksum/snubaSettingsPy: {{ .Values.config.snubaSettingsPy | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-snuba.yaml") . | sha256sum }} + {{- if .Values.snuba.subscriptionConsumerTransactions.annotations }} +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: snuba-subscription-consumer-transactions + {{- if .Values.snuba.subscriptionConsumerTransactions.podLabels }} +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.snuba.subscriptionConsumerTransactions.affinity }} +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.affinity | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerTransactions.nodeSelector }} + nodeSelector: +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerTransactions.tolerations }} + tolerations: +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.tolerations | indent 8 }} + {{- end }} + {{- if .Values.images.snuba.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.images.snuba.imagePullSecrets | indent 8 }} + {{- end }} + {{- if .Values.snuba.subscriptionConsumerTransactions.securityContext }} + securityContext: +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-snuba + image: "{{ template "snuba.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.snuba.pullPolicy }} + command: + - "snuba" + - "subscriptions-scheduler-executor" + - "--auto-offset-reset={{ .Values.snuba.subscriptionConsumerTransactions.autoOffsetReset }}" + - "--dataset=transactions" + - "--entity=transactions" + {{- if .Values.snuba.subscriptionConsumerTransactions.noStrictOffsetReset }} + - "--no-strict-offset-reset" + {{- end }} + - "--consumer-group=snuba-transactions-subscriptions-consumers" + - "--followed-consumer-group=transactions_group" + - "--schedule-ttl=60" + - "--stale-threshold-seconds=900" + ports: + - containerPort: {{ template "snuba.port" }} + env: +{{ include "sentry.snuba.env" . | indent 8 }} +{{- if .Values.snuba.subscriptionConsumerTransactions.env }} +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.env | indent 8 }} +{{- end }} + envFrom: + - secretRef: + name: {{ template "sentry.fullname" . }}-snuba-env + volumeMounts: + - mountPath: /etc/snuba + name: config + readOnly: true +{{- if .Values.snuba.subscriptionConsumerTransactions.volumeMounts }} +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.volumeMounts | indent 8 }} +{{- end }} + resources: +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.resources | indent 12 }} +{{- if .Values.snuba.subscriptionConsumerTransactions.containerSecurityContext }} + securityContext: +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.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.subscriptionConsumerTransactions.volumes }} +{{ toYaml .Values.snuba.subscriptionConsumerTransactions.volumes | indent 6 }} +{{- end }} diff --git a/charts/sentry/templates/deployment-vroom.yaml b/charts/sentry/templates/deployment-vroom.yaml new file mode 100644 index 0000000..c13a31a --- /dev/null +++ b/charts/sentry/templates/deployment-vroom.yaml @@ -0,0 +1,123 @@ +{{- if .Values.sentry.features.enableProfiling }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.fullname" . }}-vroom + 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": "25" + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: vroom +{{- if not .Values.vroom.autoscaling.enabled }} + replicas: {{ .Values.vroom.replicas }} +{{- end }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + template: + metadata: + annotations: + {{- if .Values.vroom.annotations }} +{{ toYaml .Values.vroom.annotations | indent 8 }} + {{- end }} + labels: + app: {{ template "sentry.fullname" . }} + release: "{{ .Release.Name }}" + role: vroom + {{- if .Values.vroom.podLabels }} +{{ toYaml .Values.vroom.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.vroom.affinity }} +{{ toYaml .Values.vroom.affinity | indent 8 }} + {{- end }} + {{- if .Values.vroom.nodeSelector }} + nodeSelector: +{{ toYaml .Values.vroom.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.vroom.tolerations }} + tolerations: +{{ toYaml .Values.vroom.tolerations | indent 8 }} + {{- end }} + {{- if .Values.images.vroom.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.images.vroom.imagePullSecrets | indent 8 }} + {{- end }} + {{- if .Values.vroom.securityContext }} + securityContext: +{{ toYaml .Values.vroom.securityContext | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-vroom +{{- if .Values.vroom.args }} + args: +{{ toYaml .Values.vroom.args | indent 10 }} +{{- end }} + image: "{{ template "vroom.image" . }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.images.vroom.pullPolicy }} + ports: + - containerPort: {{ template "vroom.port" }} + env: + - name: VROOM_PORT + value: '{{ template "vroom.port" }}' +{{- if .Values.vroom.env }} +{{ toYaml .Values.vroom.env | indent 8 }} +{{- end }} +{{- if .Values.vroom.volumeMounts }} + volumeMounts: +{{ toYaml .Values.vroom.volumeMounts | indent 10 }} +{{- end }} + livenessProbe: + failureThreshold: {{ .Values.vroom.probeFailureThreshold }} + httpGet: + path: /health + port: {{ template "vroom.port" }} + scheme: HTTP + initialDelaySeconds: {{ .Values.vroom.probeInitialDelaySeconds }} + periodSeconds: {{ .Values.vroom.probePeriodSeconds }} + successThreshold: {{ .Values.vroom.probeSuccessThreshold }} + timeoutSeconds: {{ .Values.vroom.probeTimeoutSeconds }} + readinessProbe: + failureThreshold: {{ .Values.vroom.probeFailureThreshold }} + httpGet: + path: /health + port: {{ template "vroom.port" }} + scheme: HTTP + initialDelaySeconds: {{ .Values.vroom.probeInitialDelaySeconds }} + periodSeconds: {{ .Values.vroom.probePeriodSeconds }} + successThreshold: {{ .Values.vroom.probeSuccessThreshold }} + timeoutSeconds: {{ .Values.vroom.probeTimeoutSeconds }} + resources: +{{ toYaml .Values.vroom.resources | indent 12 }} +{{- if .Values.vroom.containerSecurityContext }} + securityContext: +{{ toYaml .Values.vroom.containerSecurityContext | indent 12 }} +{{- end }} +{{- if .Values.vroom.sidecars }} +{{ toYaml .Values.vroom.sidecars | indent 6 }} +{{- end }} + {{- if .Values.serviceAccount.enabled }} + serviceAccountName: {{ .Values.serviceAccount.name }}-vroom + {{- end }} +{{- if .Values.vroom.volumes }} + volumes: +{{ toYaml .Values.vroom.volumes | indent 6 }} +{{- end }} + {{- if .Values.vroom.priorityClassName }} + priorityClassName: "{{ .Values.vroom.priorityClassName }}" + {{- end }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-billing-metrics-consumer.yaml b/charts/sentry/templates/serviceaccount-sentry-billing-metrics-consumer.yaml new file mode 100644 index 0000000..10cc9b9 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-billing-metrics-consumer.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-billing-metrics-consumer +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-cleanup.yaml b/charts/sentry/templates/serviceaccount-sentry-cleanup.yaml new file mode 100644 index 0000000..422f647 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-cleanup.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-cleanup +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-cron.yaml b/charts/sentry/templates/serviceaccount-sentry-cron.yaml new file mode 100644 index 0000000..51f3f5e --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-cron.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-cron +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-generic-metrics-consumer.yaml b/charts/sentry/templates/serviceaccount-sentry-generic-metrics-consumer.yaml new file mode 100644 index 0000000..5c410f4 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-generic-metrics-consumer.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-generic-metrics-consumer +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-attachments.yaml b/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-attachments.yaml new file mode 100644 index 0000000..9544283 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-attachments.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-ingest-consumer-attachments +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-events.yaml b/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-events.yaml new file mode 100644 index 0000000..40b9b6e --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-events.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-ingest-consumer-events +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-transactions.yaml b/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-transactions.yaml new file mode 100644 index 0000000..4a08d21 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-ingest-consumer-transactions.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-ingest-consumer-transactions +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-ingest-monitors.yaml b/charts/sentry/templates/serviceaccount-sentry-ingest-monitors.yaml new file mode 100644 index 0000000..6160cfc --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-ingest-monitors.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-ingest-monitors +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-ingest-occurrences.yaml b/charts/sentry/templates/serviceaccount-sentry-ingest-occurrences.yaml new file mode 100644 index 0000000..457ca66 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-ingest-occurrences.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-ingest-occurrences +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-ingest-profiles.yaml b/charts/sentry/templates/serviceaccount-sentry-ingest-profiles.yaml new file mode 100644 index 0000000..725e5f8 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-ingest-profiles.yaml @@ -0,0 +1,10 @@ +{{- if and .Values.serviceAccount.enabled .Values.sentry.features.enableProfiling }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-ingest-profiles +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-ingest-replay-recordings.yaml b/charts/sentry/templates/serviceaccount-sentry-ingest-replay-recordings.yaml new file mode 100644 index 0000000..a29e44d --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-ingest-replay-recordings.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-ingest-replay-recordings +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-metrics-consumer.yaml b/charts/sentry/templates/serviceaccount-sentry-metrics-consumer.yaml new file mode 100644 index 0000000..976c666 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-metrics-consumer.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-metrics-consumer +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-errors.yaml b/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-errors.yaml new file mode 100644 index 0000000..a38e8fb --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-errors.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-post-process-forwarder-errors +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-issue-platform.yaml b/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-issue-platform.yaml new file mode 100644 index 0000000..31bc330 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-issue-platform.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-post-process-forwarder-issue-platform +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-transactions.yaml b/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-transactions.yaml new file mode 100644 index 0000000..3659704 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-post-process-forwarder-transactions.yaml @@ -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 }} diff --git a/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-events.yaml b/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-events.yaml new file mode 100644 index 0000000..7678d9c --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-events.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-subscription-consumer-events +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-generic-metrics.yaml b/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-generic-metrics.yaml new file mode 100644 index 0000000..04fd5fd --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-generic-metrics.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-subscription-consumer-generic-metrics +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-metrics.yaml b/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-metrics.yaml new file mode 100644 index 0000000..f084229 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-metrics.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-subscription-consumer-metrics +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-transactions.yaml b/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-transactions.yaml new file mode 100644 index 0000000..32af7cb --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-subscription-consumer-transactions.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-subscription-consumer-transactions +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-vroom.yaml b/charts/sentry/templates/serviceaccount-sentry-vroom.yaml new file mode 100644 index 0000000..814f939 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-vroom.yaml @@ -0,0 +1,10 @@ +{{- if and .Values.serviceAccount.enabled .Values.sentry.features.enableProfiling }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-vroom +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-web.yaml b/charts/sentry/templates/serviceaccount-sentry-web.yaml new file mode 100644 index 0000000..383ea19 --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-web.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-web +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }} diff --git a/charts/sentry/templates/serviceaccount-sentry-worker.yaml b/charts/sentry/templates/serviceaccount-sentry-worker.yaml new file mode 100644 index 0000000..1deb53b --- /dev/null +++ b/charts/sentry/templates/serviceaccount-sentry-worker.yaml @@ -0,0 +1,10 @@ +{{- if .Values.serviceAccount.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.serviceAccount.name }}-worker +{{- if .Values.serviceAccount.annotations }} + annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} +{{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} +{{- end }}