poddisruptionbudget-memcached-frontend.yaml 773 B

1234567891011121314151617181920
  1. {{- if and .Values.memcachedFrontend.enabled (gt (int .Values.memcachedFrontend.replicas) 1) }}
  2. {{- if not .Values.memcachedFrontend.maxUnavailable }}
  3. {{- fail "`.Values.memcachedFrontend.maxUnavailable` must be set when `.Values.memcachedFrontend.replicas` is greater than 1." }}
  4. {{- else }}
  5. apiVersion: {{ include "loki.pdb.apiVersion" . }}
  6. kind: PodDisruptionBudget
  7. metadata:
  8. name: {{ include "loki.memcachedFrontendFullname" . }}
  9. namespace: {{ .Release.Namespace }}
  10. labels:
  11. {{- include "loki.memcachedFrontendLabels" . | nindent 4 }}
  12. spec:
  13. selector:
  14. matchLabels:
  15. {{- include "loki.memcachedFrontendSelectorLabels" . | nindent 6 }}
  16. {{- with .Values.memcachedFrontend.maxUnavailable }}
  17. maxUnavailable: {{ . }}
  18. {{- end }}
  19. {{- end }}
  20. {{- end }}