k8s-enhancements-toolkit
Go tooling for kubernetes/enhancements โ validates, queries, and manages Kubernetes Enhancement Proposals (KEPs).
What it does
- KEP Validation โ validates metadata, PRR approval, stage/status values
- KEP Querying โ filter KEPs by SIG, stage, status with regex pre-compilation
- KEP Creation & Promotion โ scaffold new KEPs and promote between stages
- Graduation Readiness Docs โ guidance for KEP lifecycle stages
Project Structure
api/ Core types: Proposal, KEPHandler, Stage, Status validation
cmd/ CLI entrypoints (kepctl, kepify)
pkg/ Libraries: repo operations, kepctl commands, YAML handling
hack/ CI scripts, verification, boilerplate
docs/ Graduation readiness documentation
keps/ KEP templates and prod-readiness metadata
Quick Start
git clone https://huggingface.co/YsfMO98/k8s-enhancements-toolkit
cd k8s-enhancements-toolkit
go test ./...
go build ./cmd/kepctl
Code Examples
Validate a KEP
package main
import (
"fmt"
"k8s.io/enhancements/api"
)
func main() {
proposal := &api.Proposal{
Stage: api.Alpha,
Status: api.Proposed,
PRRApprovals: []api.PRRApproval{
{Approver: "johnbelamaric@google.com"},
},
}
handler := api.NewKEPHandler(nil)
if err := handler.Validate(proposal); err != nil {
fmt.Printf("Validation failed: %v\n", err)
} else {
fmt.Println("KEP is valid!")
}
}
Query KEPs by SIG
import "k8s.io/enhancements/pkg/repo"
opts := repo.QueryOpts{
Sig: "sig-network",
Stage: "beta",
}
keps, err := opts.Query(repoPath)
Run Tests
go test ./...
go test ./api/ -v # API validation tests
go test ./pkg/repo/ -v # Repository query tests
go vet ./... # Static analysis
PRs Submitted
| PR | Description | Status |
|---|---|---|
| #6240 | Graduation readiness docs + KEP template update | Open |
| #6241 | Proposal validation tests (6 functions, +303 lines) | Open |
| #6242 | Bug fixes: nil pointer, defer-in-loop, error wrapping, regex pre-compilation | Open |
Bug Fixes Included (#6242)
- Fixed nil pointer dereference in
repo.go - Fixed defer-in-loop in
cmd/kepify/main.go - Fixed error wrapping
%sโ%wacross 6 files - Fixed typos in
groups.goandoutput.go - Added regex pre-compilation for repeated patterns
- Implemented
QueryOpts.Validate()for stage/status validation
Requirements
- Go 1.22+
- golangci-lint (for linting)
Links
- Upstream repo: https://github.com/kubernetes/enhancements
- GitLab: https://gitlab.com/Youssef-AMARZOU/k8s-enhancements-toolkit
- Kaggle: https://www.kaggle.com/datasets/amarzouyoussef/k8s-enhancements-toolkit-v1
License
Apache-2.0 (same as upstream kubernetes/enhancements)
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support