Skip to content

markers helper can't detect markers which are separated with space. #53

@sivchari

Description

@sivchari

https://github.com/kubernetes-sigs/cluster-api/blob/main/api/v1beta2/cluster_types.go#L1285-L1296

// +kubebuilder:object:root=true

// ClusterList contains a list of Cluster.
type ClusterList struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard list's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	// items is the list of Clusters.
	Items []Cluster `json:"items"`
}

Above code must be reported by statussubresource linter since this custom resource has root marker and must also have status marker.
But currently marker accessor helper can't collect it because there is space between root marker and ClusterList type.

So I think we should discuss about 2 topic.

  1. The way to be able to collect all markers in spite of space.
  2. Configuration for statussubresource. (e.g. ignore error when the type has List suffix on itself.)

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions