Documentation ¶
Index ¶
- func MakeOwnerReferenceForNamespace(namespace *corev1.Namespace) metav1.OwnerReference
- type Manager
- func (m *Manager) ApplyTenantResourceQuota(name string, ownerReferences []metav1.OwnerReference, ...)
- func (m *Manager) CreateClusterRoles() error
- func (m *Manager) CreateTenant(tenantRequest *registrationv1alpha1.TenantRequest) error
- func (m *Manager) EligibilityCheck(objNamespace string) (bool, *corev1.Namespace, map[string]string)
- func (m *Manager) GrantObjectOwnership(apiGroup, resource, resourceName, subject string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeOwnerReferenceForNamespace ¶
func MakeOwnerReferenceForNamespace(namespace *corev1.Namespace) metav1.OwnerReference
MakeOwnerReferenceForNamespace creates an owner reference for the given namespace.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the implementation to set up multitenancy.
func NewManager ¶
func NewManager(kubeclientset kubernetes.Interface, edgenetclientset clientset.Interface) *Manager
NewManager returns a new multitenancy manager
func (*Manager) ApplyTenantResourceQuota ¶
func (m *Manager) ApplyTenantResourceQuota(name string, ownerReferences []metav1.OwnerReference, claim corev1alpha1.ResourceTuning, applied chan<- error)
ApplyTenantResourceQuota generates a tenant resource quota with the name provided
func (*Manager) CreateClusterRoles ¶
CreateClusterRoles generate a cluster role for tenant owners, admins, and collaborators
func (*Manager) CreateTenant ¶
func (m *Manager) CreateTenant(tenantRequest *registrationv1alpha1.TenantRequest) error
CreateTenant function is for being used by other resources to create a tenant
func (*Manager) EligibilityCheck ¶
func (m *Manager) EligibilityCheck(objNamespace string) (bool, *corev1.Namespace, map[string]string)
EligibilityCheck checks whether namespace, in which object exists, is local to the cluster or is propagated along with a federated deployment. If another cluster propagates the namespace, we skip checking the owner tenant's status as the Selective Deployment entity manages this life-cycle.
func (*Manager) GrantObjectOwnership ¶
func (m *Manager) GrantObjectOwnership(apiGroup, resource, resourceName, subject string, ownerReferences []metav1.OwnerReference) error
GrantObjectOwnership configures permission for the object owner