Expert assistant for working with the Genifest Kubernetes manifest generation tool. Helps with configuration, CLI usage, development, and troubleshooting.
Expert assistant for working with Genifest, a Kubernetes manifest generation tool that creates deployment manifests from templates for GitOps workflows.
This skill provides comprehensive guidance for working with the Genifest project, including:
When working with Genifest, first familiarize yourself with:
Key directories:
Always use the Makefile for development tasks:
```bash
make help
make build # Build the application
make test # Run all tests
make lint # Run linters
make check # Run fmt, vet, lint, and test
make run-example # Run guestbook example
make validate-example # Validate guestbook example
make config-example # Show merged config
make tags-example # Show available tags
```
**CRITICAL TESTING RULE**: Never compile and run separately. Always use `go run ./ <cli-args...>` to ensure you're running the latest code.
Genifest uses a subcommand-based architecture. Always pass the directory as an argument:
```bash
genifest run examples/guestbook
genifest validate examples/guestbook
genifest tags examples/guestbook
genifest config examples/guestbook
genifest run examples/guestbook --include-tags production
genifest run examples/guestbook --exclude-tags staging
```
**Never change directories to run genifest** - always pass the directory path as an argument.
Understand the metadata-driven loading approach:
**Core Types:**
**Loading Behavior:**
1. Starts with root `genifest.yaml`
2. Metadata-driven discovery using `paths` configuration
3. Configurable depth recursion (0-based indexing)
4. Creates synthetic configs for directories without `genifest.yaml`
5. Respects cloudHome boundaries
**Example genifest.yaml:**
```yaml
metadata:
cloudHome: "."
paths:
- path: "scripts"
scripts: true
depth: 0
- path: "k8s"
files: true
depth: 1
files:
include:
- "deployment.yaml"
- "service.yaml"
changes:
- tag: "production"
fileSelector: "*.yaml"
keySelector: ".spec.replicas"
valueFrom:
default:
value: "3"
functions:
- name: "get-replicas"
params:
- name: "environment"
required: true
valueFrom:
template:
string: "replicas-${environment}"
```
**ValueFrom Evaluation System:**
**CLI Implementation:**
When contributing code:
**Adding a New CLI Command:**
1. Create new file in `internal/cmd/`
2. Define cobra.Command with Use, Short, Long, RunE
3. Add shared setup logic from `common.go`
4. Register command in `root.go`
**Extending ValueFrom Types:**
1. Add new evaluator function in `internal/changes/`
2. Update EvalContext if needed
3. Add validation logic
4. Write integration tests
**Modifying Configuration Schema:**
1. Update types in `internal/config/`
2. Update validation logic
3. Update documentation in `docs/reference/schema.md`
4. Add example to `examples/`
Reference comprehensive docs in `docs/`:
```bash
make build
make test
make run-example
go run ./ run examples/guestbook --include-tags production
go run ./ validate examples/guestbook
go run ./ config examples/guestbook
make check
make release
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/genifest-kubernetes-manifest-generator/raw