Compare commits
9 Commits
9b7ced4e92
...
1.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| cfa8832598 | |||
| a8f8728790 | |||
| 9dbc7f01e1 | |||
| 15697d176f | |||
| 63c16baf46 | |||
|
37063450c1
|
|||
|
a6ab81eeaa
|
|||
| dea17c0ab0 | |||
| ef344ed315 |
@@ -0,0 +1,9 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
uses: unboundsoftware/shared-workflows/.gitea/workflows/Release.yml@main
|
||||
@@ -2,6 +2,23 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.3.0] - 2026-01-09
|
||||
|
||||
### 🚀 Features
|
||||
|
||||
- Migrate from GitLab CI to Gitea Actions
|
||||
- Add release workflow using shared workflows
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- Add CLAUDE.md for Claude Code guidance
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(deps)* Update golang:1.25.5 docker digest to ad03ba9
|
||||
- *(deps)* Update actions/checkout action to v6
|
||||
- *(deps)* Update actions/setup-go action to v6
|
||||
|
||||
## [1.2.4] - 2025-12-18
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
A Kubernetes controller that automatically creates `LimitRange` resources (named `extreme-request-defaults`) in all non-excluded namespaces to set default memory requests for containers. Runs as a loop checking every 10 seconds.
|
||||
|
||||
## Build Commands
|
||||
|
||||
```bash
|
||||
# Run tests
|
||||
go test -race -coverprofile=coverage.txt ./...
|
||||
|
||||
# Check for vulnerabilities
|
||||
go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
govulncheck ./...
|
||||
|
||||
# Build binary
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o release/default-request-adder -ldflags '-w -s'
|
||||
|
||||
# Build Docker image (uses build-tools, not buildx)
|
||||
docker build -t default-request-adder .
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
Single-file Go application (`main.go`) that:
|
||||
- Uses in-cluster Kubernetes client configuration (`rest.InClusterConfig()`)
|
||||
- Loops through all namespaces every 10 seconds
|
||||
- Creates `LimitRange` named `extreme-request-defaults` in non-excluded namespaces
|
||||
- Deletes the `LimitRange` from excluded namespaces if present
|
||||
|
||||
### CLI Flags
|
||||
- `-excluded-ns`: Comma-separated list of namespaces to exclude (default: `kube-system`). Use `*` to exclude all.
|
||||
- `-memory`: Default memory request value (default: `1Ti`)
|
||||
|
||||
## CI/CD
|
||||
|
||||
- **Gitea Actions**: `.gitea/workflows/ci.yaml` - runs tests and vulnerability checks
|
||||
- **GitLab CI**: `.gitlab-ci.yml` - uses `buildtool/build-tools` for builds
|
||||
- **Releases**: Uses git-cliff for changelog generation (see `cliff.toml`)
|
||||
Reference in New Issue
Block a user