Implement Validation Webhook for Splunk Enterprise CRDs#1681
Merged
patrykw-splunk merged 8 commits intofeature/validation-webhook-implementationfrom Jan 30, 2026
Merged
Conversation
Contributor
|
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. |
…/add-validation-webhook
afa3699
into
feature/validation-webhook-implementation
9 of 11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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