RFE-9431: expose full openAPIV3Schema for pruner, scheduler, and networkpolicy configs - #3811
RFE-9431: expose full openAPIV3Schema for pruner, scheduler, and networkpolicy configs#3811anasalli wants to merge 1 commit into
Conversation
|
|
…orkpolicy configs Remove +kubebuilder:validation:Schemaless from SchedulerConfig, TektonPrunerConfig, and NetworkPolicyConfig so that kubectl explain / oc explain shows the full schema for these configuration fields instead of just <Object>. Keep +kubebuilder:pruning:PreserveUnknownFields for backward compatibility. TektonConfig CRD size: 71 KB -> 111 KB (limit: 256 KB). Signed-off-by: Anas Ali <aanasali@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
846f7a2 to
2f08675
Compare
|
Note on PR size: This PR shows +1721 lines but the actual manual change is only 3 lines removed from 3 Go files (removing Manual changes (3 lines):
Auto-generated (5 CRD files):
|
|
@anasalli please follow the PR template. Release Note section has to be populated as applicable. Also complete the EasyCLA |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3811 +/- ##
=======================================
Coverage 25.40% 25.40%
=======================================
Files 449 449
Lines 23477 23477
=======================================
Hits 5964 5964
Misses 16822 16822
Partials 691 691
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/approve |
|
/approve cancel |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Changes
Removes
+kubebuilder:validation:Schemalessfrom three configuration types so thatoc explainshows the full schema for configurable fields in the TektonConfig CRD.Before:
oc explain tektonconfig.spec.tektonpruner.global-configshows just<Object>with no fields.After: Shows all configurable fields (enforcedConfigLevel, ttlSecondsAfterFinished, historyLimit, namespaces, etc.)
Ref: https://redhat.atlassian.net/browse/RFE-9431
What was changed:
// +kubebuilder:validation:Schemalessfrom:SchedulerConfig.Configintektonscheduler_types.go(exposes: queueName, multiKueueOverride, cel)TektonPrunerConfig.GlobalConfigintektonpruner_types.go(exposes: ttlSecondsAfterFinished, historyLimit, namespaces, etc.)NetworkPolicyConfig.Policiesinnetworkpolicy_config.go(exposes: podSelector, ingress, egress)+kubebuilder:pruning:PreserveUnknownFieldson all three fields for backward compatibilitySize Impact
All CRDs remain well under the 256 KB size constraint enforced by
hack/sync-helm-crds.sh.Why not expand AdditionalOptions?
The
AdditionalOptionsfields (Deployments, StatefulSets, ConfigMaps, HPAs) embed full Kubernetes types that would each add ~100 KB per instance across 11 components, pushing the CRD far over the 256 KB limit. These remain schemaless by necessity.Testing
oc explainnow shows full field schemas for all three typesSubmitter Checklist
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes