Skip to content

Commit

Permalink
enhancement and add namespace and projectID to endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadhamzh committed Feb 7, 2025
1 parent ea2458e commit e248d65
Show file tree
Hide file tree
Showing 87 changed files with 10,476 additions and 415 deletions.
11 changes: 5 additions & 6 deletions modules/api/cmd/kubermatic-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import (
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
gatekeeperconfigv1alpha1 "github.com/open-policy-agent/gatekeeper/v3/apis/config/v1alpha1"
prometheusapi "github.com/prometheus/client_golang/api"
velerov1 "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
Expand Down Expand Up @@ -93,7 +94,6 @@ import (
"k8s.io/klog/v2"
"k8s.io/metrics/pkg/apis/metrics/v1beta1"
ctrlruntime "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
ctrlruntimelog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
Expand Down Expand Up @@ -140,6 +140,10 @@ func main() {
log.Fatalw("failed to register scheme", zap.Stringer("api", velerov1.SchemeGroupVersion), zap.Error(err))
}

if err := kyvernov1.AddToScheme(scheme.Scheme); err != nil {
log.Fatalw("failed to register scheme", zap.Stringer("api", kyvernov1.SchemeGroupVersion), zap.Error(err))
}

if err := kubeovnv1.AddToScheme(scheme.Scheme); err != nil {
log.Fatalw("failed to register scheme", zap.Stringer("api", kubeovnv1.SchemeGroupVersion), zap.Error(err))
}
Expand All @@ -152,11 +156,6 @@ func main() {
// We use the manager only to get a lister-backed ctrlruntimeclient.Client. We can not use it for most
// other actions, because it doesn't support impersonation (and can't be changed to do that as that would mean it has to replicate the apiservers RBAC for the lister)
mgr, err := manager.New(masterCfg, manager.Options{
Cache: cache.Options{
DefaultNamespaces: map[string]cache.Config{
options.namespace: {},
},
},
BaseContext: func() context.Context {
return ctx
},
Expand Down
Loading

0 comments on commit e248d65

Please sign in to comment.