Sitelet https://github.com/kubeflow/spark-operator/pull/3111
Skip to content

fix(webhook): generate valid volume name for Prometheus ConfigMap - #3111

Open
rjgoyln wants to merge 1 commit into
kubeflow:masterfrom
rjgoyln:fix/prometheus-configmap-volume-name
Open

fix(webhook): generate valid volume name for Prometheus ConfigMap#3111
rjgoyln wants to merge 1 commit into
kubeflow:masterfrom
rjgoyln:fix/prometheus-configmap-volume-name

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Aug 23, 2026

Copy link
Copy Markdown

Summary

addPrometheusConfig still derives <configmap name>-vol, the shape #3099 replaced for spec.driver.configMaps. A SparkApplication name only has to be a DNS-1035 label, so once it reaches 50 characters the derived volume name passes 63 and Kubernetes rejects every driver and executor pod of that application. The Prometheus ConfigMap itself stays valid, so nothing catches it earlier.

TestGetConfigMapVolumeName gains the two cases either side of that limit, since today its <= can be flipped to < unnoticed.

Closes #3102

Change Category

  • Bugfix (non-breaking change which fixes an issue)

Checklist

  • I have conducted a self-review of my own code.
  • I have added tests that prove my changes are effective or that my feature works.
  • Existing unit tests pass locally with my changes.

Additional Notes

The TestPatchSparkPod_PrometheusConfigMaps block commented out in #2072 sits below the new test and still asserts the old naming. Happy to drop it here.

@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jacobsalway for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow
google-oss-prow Bot requested review from ImpSy and tariq-hasan August 23, 2026 11:51
@github-actions

Copy link
Copy Markdown

🎉 Welcome to the Kubeflow Spark Operator! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

@rjgoyln
rjgoyln force-pushed the fix/prometheus-configmap-volume-name branch from 17729f9 to 3fe1edf Compare August 23, 2026 12:13
A SparkApplication name may be up to 63 characters, so appending the
Prometheus ConfigMap and volume suffixes overshoots the volume name limit
and Kubernetes rejects every driver and executor pod of the application.

Signed-off-by: rjgoyln <pt40419@gmail.com>
@rjgoyln
rjgoyln force-pushed the fix/prometheus-configmap-volume-name branch from 3fe1edf to 2281ee4 Compare August 24, 2026 07:59
@rjgoyln
rjgoyln marked this pull request as ready for review August 24, 2026 08:10
Copilot AI balanced review requested due to automatic review settings August 24, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Prometheus ConfigMap volume name

2 participants