From 418890b4b5fdba120f4c23ca045be39ca8d357b5 Mon Sep 17 00:00:00 2001 From: Houston Putman Date: Mon, 17 Aug 2020 18:12:59 -0400 Subject: [PATCH] Adding scope: Namespaced to all CRDs. (#137) Signed-off-by: Houston Putman --- api/v1beta1/solrbackup_types.go | 2 ++ api/v1beta1/solrcloud_types.go | 1 + api/v1beta1/solrcollection_types.go | 1 + api/v1beta1/solrcollectionalias_types.go | 1 + api/v1beta1/solrprometheusexporter_types.go | 1 + config/crd/bases/solr.bloomberg.com_solrbackups.yaml | 2 +- .../crd/bases/solr.bloomberg.com_solrcollectionaliases.yaml | 2 +- config/crd/bases/solr.bloomberg.com_solrcollections.yaml | 2 +- helm/solr-operator/crds/crds.yaml | 6 +++--- 9 files changed, 12 insertions(+), 6 deletions(-) diff --git a/api/v1beta1/solrbackup_types.go b/api/v1beta1/solrbackup_types.go index ee85eed3..08ea3a7a 100644 --- a/api/v1beta1/solrbackup_types.go +++ b/api/v1beta1/solrbackup_types.go @@ -281,6 +281,8 @@ func (sb *SolrBackup) PersistenceJobName() string { } // +kubebuilder:object:root=true +// +kubebuilder:resource:scope=Namespaced + // SolrBackup is the Schema for the solrbackups API // +kubebuilder:categories=all // +kubebuilder:subresource:status diff --git a/api/v1beta1/solrcloud_types.go b/api/v1beta1/solrcloud_types.go index eae9f30b..3ac4572d 100644 --- a/api/v1beta1/solrcloud_types.go +++ b/api/v1beta1/solrcloud_types.go @@ -747,6 +747,7 @@ type ZookeeperConnectionInfo struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:scope=Namespaced // SolrCloud is the Schema for the solrclouds API // +kubebuilder:resource:shortName=solr diff --git a/api/v1beta1/solrcollection_types.go b/api/v1beta1/solrcollection_types.go index 503e08bd..895b4b0e 100644 --- a/api/v1beta1/solrcollection_types.go +++ b/api/v1beta1/solrcollection_types.go @@ -90,6 +90,7 @@ type SolrCollectionStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:scope=Namespaced // SolrCollection is the Schema for the solrcollections API type SolrCollection struct { diff --git a/api/v1beta1/solrcollectionalias_types.go b/api/v1beta1/solrcollectionalias_types.go index 7bdd8701..fe58fb18 100644 --- a/api/v1beta1/solrcollectionalias_types.go +++ b/api/v1beta1/solrcollectionalias_types.go @@ -48,6 +48,7 @@ type SolrCollectionAliasStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:scope=Namespaced // SolrCollectionAlias is the Schema for the solrcollectionaliases API type SolrCollectionAlias struct { diff --git a/api/v1beta1/solrprometheusexporter_types.go b/api/v1beta1/solrprometheusexporter_types.go index 007947e1..194c4f14 100644 --- a/api/v1beta1/solrprometheusexporter_types.go +++ b/api/v1beta1/solrprometheusexporter_types.go @@ -169,6 +169,7 @@ type SolrPrometheusExporterStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:scope=Namespaced // SolrPrometheusExporter is the Schema for the solrprometheusexporters API // +kubebuilder:resource:shortName=solrmetrics diff --git a/config/crd/bases/solr.bloomberg.com_solrbackups.yaml b/config/crd/bases/solr.bloomberg.com_solrbackups.yaml index 66dcf37d..e0c42797 100644 --- a/config/crd/bases/solr.bloomberg.com_solrbackups.yaml +++ b/config/crd/bases/solr.bloomberg.com_solrbackups.yaml @@ -30,7 +30,7 @@ spec: listKind: SolrBackupList plural: solrbackups singular: solrbackup - scope: "" + scope: Namespaced subresources: status: {} validation: diff --git a/config/crd/bases/solr.bloomberg.com_solrcollectionaliases.yaml b/config/crd/bases/solr.bloomberg.com_solrcollectionaliases.yaml index a580637b..0c431936 100644 --- a/config/crd/bases/solr.bloomberg.com_solrcollectionaliases.yaml +++ b/config/crd/bases/solr.bloomberg.com_solrcollectionaliases.yaml @@ -14,7 +14,7 @@ spec: listKind: SolrCollectionAliasList plural: solrcollectionaliases singular: solrcollectionalias - scope: "" + scope: Namespaced validation: openAPIV3Schema: description: SolrCollectionAlias is the Schema for the solrcollectionaliases diff --git a/config/crd/bases/solr.bloomberg.com_solrcollections.yaml b/config/crd/bases/solr.bloomberg.com_solrcollections.yaml index fddd7fed..1210567e 100644 --- a/config/crd/bases/solr.bloomberg.com_solrcollections.yaml +++ b/config/crd/bases/solr.bloomberg.com_solrcollections.yaml @@ -14,7 +14,7 @@ spec: listKind: SolrCollectionList plural: solrcollections singular: solrcollection - scope: "" + scope: Namespaced validation: openAPIV3Schema: description: SolrCollection is the Schema for the solrcollections API diff --git a/helm/solr-operator/crds/crds.yaml b/helm/solr-operator/crds/crds.yaml index 5e319aad..51a9758c 100644 --- a/helm/solr-operator/crds/crds.yaml +++ b/helm/solr-operator/crds/crds.yaml @@ -28,7 +28,7 @@ spec: listKind: SolrBackupList plural: solrbackups singular: solrbackup - scope: "" + scope: Namespaced subresources: status: {} validation: @@ -9160,7 +9160,7 @@ spec: listKind: SolrCollectionAliasList plural: solrcollectionaliases singular: solrcollectionalias - scope: "" + scope: Namespaced validation: openAPIV3Schema: description: SolrCollectionAlias is the Schema for the solrcollectionaliases @@ -9241,7 +9241,7 @@ spec: listKind: SolrCollectionList plural: solrcollections singular: solrcollection - scope: "" + scope: Namespaced validation: openAPIV3Schema: description: SolrCollection is the Schema for the solrcollections API