You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2026/03/21 20:18:12 UTC

(spark-kubernetes-operator) branch main updated: [SPARK-56078] Expose `failureThreshold` and `timeoutSeconds` in operator livenessProbe schema

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

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 4fdf39b  [SPARK-56078] Expose `failureThreshold` and `timeoutSeconds` in operator livenessProbe schema
4fdf39b is described below

commit 4fdf39b82a99ab9f6289110af701ef2e30401bf0
Author: Dan Baron <da...@starlingbank.com>
AuthorDate: Sat Mar 21 13:18:05 2026 -0700

    [SPARK-56078] Expose `failureThreshold` and `timeoutSeconds` in operator livenessProbe schema
    
    ### What changes were proposed in this pull request?
    
    https://issues.apache.org/jira/browse/SPARK-56078.
    
    This PR exposes the `failureThreshold` and `timeoutSeconds` configurations of the `livenessProbe` of the operator Pod in the values schema.
    
    These configurations already exist therefore there are no behavioural changes here, but this saves developer time when attempting to configure the `livenessProbe`.
    
    They're used [here](https://github.com/apache/spark-kubernetes-operator/blob/main/build-tools/helm/spark-kubernetes-operator/templates/spark-operator.yaml#L140) in the operator pod and [here](https://github.com/apache/spark-kubernetes-operator/blob/main/build-tools/helm/spark-kubernetes-operator/templates/_helpers.tpl#L149) in the helpers template.
    
    ### Why are the changes needed?
    
    All `livenessProbe` configurations are not exposed in the values schema, making configuring the `livenessProbe` difficult when consulting only the information present in [ArtifactHub](https://artifacthub.io/packages/helm/spark-kubernetes-operator/spark-kubernetes-operator?modal=values-schema).
    
    At my company we recently needed to alter these and did so using patches as we were not aware that these configurations were available. The reason we needed to alter them was due to the livenessProbe eagerly killing our container whenever connections with the Kube API server reset. Being able to set these resolved our issue.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes, this additive change should more closely reflect the configurations available for the `livenessProbe` in the values schema reference.
    
    ### How was this patch tested?
    
    Passes all github actions on my local forked PR.
    
    #### Local happy path testing
    Tested the happy path by using `helm lint build-tools/helm/spark-kubernetes-operator/`, output:
    ```
    ==> Linting build-tools/helm/spark-kubernetes-operator/
    
    1 chart(s) linted, 0 chart(s) failed
    ```
    
    #### Local sad path testing
    Tested the sad path by setting `timeoutSeconds` to `-1`, output:
    ```
    ==> Linting build-tools/helm/spark-kubernetes-operator/
    [ERROR] values.yaml: - at '/operatorDeployment/operatorPod/operatorContainer/probes/livenessProbe/timeoutSeconds': minimum: got -1, want 1
    
    [ERROR] templates/: values don't meet the specifications of the schema(s) in the following chart(s):
    spark-kubernetes-operator:
    - at '/operatorDeployment/operatorPod/operatorContainer/probes/livenessProbe/timeoutSeconds': minimum: got -1, want 1
    
    Error: 1 chart(s) linted, 1 chart(s) failed
    ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #553 from danbaron63/exposing-liveness-probe-confiurations-in-values-schema.
    
    Authored-by: Dan Baron <da...@starlingbank.com>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 build-tools/helm/spark-kubernetes-operator/values.schema.json | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/build-tools/helm/spark-kubernetes-operator/values.schema.json b/build-tools/helm/spark-kubernetes-operator/values.schema.json
index 26ac0af..1e884d5 100644
--- a/build-tools/helm/spark-kubernetes-operator/values.schema.json
+++ b/build-tools/helm/spark-kubernetes-operator/values.schema.json
@@ -229,6 +229,16 @@
                           "type": "integer",
                           "description": "Initial delay before probing",
                           "minimum": 0
+                        },
+                        "failureThreshold": {
+                          "type": "integer",
+                          "description": "Number of failures in a row before the overall check is considered failed",
+                          "minimum": 1
+                        },
+                        "timeoutSeconds": {
+                          "type": "integer",
+                          "description": "Number of seconds after which the probe times out",
+                          "minimum": 1
                         }
                       }
                     },


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org