-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add monitorsClockTasks and monitorsClockTick (#1690)
- Loading branch information
1 parent
7ebb1f6
commit 1fe663d
Showing
5 changed files
with
440 additions
and
0 deletions.
There are no files selected for viewing
179 changes: 179 additions & 0 deletions
179
charts/sentry/templates/sentry/ingest/monitors/deployment-sentry-monitors-clock-tasks.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
{{- if .Values.sentry.monitorsClockTasks.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "sentry.fullname" . }}-monitors-clock-tasks | ||
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 }} | ||
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: monitors-clock-tasks | ||
{{- if not .Values.sentry.monitorsClockTasks.autoscaling.enabled }} | ||
replicas: {{ .Values.sentry.monitorsClockTasks.replicas }} | ||
{{- end }} | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/configYml: {{ .Values.config.configYml | toYaml | toString | sha256sum }} | ||
checksum/sentryConfPy: {{ .Values.config.sentryConfPy | sha256sum }} | ||
checksum/config.yaml: {{ include "sentry.config" . | sha256sum }} | ||
{{- if .Values.sentry.monitorsClockTasks.annotations }} | ||
{{ toYaml .Values.sentry.monitorsClockTasks.annotations | indent 8 }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
role: monitors-clock-tasks | ||
{{- if .Values.sentry.monitorsClockTasks.podLabels }} | ||
{{ toYaml .Values.sentry.monitorsClockTasks.podLabels | indent 8 }} | ||
{{- end }} | ||
spec: | ||
affinity: | ||
{{- if .Values.sentry.monitorsClockTasks.affinity }} | ||
{{ toYaml .Values.sentry.monitorsClockTasks.affinity | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTasks.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.sentry.monitorsClockTasks.nodeSelector | indent 8 }} | ||
{{- else if .Values.global.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.global.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTasks.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.sentry.monitorsClockTasks.tolerations | indent 8 }} | ||
{{- else if .Values.global.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.global.tolerations | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTasks.topologySpreadConstraints }} | ||
topologySpreadConstraints: | ||
{{ toYaml .Values.sentry.monitorsClockTasks.topologySpreadConstraints | 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.monitorsClockTasks.securityContext }} | ||
securityContext: | ||
{{ toYaml .Values.sentry.monitorsClockTasks.securityContext | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }}-monitors-clock-tasks | ||
image: "{{ template "sentry.image" . }}" | ||
imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} | ||
command: ["sentry"] | ||
args: | ||
- "run" | ||
- "consumer" | ||
- "monitors-clock-tasks" | ||
- "--consumer-group" | ||
- "monitors-clock-tasks" | ||
{{- if .Values.sentry.monitorsClockTasks.autoOffsetReset }} | ||
- "--auto-offset-reset" | ||
- "{{ .Values.sentry.monitorsClockTasks.autoOffsetReset }}" | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTasks.noStrictOffsetReset }} | ||
- "--no-strict-offset-reset" | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTasks.livenessProbe.enabled }} | ||
- "--healthcheck-file-path" | ||
- "/tmp/health.txt" | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTasks.livenessProbe.enabled }} | ||
livenessProbe: | ||
exec: | ||
command: | ||
- rm | ||
- /tmp/health.txt | ||
initialDelaySeconds: {{ .Values.sentry.monitorsClockTasks.livenessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.sentry.monitorsClockTasks.livenessProbe.periodSeconds }} | ||
{{- end }} | ||
env: | ||
- name: C_FORCE_ROOT | ||
value: "true" | ||
{{ include "sentry.env" . | indent 8 }} | ||
{{- if .Values.sentry.monitorsClockTasks.env }} | ||
{{ toYaml .Values.sentry.monitorsClockTasks.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.monitorsClockTasks.volumeMounts }} | ||
{{ toYaml .Values.sentry.monitorsClockTasks.volumeMounts | indent 8 }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.sentry.monitorsClockTasks.resources | indent 12 }} | ||
{{- if .Values.sentry.monitorsClockTasks.containerSecurityContext }} | ||
securityContext: | ||
{{ toYaml .Values.sentry.monitorsClockTasks.containerSecurityContext | indent 12 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTasks.sidecars }} | ||
{{ toYaml .Values.sentry.monitorsClockTasks.sidecars | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.global.sidecars }} | ||
{{ toYaml .Values.global.sidecars | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.serviceAccount.enabled }} | ||
serviceAccountName: {{ .Values.serviceAccount.name }}-monitors-clock-tasks | ||
{{- 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.monitorsClockTasks.volumes }} | ||
{{ toYaml .Values.sentry.monitorsClockTasks.volumes | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.global.volumes }} | ||
{{ toYaml .Values.global.volumes | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTasks.priorityClassName }} | ||
priorityClassName: "{{ .Values.sentry.monitorsClockTasks.priorityClassName }}" | ||
{{- end }} | ||
{{- end }} |
179 changes: 179 additions & 0 deletions
179
charts/sentry/templates/sentry/ingest/monitors/deployment-sentry-monitors-clock-tick.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
{{- if .Values.sentry.monitorsClockTick.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "sentry.fullname" . }}-monitors-clock-tick | ||
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 }} | ||
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: monitors-clock-tick | ||
{{- if not .Values.sentry.monitorsClockTick.autoscaling.enabled }} | ||
replicas: {{ .Values.sentry.monitorsClockTick.replicas }} | ||
{{- end }} | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/configYml: {{ .Values.config.configYml | toYaml | toString | sha256sum }} | ||
checksum/sentryConfPy: {{ .Values.config.sentryConfPy | sha256sum }} | ||
checksum/config.yaml: {{ include "sentry.config" . | sha256sum }} | ||
{{- if .Values.sentry.monitorsClockTick.annotations }} | ||
{{ toYaml .Values.sentry.monitorsClockTick.annotations | indent 8 }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "sentry.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
role: monitors-clock-tick | ||
{{- if .Values.sentry.monitorsClockTick.podLabels }} | ||
{{ toYaml .Values.sentry.monitorsClockTick.podLabels | indent 8 }} | ||
{{- end }} | ||
spec: | ||
affinity: | ||
{{- if .Values.sentry.monitorsClockTick.affinity }} | ||
{{ toYaml .Values.sentry.monitorsClockTick.affinity | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTick.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.sentry.monitorsClockTick.nodeSelector | indent 8 }} | ||
{{- else if .Values.global.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.global.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTick.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.sentry.monitorsClockTick.tolerations | indent 8 }} | ||
{{- else if .Values.global.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.global.tolerations | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTick.topologySpreadConstraints }} | ||
topologySpreadConstraints: | ||
{{ toYaml .Values.sentry.monitorsClockTick.topologySpreadConstraints | 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.monitorsClockTick.securityContext }} | ||
securityContext: | ||
{{ toYaml .Values.sentry.monitorsClockTick.securityContext | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }}-monitors-clock-tick | ||
image: "{{ template "sentry.image" . }}" | ||
imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} | ||
command: ["sentry"] | ||
args: | ||
- "run" | ||
- "consumer" | ||
- "monitors-clock-tick" | ||
- "--consumer-group" | ||
- "monitors-clock-tick" | ||
{{- if .Values.sentry.monitorsClockTick.autoOffsetReset }} | ||
- "--auto-offset-reset" | ||
- "{{ .Values.sentry.monitorsClockTick.autoOffsetReset }}" | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTick.noStrictOffsetReset }} | ||
- "--no-strict-offset-reset" | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTick.livenessProbe.enabled }} | ||
- "--healthcheck-file-path" | ||
- "/tmp/health.txt" | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTick.livenessProbe.enabled }} | ||
livenessProbe: | ||
exec: | ||
command: | ||
- rm | ||
- /tmp/health.txt | ||
initialDelaySeconds: {{ .Values.sentry.monitorsClockTick.livenessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.sentry.monitorsClockTick.livenessProbe.periodSeconds }} | ||
{{- end }} | ||
env: | ||
- name: C_FORCE_ROOT | ||
value: "true" | ||
{{ include "sentry.env" . | indent 8 }} | ||
{{- if .Values.sentry.monitorsClockTick.env }} | ||
{{ toYaml .Values.sentry.monitorsClockTick.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.monitorsClockTick.volumeMounts }} | ||
{{ toYaml .Values.sentry.monitorsClockTick.volumeMounts | indent 8 }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.sentry.monitorsClockTick.resources | indent 12 }} | ||
{{- if .Values.sentry.monitorsClockTick.containerSecurityContext }} | ||
securityContext: | ||
{{ toYaml .Values.sentry.monitorsClockTick.containerSecurityContext | indent 12 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTick.sidecars }} | ||
{{ toYaml .Values.sentry.monitorsClockTick.sidecars | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.global.sidecars }} | ||
{{ toYaml .Values.global.sidecars | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.serviceAccount.enabled }} | ||
serviceAccountName: {{ .Values.serviceAccount.name }}-monitors-clock-tick | ||
{{- 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.monitorsClockTick.volumes }} | ||
{{ toYaml .Values.sentry.monitorsClockTick.volumes | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.global.volumes }} | ||
{{ toYaml .Values.global.volumes | indent 6 }} | ||
{{- end }} | ||
{{- if .Values.sentry.monitorsClockTick.priorityClassName }} | ||
priorityClassName: "{{ .Values.sentry.monitorsClockTick.priorityClassName }}" | ||
{{- end }} | ||
{{- end }} |
10 changes: 10 additions & 0 deletions
10
...s/sentry/templates/sentry/ingest/monitors/serviceaccount-sentry-monitors-clock-tasks.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.serviceAccount.enabled .Values.sentry.monitorsClockTasks.enabled }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.serviceAccount.name }}-monitors-clock-tasks | ||
{{- if .Values.serviceAccount.annotations }} | ||
annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} | ||
{{- end }} | ||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} | ||
{{- end }} |
10 changes: 10 additions & 0 deletions
10
...ts/sentry/templates/sentry/ingest/monitors/serviceaccount-sentry-monitors-clock-tick.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.serviceAccount.enabled .Values.sentry.monitorsClockTick.enabled }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.serviceAccount.name }}-monitors-clock-tick | ||
{{- if .Values.serviceAccount.annotations }} | ||
annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }} | ||
{{- end }} | ||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} | ||
{{- end }} |
Oops, something went wrong.