diff --git a/charts/trino/templates/poddisruptionbudget-coordinator.yaml b/charts/trino/templates/poddisruptionbudget-coordinator.yaml new file mode 100644 index 00000000..fd66dd3c --- /dev/null +++ b/charts/trino/templates/poddisruptionbudget-coordinator.yaml @@ -0,0 +1,16 @@ +{{- with .Values.coordinator.podDisruptionBudget }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "trino.coordinator" $ }} + namespace: {{ $.Release.Namespace }} + labels: + {{- include "trino.labels" $ | nindent 4 }} + app.kubernetes.io/component: coordinator +spec: + selector: + matchLabels: + {{- include "trino.selectorLabels" $ | nindent 6 }} + app.kubernetes.io/component: coordinator + {{- toYaml . | nindent 2 }} +{{- end }} \ No newline at end of file diff --git a/charts/trino/templates/poddisruptionbudget-worker.yaml b/charts/trino/templates/poddisruptionbudget-worker.yaml new file mode 100644 index 00000000..7e7faa8c --- /dev/null +++ b/charts/trino/templates/poddisruptionbudget-worker.yaml @@ -0,0 +1,18 @@ +{{- if gt (int .Values.server.workers) 0 }} +{{- with .Values.worker.podDisruptionBudget }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "trino.worker" $ }} + namespace: {{ $.Release.Namespace }} + labels: + {{- include "trino.labels" $ | nindent 4 }} + app.kubernetes.io/component: worker +spec: + selector: + matchLabels: + {{- include "trino.selectorLabels" $ | nindent 6 }} + app.kubernetes.io/component: worker + {{- toYaml . | nindent 2 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index d412b0be..7dfb6004 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -612,6 +612,18 @@ coordinator: maxUnavailable: 25% # coordinator.deployment.strategy -- The deployment strategy to use to replace existing pods with new ones. + podDisruptionBudget: {} + # coordinator.podDisruptionBudget -- [Pod Disruption Budget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) configuration. + # @raw + # Example: + # ```yaml + # minAvailable: 1 + # ``` + # or + # ```yaml + # maxUnavailable: 1 + # ``` + jvm: maxHeapSize: "8G" gcMethod: @@ -797,6 +809,18 @@ worker: maxUnavailable: 25% # worker.deployment.strategy -- The deployment strategy to use to replace existing pods with new ones. + podDisruptionBudget: {} + # worker.podDisruptionBudget -- [Pod Disruption Budget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) configuration. + # @raw + # Example: + # ```yaml + # maxUnavailable: 1 + # ``` + # or + # ```yaml + # minAvailable: 2 + # ``` + jvm: maxHeapSize: "8G" gcMethod: