Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omerap12/death-timer-controller
https://github.com/omerap12/death-timer-controller
go golang kubernetes-operator
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/omerap12/death-timer-controller
- Owner: omerap12
- Created: 2024-01-27T10:40:31.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-01-27T11:19:32.000Z (11 months ago)
- Last Synced: 2024-10-29T23:44:01.164Z (2 months ago)
- Topics: go, golang, kubernetes-operator
- Language: Go
- Homepage:
- Size: 9.91 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Death Timer Controller
**Description:**
Death Timer Controller is an operator created using Operator SDK with Golang to manage resources based on a configured CRD manifest. This controller tracks and deletes resources from the cluster when their specified time limit is reached. The supported resources currently include:
1. Namespaces
2. Deployments
3. Pods## Controller Code:
The controller code can be found under
```bash
./controllers/deathtimer_controller.go
```
You can view it directly here: [deathtimer_controller.go](https://github.com/omerap12/Death-Timer-Contoller/blob/main/controllers/deathtimer_controller.go)
## How to Deploy:### Step 1: Create a Cluster
Create a Kubernetes cluster using a tool like kind:
```bash
kind create cluster
```### Step 2: Configure Sample Configuration
Configure the sample configuration located at ./config/samples/api_v1alpha1_deathtimer.yaml according to your requirements.### Step 3: Generate Manifests
Run the following command to generate manifests:
```bash
make manifests
```### Step 4: Deploy CRD Base
Deploy the CRD base:
```bash
kubectl apply -f config/crd/bases/api.omer.aplatony_deathtimers.yaml
```### Step 5: Deploy CRD
Deploy the CRD:
```bash
kubectl apply -f config/samples/api_v1alpha1_deathtimer.yaml
```### Step 6: Run the Controller
Run the controller:
```bash
make run
```View the logs on the controller terminal for additional information.
Feel free to customize the configuration and explore the controller's capabilities.