Summary
Update bpfman-operator CRD API types to comply with new Kubernetes API conventions as outlined in kubernetes/community#8486 and OpenShift API linter requirements.
Context
Recent updates to Kubernetes API conventions require:
- All fields must have
omitempty tags
- Optional fields in aggregated APIs (those with protobuf tags) must use pointers
- Complete validation rules for all string and list fields
omitzero tags for struct fields where appropriate
Current State
Our APIs are partially compliant but need systematic updates across:
apis/v1alpha1/shared_types.go
apis/v1alpha1/*_types.go (all program type files)
- Validation rules are incomplete for many fields
Proposed Changes
- Field Tags: Add
omitempty to all fields
- Pointer Usage: Convert optional fields to pointers in aggregated APIs
- Validation: Add MinLength/MaxLength to strings, MinItems/MaxItems to arrays
- Struct Validation: Add MinProperties for structs with all optional fields
References
Summary
Update bpfman-operator CRD API types to comply with new Kubernetes API conventions as outlined in kubernetes/community#8486 and OpenShift API linter requirements.
Context
Recent updates to Kubernetes API conventions require:
omitemptytagsomitzerotags for struct fields where appropriateCurrent State
Our APIs are partially compliant but need systematic updates across:
apis/v1alpha1/shared_types.goapis/v1alpha1/*_types.go(all program type files)Proposed Changes
omitemptyto all fieldsReferences