Skip to content

feat: add kubernetes deployment, healthz endpoint, and image ci - #14

Merged
Xe merged 4 commits into
mainfrom
Xe/objgit-kustomize
Sep 23, 2026
Merged

Xe merged 4 commits into
mainfrom
Xe/objgit-kustomize

Conversation

@Xe

@Xe Xe commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a kustomize deployment under manifest/: one objgitd pod, a 16Gi pack-cache PVC on the default StorageClass, a Service exposing HTTP (80), git:// (9418), and SSH (22), a separate Service for metrics (9090), and startup/liveness/readiness probes.
  • Add a GET /healthz endpoint on the metrics listener, with a table-driven test.
  • Add .github/workflows/docker.yml: on every commit, build and publish linux/amd64 + linux/arm64 images to ghcr.io (branch, sha-<commit>, latest, and release tags), with a container smoke test against /healthz before anything is pushed.
  • Sweep orphaned objgit-packs-* cache directories at NewPackCache startup, so a crash on a persistent pack-cache volume cannot starve the cache budget.
  • Document the deployment in docs/usage/kubernetes.md.

Details

The Dockerfile now pins the build stage to $BUILDPLATFORM and cross-compiles through GOOS/GOARCH, so one native runner builds both platforms with no emulation. The pod mounts an emptyDir at /tmp because the root filesystem is read-only and the tigris storer stages pack writes with os.CreateTemp. The Deployment runs one replica with a Recreate strategy, because the claim is ReadWriteOnce. New GHCR packages start private, so make the package public or configure an imagePullSecret before applying.

Test plan

  • Code compiles with go build ./...
  • Code formatted with npm run format
  • Manual testing: go test ./... passes; kubectl kustomize manifest/ renders; native and cross-compiled images build and answer /healthz; workflow passes actionlint and zizmor.

Xe added 3 commits September 23, 2026 15:55
Add a kustomize deployment under manifest/: one objgitd pod with a 16Gi
pack-cache PVC on the default storage class, a Service for HTTP, git://,
and SSH, a second Service for metrics, and probes against a new
GET /healthz endpoint on the metrics listener.

The metrics mux moves into newMetricsMux so the health endpoint is
testable. NewPackCache now sweeps objgit-packs-* directories left by a
run that died without Cleanup, which otherwise starve a persistent
pack-cache volume. The Dockerfile cross-compiles through TARGETOS and
TARGETARCH with the build stage pinned to BUILDPLATFORM, and docker.yml
builds and publishes multi-arch images to ghcr.io on every commit, with
a smoke test before any push.

Assisted-by: GLM 5.3 via OpenCode
Signed-off-by: Xe Iaso <xe@tigrisdata.com>
The secretGenerator now sets AWS_ACCESS_KEY_ID and
AWS_SECRET_ACCESS_KEY. The AWS SDK default chain reads these from the
environment, which is also what the storage-go client falls back to
when the TIGRIS_STORAGE_* overrides are unset. This matches the names
every AWS tooling expects, and AWS_SESSION_TOKEN works for temporary
credentials.

Assisted-by: GLM 5.3 via OpenCode
Signed-off-by: Xe Iaso <xe@tigrisdata.com>
The configMapGenerator now sets AWS_ENDPOINT_URL_S3,
AWS_ENDPOINT_URL_IAM, and AWS_REGION=auto, so every AWS SDK client in
the pod talks to Tigris. The storage-go wrapper pins the S3 endpoint
itself, so the IAM endpoint matters most for the credential chain of
IRSA.

Assisted-by: GLM 5.3 via OpenCode
Signed-off-by: Xe Iaso <xe@tigrisdata.com>
The secretGenerator now reads AWS_ACCESS_KEY_ID and
AWS_SECRET_ACCESS_KEY from files under manifest/secrets/, which
.gitignore excludes, so real credentials cannot reach the repository.
Kustomize refuses to build when the files are missing, which prevents
an accidental deploy with placeholder values. The files must be written
with printf '%s', because a trailing newline becomes part of the
credential.

Assisted-by: GLM 5.3 via OpenCode
Signed-off-by: Xe Iaso <xe@tigrisdata.com>
@Xe
Xe merged commit 38e173f into main Sep 23, 2026
10 checks passed
Xe pushed a commit that referenced this pull request Sep 23, 2026
# [1.6.0](v1.5.1...v1.6.0) (2026-09-23)

### Features

* add kubernetes deployment, healthz endpoint, and image ci ([#14](#14)) ([38e173f](38e173f))

Signed-off-by: Tigris Data <social@tigrisdata.com>
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants