# grafana_charts_poddisruptionbudget-metrics-generator.yaml
{{- if .Values.metricsGenerator.enabled }}
{{- if and (gt (int .Values.metricsGenerator.replicas) 1) .Values.metricsGenerator.podDisruptionBudget.enabled }}
{{ $dict := dict "ctx" . "component" "metrics-generator" "memberlist" true }}
apiVersion: {{ include "tempo.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
  name: {{ include "tempo.resourceName" $dict }}
  labels:
    {{- include "tempo.labels" $dict | nindent 4 }}
  namespace: {{ .Release.Namespace }}
spec:
  selector:
    matchLabels:
      {{- include "tempo.selectorLabels" $dict | nindent 6 }}
  maxUnavailable: {{ .Values.metricsGenerator.maxUnavailable }}
{{- end }}
{{- end }}