fix(crd): Add missing SparkConnect CRD resource and patches to kustomization#2890
fix(crd): Add missing SparkConnect CRD resource and patches to kustomization#2890RobuRishabh wants to merge 1 commit intokubeflow:masterfrom
Conversation
…ization This commit: - Adds bases/sparkoperator.k8s.io_sparkconnects.yaml to the resources list - Creates webhook_in_sparkconnects.yaml for conversion webhook support - Creates cainjection_in_sparkconnects.yaml for cert-manager CA injection - Adds both patches to kustomization.yaml Signed-off-by: roburishabh <roburishabh@outlook.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR fixes the CRD kustomize package to include the missing SparkConnect CRD and aligns it with the existing pattern used for SparkApplication and ScheduledSparkApplication, ensuring Kustomize-based installs can use SparkConnect (Spark 3.4+).
Changes:
- Add the SparkConnect CRD base manifest to
config/crd/kustomization.yamlresources. - Add a conversion webhook patch for the SparkConnect CRD.
- Add a (commented, opt-in) cert-manager CA injection patch for the SparkConnect CRD.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| config/crd/kustomization.yaml | Includes SparkConnect CRD and wires in webhook + (optional) CA injection patches consistent with existing CRDs. |
| config/crd/patches/webhook_in_sparkconnects.yaml | Enables CRD conversion webhook for SparkConnect via the same service/path pattern as other CRDs. |
| config/crd/patches/cainjection_in_sparkconnects.yaml | Adds cert-manager CA injection annotation for SparkConnect CRD (matching existing placeholder convention). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Purpose of this PR
The
config/crd/kustomization.yamlwas missing the SparkConnect CRD resource and its corresponding webhook and CA injection patches. This caused a significant feature gap where Kustomize users could not access SparkConnect features (Spark 3.4+), despite the base CRD manifest, controller reconciler, and admission webhooks all being in place.This is a follow-up to PR #2820, which fixed the duplicate webhook patch and added missing ScheduledSparkApplication patches.
Proposed changes:
bases/sparkoperator.k8s.io_sparkconnects.yamlto theresourceslist inconfig/crd/kustomization.yamlpatches/webhook_in_sparkconnects.yamlto enable conversion webhook for the SparkConnect CRDpatches/cainjection_in_sparkconnects.yamlto enable cert-manager CA injection for the SparkConnect CRDkustomization.yamlunder the appropriate webhook and certmanager sectionsChange Category
Rationale
The SparkConnect CRD base manifest (
bases/sparkoperator.k8s.io_sparkconnects.yaml) already exists and is generated bycontroller-gen. The controller registers a reconciler for SparkConnect incmd/operator/controller/start.go, and the webhook server registers both mutating and validating admission hooks for SparkConnect incmd/operator/webhook/start.goandconfig/webhook/manifests.yaml. However, the Kustomize configuration never included this CRD, meaningkustomize build config/crdonly produced 2 CRDs instead of the expected 3. This brings Kustomize deployments to full parity with Helm.Checklist