Validation webhook implementation#1682
Conversation
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA 0 out of 2 committers have signed the CLA. |
Pull Request Test Coverage Report for Build 21987334064Details
💛 - Coveralls |
pkg/splunk/enterprise/validation/clustermanager_validation_test.go
Outdated
Show resolved
Hide resolved
|
I have read the Code of Conduct and I hereby accept the Terms |
kubabuczak
left a comment
There was a problem hiding this comment.
In current code there are 26 validation functions (search func validate across codebase) - shouldn't we replace / move them to new validation package?
* implementation of dummy validation webhook --------- Co-authored-by: Patryk Wasielewski <pwasiele@splunk.com>
Implement Validation Webhook logic + unit tests + mux server for webhook --------- Co-authored-by: Patryk Wasielewski <pwasiele@splunk.com>
a15f162 to
f694c19
Compare
kasiakoziol
left a comment
There was a problem hiding this comment.
added extra comments
Description
This PR implements an opt-in Kubernetes ValidatingAdmissionWebhook for Splunk Enterprise Custom Resources. The webhook validates CRD configurations at admission time, providing immediate feedback to users before resources are created or updated.
Key Changes
Kubebuilder Annotations (CRD Schema Level)
spec.imagePullPolicyAlways,Never,IfNotPresentspec.livenessInitialDelaySecondsspec.readinessInitialDelaySecondsWebhook Validations
spec.replicasspec.replicasspec.replicasspec.etcVolumeStorageConfig.storageCapacity10Gi)spec.etcVolumeStorageConfig.storageClassNamespec.varVolumeStorageConfig.storageCapacity10Gi)spec.varVolumeStorageConfig.storageClassNamespec.smartstore.volumes[].namespec.smartstore.volumes[]endpointorpathspec.smartstore.indexes[].namespec.smartstore.indexes[].volumeNamespec.appRepo.appSources[].namespec.appRepo.appSources[].locationspec.appRepo.volumes[].nameCRDs with Webhook Validation
Webhook Infrastructure
Documentation
Testing and Verification
Comprehensive unit tests (~95% coverage)
Server and HTTP handler tests
Related Issues
N/A
PR Checklist