ephemeral-namespace-operator

command module
v0.6.0 Latest Latest
Warning

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

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

README

= Ephemeral Namespace Operator (ENO)

image:https://img.shields.io/github/v/release/redhatinsights/ephemeral-namespace-operator[Release]
image:https://img.shields.io/github/go-mod/go-version/redhatinsights/ephemeral-namespace-operator[Go Version]
image:https://github.com/RedHatInsights/ephemeral-namespace-operator/actions/workflows/test.yml/badge.svg[Tests]
//image:https://img.shields.io/github/workflow/status/RedHatInsights/ephemeral-namespace-operator/Run%20Unit%20Tests[Build Passing]
image:https://goreportcard.com/badge/github.com/RedHatInsights/ephemeral-namespace-operator[Go Report Card]

== Purpose
The purpose of the ephemeral namespace operator is to have namespaces queued up and ready to be utilized. These namespaces  
will have `Clowdenvironments` deployed, and specific resources corresponding to the type of namespace pool a user requests from, ready to go.  

++++
<p align="center">
  <img width="600" height="400" src="operator_diagram.png">
</p>
++++

== Benefits For This Approach
- Cuts user's wait-time down since namespaces will already be ready-to-go.
- Ensures that namespaces are not forgotten therefore reducing resource utilization.
- Long-running environments require work to maintain, therefore, having a time limit on them will reduce this issue from happening.

== How does it work?
A user will request a namespace which creates a reservation request. From there a namespace is selected from the pool and checked out by that user.  
The user will have that pool for the specified duration (Or for 1 hour if duration was not specified).

A user can use any of the following optional flags to specify their needs:

- `--name`: Specify a reservation name. Ex. `--name my-namespace-reservation`
- `-d, --duration`: Specify the length of time a user wants to reserve the namespace for. Ex. `-d 3h`
- `--pool`: Specify the pool a user wants a namespace from. Ex. `--pool minimal`

== What Are Namespace Pools?
Given the various needs of our users, we incorporated different pools of ready namespaces that contain specific resources.  
This is to help ensure that when users request a namespace they aren't getting any unnecessary resources within their namespace.  
The current list of pools are `default`, `minimal`, and `managed-kafka`.

An optional configuration can be added to the pool spec for limiting the number of namespaces that a pool can have at once. This would  
include `ready`, `creating`, and `reserved` namespaces. Add the following to utilize this feature: `sizeLimit: <int>`

== CRDs Added on Namespace Creation

- `ClowdEnvironment`:  This will create deployments for Kafka, Kafka Connect, Minio, Prometheus, and feature flags.  
- `FrontendEnvironment`: This sets up environment configurations for the github.com/RedHatInsights/frontend-operator[frontend operator]  
- `RoleBindings`: Access is granted to devs to edit resources in the namespace  
- Secrets are copied from the base namespace.  

== Contributing
Check this CONTRIBUTING.md[doc] for deploying the ENO locally for local development
---
Made with ❤️ @ Red Hat

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
apis
cloud.redhat.com/v1alpha1
Package v1alpha1 contains API Schema definitions for the cloud.redhat.com v1alpha1 API group +kubebuilder:object:generate=true +groupName=cloud.redhat.com
Package v1alpha1 contains API Schema definitions for the cloud.redhat.com v1alpha1 API group +kubebuilder:object:generate=true +groupName=cloud.redhat.com
controllers

Jump to

Keyboard shortcuts

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