apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: {{ template "artifactory-ha.fullname" . }}-node
  labels:
    app: {{ template "artifactory-ha.name" . }}
    chart: {{ template "artifactory-ha.chart" . }}
    component: {{ .Values.artifactory.name }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
spec:
  selector:
    matchLabels:
      app: {{ template "artifactory-ha.name" . }}
      {{- if eq .Values.artifactory.service.pool "members" }}
      role: {{ template "artifactory-ha.node.name" . }}
      {{- end }}
      release: {{ .Release.Name }}
  minAvailable: {{ .Values.artifactory.node.minAvailable }}
