Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
target/
.git/
bin/
*.md
docs/
examples/
charts/
tests/
.github/
32 changes: 9 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: dtolnay/rust-toolchain@stable
with:
go-version: "1.25"
- run: go vet ./...
- run: |
go install golang.org/x/tools/cmd/staticcheck@latest || true
if command -v staticcheck >/dev/null 2>&1; then
staticcheck ./...
else
echo "staticcheck not available, skipping"
fi
components: clippy, rustfmt
- run: cargo fmt --check
- run: cargo clippy -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.25"
- run: go test ./... -count=1 -timeout 60s -race -coverprofile=coverage.out
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.out
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all
build:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.25"
- run: make build
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- uses: actions/upload-artifact@v4
with:
name: initium-binary
path: bin/initium
path: target/release/initium
helm-lint:
runs-on: ubuntu-latest
steps:
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,29 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: read
packages: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.25"

- run: go test ./... -count=1 -timeout 60s -race

- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"

- uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -47,7 +36,6 @@ jobs:
ghcr.io/kitstream/initium:latest
sbom: true
provenance: true

- uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -61,4 +49,3 @@ jobs:
ghcr.io/kitstream/initium-jyq:latest
sbom: true
provenance: true

17 changes: 2 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
# IDE
.idea/
*.iml
# Go
target/
bin/
*.exe
*.dll
*.so
*.dylib
# Test
*.test
*.out
coverage.out
# OS
.DS_Store
Thumbs.db
CLAUDE.md
CLAUDE.md
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Complete rewrite from Go to Rust for ~76% smaller Docker images (7.4MB → 1.8MB)
- CLI framework changed from cobra to clap
- Template engine changed from Go text/template to minijinja (Jinja2-style); access env vars via `{{ env.VAR }}`
- CI/CD workflows updated for Rust toolchain (cargo test, clippy, rustfmt)
- Dockerfiles updated to use rust:1.85-alpine builder with musl static linking

### Added
- `exec` subcommand: run arbitrary commands with structured logging, exit code forwarding, and optional `--workdir` for child process working directory
- `jyq.Dockerfile` and `initium-jyq` container image variant with pre-built `jq` and `yq` tools
- Documentation for building custom images using Initium as a base
- `fetch` subcommand and `internal/fetch` package: fetch secrets/config from HTTP(S) endpoints with auth header via env var, retry with backoff, TLS options, redirect control (same-site by default), and path traversal prevention
- `render` subcommand and `internal/render` package: render templates into config files with `envsubst` (default) and Go `text/template` modes, path traversal prevention, and automatic intermediate directory creation
- `render` subcommand and `internal/render` package: render templates into config files with `envsubst` (default) and Jinja2 template modes, path traversal prevention, and automatic intermediate directory creation
- `seed` subcommand: run database seed commands with structured logging and exit code forwarding (no idempotency — distinct from `migrate`)
- `migrate` subcommand: run database migration commands with structured logging, exit code forwarding, and optional idempotency via `--lock-file`
- FAQ.md with functionality, security, and deployment questions for junior-to-mid-level engineers
- Project scaffolding with Go module, CLI framework (cobra), and repo layout
- Project scaffolding with Rust/Cargo, CLI framework (clap), and repo layout
- `wait-for` subcommand: wait for TCP and HTTP(S) endpoints with retries, exponential backoff, and jitter
- `internal/retry` package with configurable retry logic, backoff, and jitter
- `internal/logging` package with text and JSON structured logging, automatic secret redaction
Expand Down
Loading