Help us shape the future of Go! Take the 2026 Go Developer Survey

tenant

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObjectReferenceTenantKind = "Tenant"
)

Variables

This section is empty.

Functions

func AddNamespaceNameLabels

func AddNamespaceNameLabels(labels map[string]string, ns *corev1.Namespace)

func AddTenantNameLabel

func AddTenantNameLabel(labels map[string]string, ns *corev1.Namespace, tnt *capsulev1beta2.Tenant)

func BuildInstanceMetadataForNamespace

func BuildInstanceMetadataForNamespace(ns *corev1.Namespace, tnt *capsulev1beta2.Tenant) (labels map[string]string, annotations map[string]string)

func BuildNamespaceAnnotationsForTenant

func BuildNamespaceAnnotationsForTenant(tnt *capsulev1beta2.Tenant) map[string]string

func BuildNamespaceLabelsForTenant

func BuildNamespaceLabelsForTenant(tnt *capsulev1beta2.Tenant) map[string]string

func BuildNamespaceMetadataForTenant

func BuildNamespaceMetadataForTenant(ns *corev1.Namespace, tnt *capsulev1beta2.Tenant) (labels map[string]string, annotations map[string]string, err error)

func GetOwnersWithKinds

func GetOwnersWithKinds(tenant *capsulev1beta2.Tenant) (owners []string)

func GetTenantByLabels

func GetTenantByLabels(
	ctx context.Context,
	c client.Client,
	ns *corev1.Namespace,
) (*capsulev1beta2.Tenant, error)

getTenantByLabels returns tenant from labels.

func GetTenantByOwnerreferences

func GetTenantByOwnerreferences(
	ctx context.Context,
	c client.Client,
	refs []v1.OwnerReference,
) (tnt *capsulev1beta2.Tenant, err error)

getNamespaceTenant returns namespace owner tenant.

func GetTenantByUserInfo

func GetTenantByUserInfo(
	ctx context.Context,
	c client.Client,
	cfg configuration.Configuration,
	ns *corev1.Namespace,
	username string,
	groups []string,
) (sortedTenants, error)

func IsTenantOwnerReference

func IsTenantOwnerReference(or metav1.OwnerReference) bool

func IsTenantOwnerReferenceForTenant

func IsTenantOwnerReferenceForTenant(or metav1.OwnerReference, tnt *capsulev1beta2.Tenant) bool

func TenantByStatusNamespace

func TenantByStatusNamespace(
	ctx context.Context,
	c client.Client,
	namespace string,
) (*capsulev1beta2.Tenant, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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