Skip to content

Some leader election CLI arguments have no effect #2640

@Tom-Newton

Description

@Tom-Newton

What happened?

  • ✋ I have searched the open/closed issues and my issue is not listed.

I've been setting the following arguments when launching the Spark operator controller

        --leader-election-lease-duration=120s
        --leader-election-renew-deadline=110s
        --leader-election-retry-period=5s

(these are not exposed in the helm chart so I configured them with a helm postrender)

However these options don't seem to have any effect

$ kubectl get leases spark-spark-operator-controller-lock -n infrastructure--helm--spark -o yaml
apiVersion: coordination.k8s.io/v1
kind: Lease
metadata:
  creationTimestamp: "2025-07-24T13:53:44Z"
  name: spark-spark-operator-controller-lock
  namespace: infrastructure--helm--spark
  resourceVersion: "55804391"
  uid: e02c7ed1-88d8-47f9-b4c6-d8a9423445bd
spec:
  acquireTime: "2025-08-24T01:17:24.488294Z"
  holderIdentity: spark-spark-operator-controller-b4fc6fb4c-tnk56_b9e3e4cb-4fd8-4249-8ba9-90fc0209ddca
  leaseDurationSeconds: 15
  leaseTransitions: 10
  renewTime: "2025-08-29T09:55:53.854715Z"

We can see the lease duration is 15 seconds not the 120s that I configured.

Reproduction Code

Deploy spark operator using --leader-election-lease-duration=120s on the controller.

Expected behavior

Lease duration should now by 120 seconds

Actual behavior

It remains at the default of 15 seconds

Environment & Versions

  • Kubernetes Version: Azure kubernetes service 1.31.9
  • Spark Operator Version: 2.1.1
  • Apache Spark Version: 3.5.3

Additional context

If you look at the code all these variables get set by the CLI interface, but they don't seem to be used by anything.

Impacted by this bug?

Give it a 👍 We prioritize the issues with most 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions