tenantnamespace

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package tenantnamespace provides an interface, and its implementation, to handle the creation and the management of tenant namespaces

Index

Constants

View Source
const (
	// NamePrefix is the prefix of all tenant namespace names.
	NamePrefix = "liqo-tenant"
)

Variables

This section is empty.

Functions

func GetNameForNamespace added in v0.4.0

func GetNameForNamespace(cluster discoveryv1alpha1.ClusterIdentity) string

GetNameForNamespace given a cluster identity it returns the name of the tenant namespace for the cluster.

Types

type Manager

type Manager interface {
	CreateNamespace(ctx context.Context, cluster discoveryv1alpha1.ClusterIdentity) (*v1.Namespace, error)
	GetNamespace(ctx context.Context, cluster discoveryv1alpha1.ClusterIdentity) (*v1.Namespace, error)
	BindClusterRoles(ctx context.Context, cluster discoveryv1alpha1.ClusterIdentity, clusterRoles ...*rbacv1.ClusterRole) ([]*rbacv1.RoleBinding, error)
	UnbindClusterRoles(ctx context.Context, cluster discoveryv1alpha1.ClusterIdentity, clusterRoles ...string) error
}

Manager provides the methods to handle the creation and the management of tenant namespaces.

func NewCachedManager added in v0.5.3

func NewCachedManager(ctx context.Context, client kubernetes.Interface) Manager

NewCachedManager creates a new TenantNamespaceManager object, supporting cached retrieval of namespaces for increased efficiency.

func NewManager added in v0.5.3

func NewManager(client kubernetes.Interface) Manager

NewManager creates a new TenantNamespaceManager object.

Jump to

Keyboard shortcuts

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