Skip to content

Deprecate redundant markers that duplicate +optional and +required #1241

@camilamacedo86

Description

@camilamacedo86

controller-tools currently allows both:

  • +required / +optional
  • +kubebuilder:validation:Required / +kubebuilder:validation:Optional

These perform the same function. Maintaining both causes confusion and inconsistent API definitions.

Proposal:

  • Deprecate +kubebuilder:validation:Required and +kubebuilder:validation:Optional
  • Recommend +required and +optional
  • (Optional) Warn when deprecated markers are used

Motivation, context came from: kubernetes-sigs/kube-api-linter#112

Metadata

Metadata

Labels

lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions