Files
k3s/FINDINGS.md
2026-11-12 23:08:52 +01:00

6.3 KiB

Open findings

This file tracks findings from the repository compliance review against the accepted decisions in AGENTS.md. The root README.md now documents the repository and manual operations; the findings below are the remaining unresolved items.

DEC-001 — Kubernetes is not yet the primary infrastructure

Status: Open

The root kustomization.yaml currently reconciles Flux, DNS, the agent gateway, and network-policy scaffolding, but no production application workloads. Production services are still documented as Docker Swarm deployments in PROD.md, and service definitions remain under poc/, nextcloud/, and hermes_squid/.

Required follow-up:

  • Define target Kubernetes namespaces and ownership for production services.
  • Add application overlays under k3s_rencher/.
  • Migrate services to Kubernetes one at a time.
  • Add migrated workloads to the root Kustomize entry point.
  • Replace production Swarm instructions after each successful migration.

DEC-003 — Ansible has not been retired

Status: Open

The repository still contains active-looking playbooks, inventory, variables, Galaxy dependencies, and host-management roles:

Required follow-up:

  • Inventory all Ansible-managed resources.
  • Classify each resource as migrated, required for host bootstrap, obsolete, or requiring a Kubernetes replacement.
  • Retain only unavoidable host bootstrap.
  • Deprecate and then remove obsolete playbooks, roles, inventory, and dependencies after replacement procedures are documented.

DEC-004 — Swarm remains the production deployment path

Status: Open

Legacy Swarm files may remain during migration, but PROD.md still instructs operators to initialize Swarm and deploy production services with docker stack deploy. Service documentation also presents Swarm or Docker Compose as the primary deployment method.

Relevant legacy material includes:

Required follow-up:

  • Mark remaining Swarm files and instructions as legacy and identify their migration status.
  • Do not add new Swarm services.
  • Migrate production services to Kubernetes and replace their operational instructions.
  • Keep legacy stack files compatible with docker stack deploy until removed.

DEC-005 — Namespace isolation is incomplete

Status: Partially implemented

The default policies in default-deny.yaml and the DNS exception in allow-dns.yaml are currently applied through the agent-gateway overlay only.

Required follow-up:

  • Create a dedicated Kustomize overlay for every workload namespace.
  • Apply default-deny ingress and egress to every workload namespace.
  • Add explicit ingress, pod-to-pod, and external egress policies per service.
  • Decide and document the policy baseline for flux-system and other system namespaces.
  • Verify that the externally sourced connectivity tester has equivalent namespace and network-policy controls.
  • Review all future uses of hostNetwork, host ports, privileged containers, and node-originated traffic.

DEC-006 — GitOps changes are not sufficiently validated or gated

Status: Partially implemented

Flux reconciliation is configured through flux-system/gitrepository.yaml and flux-system/sync.yaml, but the repository has no visible pull-request validation workflow for Kubernetes changes. The existing release workflow only builds and publishes the connectivity tester image.

Required follow-up:

  • Add pull-request checks for YAML, Kustomize rendering, Kubernetes schemas, network policies, secrets, and image references.
  • Protect the Flux-tracked branch and require review plus passing checks.
  • Document the one-time bootstrap boundary versus normal Flux-managed changes.
  • Add rollback and reconciliation verification procedures.
  • Review whether public Git sources are an intentional trust decision.
  • Prefer immutable image tags or digests over latest for production.

Secret and credential hygiene

Status: Open

Potential credentials and unsafe examples remain in tracked files, including roles/metricbeat/defaults/main.yml, roles/orientdb/defaults/main.yml, scratches/tomcat/tomcat-users.xml, and hermes_squid/README.md.

Required follow-up:

  • Determine whether each value was ever active.
  • Rotate any potentially active credential.
  • Remove credentials from tracked files and examples.
  • Use SOPS, External Secrets, or another approved secret manager for Kubernetes workloads.
  • Keep only clearly fake placeholders in documentation.

Repository structure and lifecycle

Status: Open

The repository is still structured primarily as an Ansible project even though the accepted direction is Kubernetes and GitOps. Kubernetes resources, experimental deployments, legacy stacks, and historical scratch files are mixed together.

Required follow-up:

  • Establish clear ownership boundaries for cluster bootstrap, infrastructure, applications, legacy deployments, and historical material.
  • Consider separating cluster-bootstrap/, infrastructure/, apps/, and legacy/.
  • Archive or remove obsolete material only after its replacement and rollback procedure are documented.
  • Keep the root README.md and this file updated as migrations complete.