{{- if .Values.checksAgent.enabled }} {{- if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }} apiVersion: policy/v1 {{- else }} apiVersion: policy/v1beta1 {{- end }} kind: PodDisruptionBudget metadata: name: {{ .Release.Name }}-checks-agent labels: {{ include "stackstate-k8s-agent.labels" . | indent 4 }} {{ include "stackstate-k8s-agent.global.extraLabels" . | indent 4 }} app.kubernetes.io/component: checks-agent annotations: {{ include "stackstate-k8s-agent.global.extraAnnotations" . | indent 4 }} spec: maxUnavailable: 1 selector: matchLabels: app.kubernetes.io/component: checks-agent app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/name: {{ include "stackstate-k8s-agent.name" . }} {{- end -}}