Skip to content

Commit 4ee9f73

Browse files
chore: improve discoverability and marketing readiness
- Add crates.io metadata to Cargo.toml (repository, homepage, docs, keywords, categories) - Add Features section and Alternatives comparison table to README - Create CONTRIBUTING.md with build, test, and PR guidelines - Add Artifact Hub repo config for Helm chart discovery - GitHub topics and homepage URL set via gh CLI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3935d76 commit 4ee9f73

4 files changed

Lines changed: 115 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contributing to Initium
2+
3+
Contributions are welcome! This guide covers how to build, test, and submit changes.
4+
5+
## Prerequisites
6+
7+
- Rust 1.88+ (stable)
8+
- Docker (for integration tests)
9+
- Helm + helm-unittest plugin (for Helm chart tests)
10+
11+
## Build
12+
13+
```bash
14+
make build
15+
# or directly:
16+
cargo build --release
17+
```
18+
19+
## Test
20+
21+
```bash
22+
# Unit tests
23+
cargo test --all-features
24+
25+
# Clippy lints (must pass with zero warnings)
26+
cargo clippy --all-targets --all-features -- -D warnings
27+
28+
# Format check
29+
cargo fmt -- --check
30+
31+
# Integration tests (requires Docker)
32+
docker compose -f tests/docker-compose.yml up -d
33+
INTEGRATION=1 cargo test --all-features -- --ignored
34+
docker compose -f tests/docker-compose.yml down
35+
36+
# Helm chart tests
37+
helm unittest charts/initium
38+
```
39+
40+
## Adding a new subcommand
41+
42+
See [docs/design.md](docs/design.md) for the architecture and step-by-step guide.
43+
44+
In short:
45+
46+
1. Create `src/cmd/yourcommand.rs` with a `pub fn run(log: &Logger, ...) -> Result<(), String>`
47+
2. Add the variant to the `Commands` enum in `src/main.rs`
48+
3. Wire it up in the `match cli.command` block in `main()`
49+
4. Add flags with `#[arg(...)]` and env var support via `env = "INITIUM_*"`
50+
5. Add unit tests in the same file
51+
6. Add integration tests in `tests/integration_test.rs`
52+
7. Document in `docs/usage.md` and `README.md`
53+
8. Update `Changelog.md` under `[Unreleased]`
54+
55+
## Pull request expectations
56+
57+
- All CI checks must pass (clippy, fmt, tests, helm-lint, build)
58+
- Include a "How to verify" section in the PR description
59+
- Keep diffs small and focused — separate refactors from features
60+
- Update docs and CHANGELOG for user-visible changes
61+
62+
## Code style
63+
64+
- Prefer clear code over comments
65+
- Propagate errors with context (`map_err(|e| format!("...: {}", e))`)
66+
- Use `clippy` lints and `rustfmt` defaults
67+
- Follow existing patterns in the codebase
68+
69+
## Security
70+
71+
- Never log secrets — use the redaction built into `Logger`
72+
- Constrain file writes to `--workdir` via `safety::validate_file_path`
73+
- Default to the most restrictive option
74+
75+
## Reporting vulnerabilities
76+
77+
See [SECURITY.md](SECURITY.md).

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ version = "0.1.0"
44
edition = "2021"
55
description = "Swiss-army toolbox for Kubernetes initContainers"
66
license = "Apache-2.0"
7+
repository = "https://github.com/KitStream/initium"
8+
homepage = "https://github.com/KitStream/initium"
9+
documentation = "https://github.com/KitStream/initium/blob/main/docs/usage.md"
10+
keywords = ["kubernetes", "initcontainer", "sidecar", "container", "devops"]
11+
categories = ["command-line-utilities", "development-tools"]
12+
readme = "README.md"
713

814
[[bin]]
915
name = "initium"

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ Initium replaces fragile bash scripts in your initContainers with a single, secu
77
[![CI](https://github.com/kitstream/initium/actions/workflows/ci.yml/badge.svg)](https://github.com/kitstream/initium/actions/workflows/ci.yml)
88
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
99

10+
## Features
11+
12+
- **Single static binary** — zero runtime dependencies, built `FROM scratch`
13+
- **Tiny image**~1.8 MB multi-arch container (amd64 + arm64)
14+
- **Zero CVEs** — no OS packages, no shell, no attack surface
15+
- **PSA `restricted` compatible** — runs as non-root (UID 65534), read-only filesystem, all capabilities dropped
16+
- **Sidecar mode**`--sidecar` flag keeps the process alive for use as a Kubernetes sidecar container
17+
- **Structured logging** — JSON or text output with automatic secret redaction
18+
- **Retries with backoff** — exponential backoff, jitter, and configurable deadlines on all network operations
19+
- **Declarative database seeding** — YAML/JSON specs with MiniJinja templating, cross-table references, and idempotency
20+
- **Multi-database support** — PostgreSQL, MySQL, and SQLite drivers (optional Cargo features)
21+
- **Environment variable config** — all flags configurable via `INITIUM_*` env vars
22+
1023
## Quickstart
1124

1225
### Wait for Postgres before starting your app
@@ -313,6 +326,20 @@ helm install my-app charts/initium \
313326
--set 'initContainers[0].args[1]=tcp://postgres:5432'
314327
```
315328

329+
## Alternatives
330+
331+
Initium was built to address limitations in existing init container tools:
332+
333+
| Tool | Language | Image size | Multi-tool | Database seeding | Security posture |
334+
| --------------------------------------------------------------------------- | -------- | ----------- | ---------- | ---------------- | ----------------------- |
335+
| **Initium** | Rust | ~1.8 MB | Yes | Yes | PSA `restricted`, no OS |
336+
| [wait-for-it](https://github.com/vishnubob/wait-for-it) | Bash | Needs shell | No | No | Requires shell + netcat |
337+
| [dockerize](https://github.com/jwilder/dockerize) | Go | ~17 MB | Partial | No | Full OS image |
338+
| [k8s-wait-for](https://github.com/groundnuty/k8s-wait-for) | Bash | Needs shell | No | No | Requires shell + kubectl|
339+
| [wait4x](https://github.com/atkrad/wait4x) | Go | ~12 MB | No | No | Minimal OS |
340+
341+
If you only need TCP/HTTP readiness checks, any of these tools work. Initium is designed for teams that also need migrations, seeding, config rendering, and secret fetching in a single security-hardened binary.
342+
316343
## Documentation
317344

318345
- [FAQ](FAQ.md) — Common questions about functionality, security, and deployment
@@ -322,7 +349,7 @@ helm install my-app charts/initium \
322349

323350
## Contributing
324351

325-
Contributions are welcome! Please see the [design doc](docs/design.md) for how to add new subcommands.
352+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for build instructions, test commands, and PR expectations. See the [design doc](docs/design.md) for how to add new subcommands.
326353

327354
## License
328355

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
repositoryID: initium
2+
owners:
3+
- name: Kitstream
4+
email: opensource@kitstream.io

0 commit comments

Comments
 (0)