Skip to content

Conversation

@patrykw-splunk
Copy link
Collaborator

Description

Thats a PR to Feature Branch

This PR implements a centralized validation webhook for all Splunk Enterprise CRDs. The webhook validates spec fields on CREATE and UPDATE operations, providing immediate feedback to users when invalid configurations are submitted.

Key Changes

New Validation Package (pkg/splunk/enterprise/validation/):
validator.go - Generic type-safe validator interface using Go generics
registry.go - Validator registry for all CRD types
validate.go - Core validation logic and AdmissionReview handling
server.go - HTTP webhook server with TLS support
common_validation.go - Shared validation functions for common spec fields
CRD-specific validators - Standalone, IndexerCluster, SearchHeadCluster, ClusterManager, LicenseManager, MonitoringConsole

Webhook Infrastructure:
config/webhook/ - Webhook service and ValidatingWebhookConfiguration manifests
config/certmanager/ - TLS certificate configuration via cert-manager
config/default/ - Kustomize patches for webhook integration
cmd/main.go - Webhook server startup integration

Testing and Verification

Unit tests for every change

Related Issues

N/A

PR Checklist

  • Code changes adhere to the project's coding standards.
  • Relevant unit and integration tests are included.
  • Documentation has been updated accordingly.
  • All tests pass locally.
  • The PR description follows the project's guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

CLA Assistant Lite bot: All contributors have NOT signed the COC Document


I have read the Code of Conduct and I hereby accept the Terms


0 out of 2 committers have signed the CLA.
@patryk Wasielewski
@patrykw-splunk
Patryk Wasielewski seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request

@patrykw-splunk patrykw-splunk merged commit afa3699 into feature/validation-webhook-implementation Jan 30, 2026
9 of 11 checks passed
@patrykw-splunk patrykw-splunk deleted the feature/add-validation-webhook branch January 30, 2026 21:48
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant