Skip to content

Commit 9552d12

Browse files
authored
Merge pull request #1395 from justinsb/support_cluster_scoped_addons
declarative pattern: Support cluster scoped types
2 parents 8549466 + 5c754a3 commit 9552d12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugins/addon/type.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ type {{.Resource.Kind}}Status struct {
7575
}
7676
7777
// +kubebuilder:object:root=true
78+
{{ if not .Resource.Namespaced }} // +kubebuilder:resource:scope=Cluster {{ end }}
7879
7980
// {{.Resource.Kind}} is the Schema for the {{ .Resource.Resource }} API
8081
type {{.Resource.Kind}} struct {
@@ -108,6 +109,7 @@ func (o *{{.Resource.Kind}}) SetCommonStatus(s addonv1alpha1.CommonStatus) {
108109
}
109110
110111
// +kubebuilder:object:root=true
112+
{{ if not .Resource.Namespaced }} // +kubebuilder:resource:scope=Cluster {{ end }}
111113
112114
// {{.Resource.Kind}}List contains a list of {{.Resource.Kind}}
113115
type {{.Resource.Kind}}List struct {

0 commit comments

Comments
 (0)