Files
Rishabh SinghandGitHub 20c122c4c7 feat(kustomize): Add core deployment infrastructure and E2E test suite (#2919)
- Add complete Kustomize manifests in config/ for deploying the Spark
  Operator without Helm
- Tighten webhook ClusterRole to least privilege
- Add DEPLOY_METHOD=kustomize support in test/e2e/suite_test.go so the
  same Ginkgo e2e suite runs against both Helm and Kustomize
- Replace bash test scripts with Go kustomize lint test
  (test/kustomize/kustomize_build_test.go)
- Fix subPath removal in webhook deployment, rename Namespace to
  spark-operator, quote empty apiGroups in kubebuilder RBAC markers

fix(kustomize): Align naming, RBAC, and service config with Helm chart

- Rename all resources to spark-operator-{controller,webhook} for
  consistency with Helm
- Rename webhook Service from webhook-service to spark-operator-webhook-svc,
  add named port (webhook), and use named targetPort
- Add replacements directive to propagate Service name into webhook
  configurations (survives controller-gen regeneration of manifests.yaml)
- Expand webhook ClusterRole: add events, pods, resourcequotas (get/list/watch),
  scheduledsparkapplications, and status/finalizers subresources
- Add events: create,patch to webhook Role for leader election
- Fix kustomizeconfig.yaml namespace.create: true → false
- Remove params.env and ConfigMap-based image parameterization; replace
  with kustomize images directive using newTag from VERSION file
  (simpler, standard kustomize pattern, updated via make kustomize-set-image)
- UpdateRD patches to reference new webhook service name



refactor(kustomize): Address PR review - extract spark RBAC, fix test image handling

- Move spark-job RBAC (SA, Role, RoleBinding) from config/rbac/ to
  config/spark-rbac/ as a standalone kustomization that users apply to
  application namespaces separately from operator infrastructure
- Remove hardcoded fallback image from installViaKustomize(); only
  override kustomization.yaml when SPARK_OPERATOR_IMAGE is explicitly set
- Remove events permission from webhook Role (kept in ClusterRole for
  Helm parity)
- Replace programmatic createSparkJobRBAC/cleanupSparkJobRBAC with
  kubectl apply/delete -k config/spark-rbac/ -n default
- Update lint test resource counts to reflect new architecture
- fix(test): Use IMAGE_TAG instead of SPARK_OPERATOR_IMAGE for Kustomize e2e

Signed-off-by: roburishabh <[email protected]>
2026-05-05 15:57:46 +00:00

11 lines
273 B
YAML

apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: true
metadata:
name: spark-operator-webhook
namespace: system
labels:
app.kubernetes.io/name: spark-operator
app.kubernetes.io/instance: spark-operator
app.kubernetes.io/component: webhook