This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 36ac509f8f6 feat(helm): add pdb for minion and minion-stateless 
(#17538)
36ac509f8f6 is described below

commit 36ac509f8f61a4712548d7781c9f87360b9232ee
Author: Povilas Vaitkus <[email protected]>
AuthorDate: Sat Jan 31 07:32:32 2026 +0200

    feat(helm): add pdb for minion and minion-stateless (#17538)
    
    thanks for the contribution
---
 .../minion-stateless/poddisruptionbudget.yaml      | 44 ++++++++++++++++++++++
 .../templates/minion/poddisruptionbudget.yaml      | 44 ++++++++++++++++++++++
 helm/pinot/values.yaml                             | 17 +++++++--
 3 files changed, 102 insertions(+), 3 deletions(-)

diff --git a/helm/pinot/templates/minion-stateless/poddisruptionbudget.yaml 
b/helm/pinot/templates/minion-stateless/poddisruptionbudget.yaml
new file mode 100644
index 00000000000..ed3e88bf6a9
--- /dev/null
+++ b/helm/pinot/templates/minion-stateless/poddisruptionbudget.yaml
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+{{- $pdb := .Values.minionStateless.pdb }}
+
+{{- if $pdb.enabled }}
+{{- if and $pdb.minAvailable $pdb.maxUnavailable }}
+{{- fail "minionStateless.pdb: specify only one of minAvailable or 
maxUnavailable" }}
+{{- end }}
+{{- if not (or $pdb.minAvailable $pdb.maxUnavailable) }}
+{{- fail "minionStateless.pdb: when enabled is true, you must set either 
minAvailable or maxUnavailable" }}
+{{- end }}
+
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "pinot.minionStateless.fullname" . }}
+  namespace: {{ include "pinot.namespace" . }}
+spec:
+  {{- if $pdb.minAvailable }}
+  minAvailable: {{ $pdb.minAvailable }}
+  {{- else }}
+  maxUnavailable: {{ $pdb.maxUnavailable }}
+  {{- end }}
+  selector:
+    matchLabels:
+      {{- include "pinot.minionStatelessMatchLabels" . | nindent 6 }}
+{{- end }}
diff --git a/helm/pinot/templates/minion/poddisruptionbudget.yaml 
b/helm/pinot/templates/minion/poddisruptionbudget.yaml
new file mode 100644
index 00000000000..c358f307b39
--- /dev/null
+++ b/helm/pinot/templates/minion/poddisruptionbudget.yaml
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+{{- $pdb := .Values.minion.pdb }}
+
+{{- if $pdb.enabled }}
+{{- if and $pdb.minAvailable $pdb.maxUnavailable }}
+{{- fail "minion.pdb: specify only one of minAvailable or maxUnavailable" }}
+{{- end }}
+{{- if not (or $pdb.minAvailable $pdb.maxUnavailable) }}
+{{- fail "minion.pdb: when enabled is true, you must set either minAvailable 
or maxUnavailable" }}
+{{- end }}
+
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "pinot.minion.fullname" . }}
+  namespace: {{ include "pinot.namespace" . }}
+spec:
+  {{- if $pdb.minAvailable }}
+  minAvailable: {{ $pdb.minAvailable }}
+  {{- else }}
+  maxUnavailable: {{ $pdb.maxUnavailable }}
+  {{- end }}
+  selector:
+    matchLabels:
+      {{- include "pinot.minionMatchLabels" . | nindent 6 }}
+{{- end }}
diff --git a/helm/pinot/values.yaml b/helm/pinot/values.yaml
index 79d452db33c..a9f095817a0 100644
--- a/helm/pinot/values.yaml
+++ b/helm/pinot/values.yaml
@@ -150,7 +150,7 @@ controller:
   pluginsDir: /opt/pinot/plugins
 
   pdb:
-    enabled: false 
+    enabled: false
     minAvailable: ""
     maxUnavailable: 50%
 
@@ -445,7 +445,7 @@ server:
   pluginsDir: /opt/pinot/plugins
 
   pdb:
-    enabled: false 
+    enabled: false
     minAvailable: ""
     maxUnavailable: 1
 
@@ -631,6 +631,11 @@ minion:
     configs: |-
       pinot.set.instance.id.to.hostname=true
 
+  # In a PodDisruptionBudget, only one of minAvailable or maxUnavailable may 
be set.
+  # By default we use maxUnavailable; override this section if you prefer 
minAvailable.
+  pdb:
+    enabled: false
+    maxUnavailable: 1
 
 # 
------------------------------------------------------------------------------
 # Pinot Minion Stateless:
@@ -699,7 +704,7 @@ minionStateless:
       # - containerPort: 1234
       #   protocol: PROTOCOL
       #   name: extra-port
-      
+
   resources:
     requests:
       memory: "1.25Gi"
@@ -736,6 +741,12 @@ minionStateless:
     configs: |-
       pinot.set.instance.id.to.hostname=true
 
+  # In a PodDisruptionBudget, only one of minAvailable or maxUnavailable may 
be set.
+  # By default we use maxUnavailable; override this section if you prefer 
minAvailable.
+  pdb:
+    enabled: false
+    maxUnavailable: 1
+
 # 
------------------------------------------------------------------------------
 # Zookeeper:
 # NOTE: IN PRODUCTION USE CASES, IT's BEST TO USE ZOOKEEPER K8S OPERATOR


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to