Skip to content

Implement validation logic for ScheduledSparkApplication webhook #2837

@puwun

Description

@puwun

What feature you would like to be added?

Implement the empty validate() function in ScheduledSparkApplicationValidator

func (v *ScheduledSparkApplicationValidator) validate(_ *v1beta2.ScheduledSparkApplication) error {
// TODO: implement validate logic
return nil
}

Why is this needed?

Invalid Schedule and TimeZone are currently caught in the controller, not the webhook. This means invalid resources are created and then marked as FailedValidation in status. Moving validation to webhook would reject invalid resources at creation time.

Describe the solution you would like

Move existing controller validation to webhook:

  • Schedule: Cron syntax via cron.ParseStandard()
  • TimeZone: time.LoadLocation() validation

Describe alternatives you have considered

Keep the current behaviour or remove validate() and its call sites entirely.

Additional context

No response

Love this feature?

Give it a 👍 We prioritize the features with most 👍

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions