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

rom pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 49b172f73f feat: allow customizing podManagementPolicy (#42673)
49b172f73f is described below

commit 49b172f73f8f3dd1cab069fed3863b917b2eb1c4
Author: Everton Seiei Arakaki <[email protected]>
AuthorDate: Tue Oct 8 16:32:22 2024 +0200

    feat: allow customizing podManagementPolicy (#42673)
    
    * feat: allow customizing podManagementPolicy
    
    * fix: adjust schema and identation
    
    * ci: adjust lint
    
    ---------
    
    Co-authored-by: Arakaki, Everton <[email protected]>
---
 chart/templates/workers/worker-deployment.yaml |  3 +++
 chart/values.schema.json                       | 12 ++++++++++++
 chart/values.yaml                              |  3 +++
 3 files changed, 18 insertions(+)

diff --git a/chart/templates/workers/worker-deployment.yaml 
b/chart/templates/workers/worker-deployment.yaml
index 23852d3427..5499e64ebe 100644
--- a/chart/templates/workers/worker-deployment.yaml
+++ b/chart/templates/workers/worker-deployment.yaml
@@ -74,6 +74,9 @@ spec:
       tier: airflow
       component: worker
       release: {{ .Release.Name }}
+  {{- if and $persistence .Values.workers.podManagementPolicy }}
+  podManagementPolicy: {{ .Values.workers.podManagementPolicy }}
+  {{- end }}
   {{- if and $persistence .Values.workers.updateStrategy }}
   updateStrategy: {{- toYaml .Values.workers.updateStrategy | nindent 4 }}
   {{- end }}
diff --git a/chart/values.schema.json b/chart/values.schema.json
index 6cf6fea9f6..0f93773dfd 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -1598,6 +1598,18 @@
                     ],
                     "default": null
                 },
+                "podManagementPolicy": {
+                    "description": "Specifies the policy for managing pods 
within the worker. Only applicable to StatefulSet.",
+                    "type": [
+                        "null",
+                        "string"
+                    ],
+                    "default": null,
+                    "enum": [
+                        "OrderedReady",
+                        "Parallel"
+                    ]
+                },
                 "strategy": {
                     "description": "Specifies the strategy used to replace old 
Pods by new ones when deployed as a Deployment.",
                     "type": [
diff --git a/chart/values.yaml b/chart/values.yaml
index f18d971fe6..9d4bcf2ca0 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -590,6 +590,9 @@ workers:
       maxSurge: "100%"
       maxUnavailable: "50%"
 
+  # Allow relaxing ordering guarantees while preserving its uniqueness and 
identity
+  # podManagementPolicy: Parallel
+
   # When not set, the values defined in the global securityContext will be used
   securityContext: {}
   #  runAsUser: 50000

Reply via email to