Skip to content

Commit 9a83d4f

Browse files
[release-2.5] Fix duplicate webhook patch and add missing ScheduledSparkApplication Patches (#2875)
The kustomization.yaml had a duplicate entry for webhook_in_sparkapplications.yaml which appears to be a copy-paste error from the controller-runtime refactor. This commit: - Fixes the duplicate webhook patch entry in config/crd/kustomization.yaml - Adds webhook_in_scheduledsparkapplications.yaml for conversion webhook support - Adds cainjection_in_scheduledsparkapplications.yaml for cert-manager CA injection Both CRDs (SparkApplication and ScheduledSparkApplication) now have corresponding webhook and CA injection patch files, matching the intended kustomize configuration. Signed-off-by: roburishabh <roburishabh@outlook.com> Co-authored-by: roburishabh <roburishabh@outlook.com>
1 parent 94db694 commit 9a83d4f

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

config/crd/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ patches:
1010
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1111
# patches here are for enabling the conversion webhook for each CRD
1212
- path: patches/webhook_in_sparkapplications.yaml
13-
- path: patches/webhook_in_sparkapplications.yaml
13+
- path: patches/webhook_in_scheduledsparkapplications.yaml
1414
# +kubebuilder:scaffold:crdkustomizewebhookpatch
1515

1616
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# The following patch adds a directive for certmanager to inject CA into the CRD
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
7+
name: scheduledsparkapplications.sparkoperator.k8s.io
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# The following patch enables a conversion webhook for the CRD
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: scheduledsparkapplications.sparkoperator.k8s.io
6+
spec:
7+
conversion:
8+
strategy: Webhook
9+
webhook:
10+
clientConfig:
11+
service:
12+
namespace: system
13+
name: webhook-service
14+
path: /convert
15+
conversionReviewVersions:
16+
- v1

0 commit comments

Comments
 (0)