Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: ericsyh <[email protected]>
  • Loading branch information
ericsyh committed Dec 30, 2024
1 parent ad1114f commit fb4890d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/sn-platform/templates/bookkeeper/_autorecovery.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ${HOSTNAME}.{{ template "pulsar.autorecovery.service" . }}.{{ template "pulsar.n

{{/*Define autorecovery datadog annotation*/}}
{{- define "pulsar.autorecovery.datadog.annotation" -}}
{{- if .Values.datadog.components.autorecovery.enabled }}
{{- if eq .Values.datadog.adVersion "v1" }}
ad.datadoghq.com/{{ template "pulsar.autorecovery.podName" . }}.check_names: |
["openmetrics"]
Expand Down
47 changes: 47 additions & 0 deletions charts/sn-platform/templates/bookkeeper/_bookkeeper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Define bookkeeper log volumes
{{/*Define bookkeeper datadog annotation*/}}
{{- define "pulsar.bookkeeper.datadog.annotation" -}}
{{- if .Values.datadog.components.bookkeeper.enabled }}
{{- if eq .Values.datadog.adVersion "v1" }}
ad.datadoghq.com/{{ template "pulsar.bookkeeper.podName" . }}.check_names: |
["openmetrics"]
ad.datadoghq.com/{{ template "pulsar.bookkeeper.podName" . }}.init_configs: |
Expand Down Expand Up @@ -213,6 +214,52 @@ ad.datadoghq.com/{{ template "pulsar.bookkeeper.podName" . }}.instances: |
}
]
{{- end }}
{{- if eq .Values.datadog.adVersion "v2" }}
ad.datadoghq.com/{{ template "pulsar.bookkeeper.podName" . }}.checks: |
{
"openmetrics": {
"init_config": [{}],
"instances": [
{
"prometheus_url": "http://%%host%%:{{ .Values.bookkeeper.ports.http }}/metrics",
{{ if .Values.datadog.namespace -}}
"namespace": "{{ .Values.datadog.namespace }}",
{{ else -}}
"namespace": "{{ template "pulsar.namespace" . }}",
{{ end -}}
"metrics": {{ .Values.datadog.components.bookkeeper.metrics }},
"health_service_check": true,
"prometheus_timeout": 1000,
"max_returned_metrics": 1000000,
"type_overrides": {
"jvm_memory_bytes_used": "gauge",
"jvm_memory_bytes_committed": "gauge",
"jvm_memory_bytes_max": "gauge",
"jvm_memory_bytes_init": "gauge",
"jvm_memory_pool_bytes_used": "gauge",
"jvm_memory_pool_bytes_committed": "gauge",
"jvm_memory_pool_bytes_max": "gauge",
"jvm_memory_pool_bytes_init": "gauge",
"jvm_memory_direct_bytes_used": "gauge",
"jvm_threads_current": "gauge",
"jvm_threads_daemon": "gauge",
"jvm_threads_peak": "gauge",
"jvm_threads_started_total": "gauge",
"jvm_threads_deadlocked": "gauge",
"jvm_threads_deadlocked_monitor": "gauge",
"jvm_gc_collection_seconds_count": "gauge",
"jvm_gc_collection_seconds_sum": "gauge",
"jvm_memory_direct_bytes_max": "gauge"
},
"tags": [
"pulsar-bookie: {{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
]
}
]
}
}
{{- end }}
{{- end }}
{{- end }}

{{/*Define bookkeeper service account*/}}
Expand Down

0 comments on commit fb4890d

Please sign in to comment.