declarative pattern: Support cluster scoped types
We weren't processing the Namespaced field.
Equivalent of
@@ -74,6 +74,7 @@ type {{.Resource.Kind}}Status struct {
}
// +kubebuilder:object:root=true
+{{ if not .Resource.Namespaced }} // +kubebuilder:resource:scope=Cluster {{ end }}
// {{.Resource.Kind}} is the Schema for the {{ .Resource.Resource }} API
type {{.Resource.Kind}} struct {
@@ -107,6 +108,7 @@ func (o *{{.Resource.Kind}}) SetCommonStatus(s addonv1alpha1.CommonStatus) {
}
// +kubebuilder:object:root=true
+{{ if not .Resource.Namespaced }} // +kubebuilder:resource:scope=Cluster {{ end }}
// {{.Resource.Kind}}List contains a list of {{.Resource.Kind}}
type {{.Resource.Kind}}List struct {
