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

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions