v0.1.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0




View Source
const (
	TenantNamespaceLabelKey = ""

	TenantQuotaNamePrefix = "kubezoo-tenant-quota"


This section is empty.


This section is empty.


type APIGroupConfig

type APIGroupConfig struct {
	Group string
	// the map is version to resource to storage config
	StorageConfigs map[string]map[string]*StorageConfig

type GroupVersionKindFunc

type GroupVersionKindFunc func(containingGV schema.GroupVersion) schema.GroupVersionKind

type ObjectConvertor

type ObjectConvertor interface {
	ConvertTenantObjectToUpstreamObject(obj runtime.Object, tenantID string, isNamespaceScoped bool) error
	ConvertUpstreamObjectToTenantObject(obj runtime.Object, tenantID string, isNamespaceScoped bool) error

ObjectConvertor converts object between tenant and upstream cluster

type StorageConfig

type StorageConfig struct {
	Kind        schema.GroupVersionKind
	Resource    string
	Subresource string
	ShortNames  []string

	NamespaceScoped bool

	IsCustomResource bool

	IsConnecter bool

	// NewFunc returns a new instance of the type this registry returns for a
	// GET of a single object, e.g.:
	// curl GET /apis/group/version/namespaces/my-ns/myresource/name-of-object
	NewFunc func() runtime.Object

	// NewListFunc returns a new list of the type this registry; it is the
	// type returned when the resource is listed, e.g.:
	// curl GET /apis/group/version/namespaces/my-ns/myresource
	NewListFunc func() runtime.Object

	// dynamic client is used to communicate with upstream cluster
	DynamicClient dynamic.Interface

	Convertor ObjectConvertor

	TableConvertor rest.TableConvertor

	ProxyTransport       http.RoundTripper
	UpstreamMaster       *url.URL
	GroupVersionKindFunc GroupVersionKindFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL