This document provides context and common maintenance actions for the home-ops repository. It is designed to help the Gemini CLI understand the repository structure and available automation tools.
This repository manages a home operations infrastructure using Kubernetes, Flux, and Ansible. It uses task (Taskfile) as the primary entry point for automation and maintenance.
-
Reconcile Flux: Force Flux to pull the latest changes from the git repository.
task flux:reconcile
-
Apply Flux Kustomization: Manually build and apply a specific Flux Kustomization (useful for testing changes without waiting for git sync).
task flux:apply path=apps/my-app
path: Path underkubernetes/appscontaining theks.yaml.ns: Namespace (default:flux-system).
-
Gather Cluster Resources: List common resources (Nodes, GitRepositories, Kustomizations, HelmReleases, etc.) for debugging.
task k8s:resources
-
Validate Manifests: Run
kubeconformagainst the Kubernetes manifests.task k8s:kubeconform
-
Configure Repository: Configure the repository from bootstrap variables (generates secrets, validates config).
task configure
-
Clean Up: Remove files no longer needed after cluster bootstrap.
task repo:clean
-
Reset Configuration: Reset templated configuration files to their default state.
task repo:reset
-
Force Reset: Reset the repository back to HEAD, cleaning all changes.
task repo:force-reset
-
Run Playbook: Run a specific Ansible playbook.
task ansible:run playbook=cluster-installation
-
Ping Hosts: Check connectivity to all Ansible hosts.
task ansible:ping
-
List Hosts: List all hosts in the Ansible inventory.
task ansible:list
-
Uptime: Check uptime of all hosts.
task ansible:uptime
-
Create the application manifests in
kubernetes/apps/<category>/<app-name>. -
Create a
ks.yaml(Flux Kustomization) for the app. -
Validate the manifests:
task k8s:kubeconform
-
Apply the changes manually to test (optional):
task flux:apply path=<category>/<app-name>
-
Commit and push changes.
-
Reconcile Flux to sync immediately:
task flux:reconcile
-
Check the status of Flux resources:
task k8s:resources
-
If a HelmRelease is stuck, try reconciling the cluster kustomization:
task flux:reconcile
-
View logs for a specific pod (standard kubectl):
kubectl logs -n <namespace> <pod-name>
kubernetes/: Kubernetes manifests and Flux configuration.ansible/: Ansible playbooks and inventory..taskfiles/: Definitions for thetaskCLI.scripts/: Helper scripts used by tasks.