hns

module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0

README

Hierarchical Namespaces (HNS)

HNS is built to allow for easier multi-tenancy in OpenShift clusters, containing a set of CRDs and controllers that allow users to create namespaces without needing cluster-level permission to create namespaces, with each namespace having a quota associated to it.

Using HNS

Prerequisites

In order to use HNS, you need to have:

  1. An operating OpenShift cluster of version 4.x.
  2. cert-manager installed on the cluster.
  3. At least 3 nodes with an infra taint and without a master taint (HNS runs by default on infra nodes)
Build

To build the HNS controller, login into an image registry, and run:

$ make docker-build docker-push IMG=<image_registry>/<image_name>:<image_tag>
Deploy

To build the HNS controller, login into an operational OpenShift cluster and run:

$ make deploy IMG=<image_registry>/<image_name>:<image_tag>
Test

To test the HNS controller, login into an operational OpenShift cluster and run:

$ make test-e2e

CRDs

  1. Subnamespace: Represents a namespace in a hierarchy. Each Subnamespace has a namespace bound to it which has the same name as the Subnamespace. A Subnamepsace may also have a quota bound to it. The quota can be either a ResourceQuota object or a ClusterResourceQuota object (this depends on the depth in the hierarchy of the Subnamespace) of the same name as the Subnamespace.

  2. UpdateQuota: A CRD that allows to move resources between Subnamespaces.

  3. MigrationHierarchy: A CRD that allows migrating a Subnamespace to a different hierarchy.

Directories

Path Synopsis
api
v1
Package v1 contains API Schema definitions for the dana v1 API group +kubebuilder:object:generate=true +groupName=dana.hns.io
Package v1 contains API Schema definitions for the dana v1 API group +kubebuilder:object:generate=true +groupName=dana.hns.io
internal
test

Jump to

Keyboard shortcuts

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