From b812dd3d136a5105661948b577e8cfac86c9d94c Mon Sep 17 00:00:00 2001 From: Ann Taraday Date: Tue, 24 Oct 2023 15:59:16 +0200 Subject: [PATCH] Fix groupversion for multicasskop Also updated setup namespace for casskop(drop depricated usage of namespace) Fixes: #123 --- main.go | 4 ++-- multi-casskop/api/v2/groupversion_info.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 2ca80354..1e6b0493 100644 --- a/main.go +++ b/main.go @@ -22,6 +22,7 @@ import ( "os" "path" "runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" "strconv" "strings" "time" @@ -162,8 +163,7 @@ func main() { mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, - Port: 9443, - Namespace: namespace, + Cache: cache.Options{Namespaces: []string{namespace}}, HealthProbeBindAddress: probeAddr, }) if err != nil { diff --git a/multi-casskop/api/v2/groupversion_info.go b/multi-casskop/api/v2/groupversion_info.go index a7d43d00..b337ba6d 100644 --- a/multi-casskop/api/v2/groupversion_info.go +++ b/multi-casskop/api/v2/groupversion_info.go @@ -16,7 +16,7 @@ limitations under the License. // Package v2 contains API Schema definitions for the multicasskops.db.orange.com v2 API group // +kubebuilder:object:generate=true -// +groupName=multicasskops.db.orange.com +// +groupName=db.orange.com package v2 import ( @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "multicasskops.db.orange.com", Version: "v2"} + GroupVersion = schema.GroupVersion{Group: "db.orange.com", Version: "v2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}