Skip to content

doc: CRD scope requires fixes and improvements #3684

@camilamacedo86

Description

@camilamacedo86

Bug Report

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster

// Memcached2 is the Schema for the memcached2s API
type Memcached2 struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   Memcached2Spec   `json:"spec,omitempty"`
	Status Memcached2Status `json:"status,omitempty"`
}
  • Also, we ought to tell to the users that to generated Cluster scoped CRD's the can use the flag --namespaced=false E.g

$ operator-sdk create api --group cache --version v1 --kind Memcached2 --resource=true --controller=true --namespaced=false

  • And then, that by default they are namespaced scope which means that no requires marker at all.

Metadata

Metadata

Assignees

Labels

kind/documentationCategorizes issue or PR as related to documentation.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions