Skip to content

feat(KLEF-132): Removed hardcoding to only Minecraft and Kubernetes#26

Merged
NathanRoos merged 3 commits intomainfrom
feat/KLEF-132-Allow_Daemon_To_Work_With_Any_Crate_And_Hosting_Type
Apr 10, 2026
Merged

feat(KLEF-132): Removed hardcoding to only Minecraft and Kubernetes#26
NathanRoos merged 3 commits intomainfrom
feat/KLEF-132-Allow_Daemon_To_Work_With_Any_Crate_And_Hosting_Type

Conversation

@NathanRoos
Copy link
Copy Markdown
Contributor

@NathanRoos NathanRoos commented Apr 10, 2026

Pull Request

Summary

Replaced the hardcoded Kubernetes-only runtime with a universal RuntimeAdapter interface. The daemon now auto-detects whether to use Docker or Kubernetes at startup, verifying both are actually reachable before committing. A full Docker adapter was implemented alongside the unified Kubernetes adapter, making the daemon work locally without any cluster.

Related Issues

Closes #


Changes

What's Included

  • Universal RuntimeAdapter interface replacing the old hardcoded Kubernetes/Docker split
  • Full Docker adapter: image pull, resource limits, persistent volumes, port mapping, container lifecycle
  • Unified Kubernetes adapter: Deployment, StatefulSet, and Agones GameServer strategies in one file
  • detectRuntime now pings Docker to verify it's reachable — won't silently fall back if Kubernetes is misconfigured
  • Removed RuntimeMode config field — runtime is detected automatically
  • Workers migrated from ServerOperationPayload to WorkloadSpec
  • minecraft/vanilla blueprint and construct added to the crate registry

What's Not Included


Testing

How Was This Tested?

  • All worker unit tests updated and passing (go build ./... clean)
  • Deployed a vanilla Minecraft GameServer to a live Kubernetes cluster via testprovision
  • GameServer reached Ready state with ports allocated via Agones dynamic port policy
  • Verified pod running with correct env vars, resource limits, and Agones sidecar
  • Kubernetes: testprovision k8s — provisioned an Agones GameServer, confirmed it reached Ready state with ports allocated
  • Docker: testprovision docker — provisioned a container locally, confirmed Minecraft 1.21.5 running and accessible on the allocated host port

Test Coverage

  • Unit tests added or updated
  • Integration tests added or updated
  • Manually tested end-to-end

Breaking Changes

Does this PR introduce breaking changes?

  • Yes
  • No

If yes, describe the impact and any required migration steps:


Security Considerations

  • This PR affects authentication or authorization logic
  • This PR touches secrets, tokens, or environment variables
  • This PR affects infrastructure, deployment pipelines, or network configuration

If any box is checked, describe the security impact and any mitigations applied:


Documentation

Does this PR require documentation updates?

  • Yes
  • No

If yes, check all that apply:

  • README.md
  • ARCHITECTURE.md
  • API reference
  • Architecture diagrams (C4 / DDD)
  • /docs

UI/UX (If Applicable)

  • Includes new components or views
  • Changes styles or theme tokens
  • Responsive behavior verified
  • Requires design approval

Screenshots or recordings:


Pre-Merge Checklist

  • PR title follows semantic format (feat:, fix:, chore:, docs:, refactor:, test:)
  • All CI checks passing
  • Code follows project style guidelines
  • No debug logs or commented-out code left in
  • Dependencies reviewed (no unnecessary additions)
  • No sensitive information included

Reviewer Notes

@NathanRoos NathanRoos self-assigned this Apr 10, 2026
@github-actions github-actions bot added feature New feature or enhancement tests Test changes labels Apr 10, 2026
@NathanRoos NathanRoos merged commit f31a1d4 into main Apr 10, 2026
7 checks passed
@NathanRoos NathanRoos deleted the feat/KLEF-132-Allow_Daemon_To_Work_With_Any_Crate_And_Hosting_Type branch April 10, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants