Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charlie-haley/home-infra
A monorepo for managing my home infrastructure using GitOps.
https://github.com/charlie-haley/home-infra
flux gitops k8s k8s-at-home kubernetes oci talos
Last synced: about 1 month ago
JSON representation
A monorepo for managing my home infrastructure using GitOps.
- Host: GitHub
- URL: https://github.com/charlie-haley/home-infra
- Owner: charlie-haley
- Created: 2021-02-16T14:33:23.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T19:56:41.000Z (3 months ago)
- Last Synced: 2024-09-17T18:37:51.437Z (3 months ago)
- Topics: flux, gitops, k8s, k8s-at-home, kubernetes, oci, talos
- Language: Go
- Homepage:
- Size: 4.55 MB
- Stars: 28
- Watchers: 2
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# home-infra
One Repo to Rule Them All.
A monorepo for managing my home infrastructure using GitOps.
## π Folder Structure
```
βββ docs # Documentation as markdown files.
βββ hack # Scripts and other bits
βββ kubernetes # Kubernets manifests
βΒ Β βββ bootstrap # Manifests required when bootstrapping the cluster for the first time
βΒ Β βββ manifests # Application deployment manifests
βΒ Β βββ templates # Local Helm templates
```## βΈοΈ Kubernetes
I run a bare metal cluster provisioned using [Talos Linux](https://www.talos.dev/) and managed using [Flux](https://fluxcd.io/). The cluster is comprised of 3 worker nodes and 1 control plane node.
| Hostname | Node | Resources |
| --------- | ----------------- | ------------------ |
| vilya-c01 | Lenovo M720q Tiny | 16GB RAM, i5-9500t |
| vilya-w01 | Lenovo M720q Tiny | 16GB RAM, i5-9500t |
| vilya-w02 | Lenovo M720q Tiny | 16GB RAM, i5-9500t |
| vilya-w03 | Lenovo M720q Tiny | 16GB RAM, i5-9500t |### βοΈ GitOps
I use Flux to manage deployments to the cluster, everything that is deployed to my cluster is defined as YAML files in the `kubernetes/manifests/` directory.
```
βββ manifests # Manifests deployed to the cluster
βΒ Β βββ cert-manager # The namespace for all the files in the directory to be deployed to
βΒ Β βββ home
βΒ Β βββ storage
βββ gitops # Anything and everything Flux/GitOps related
βββ flux-system
```To save on duplicate code and reduce the management overhead of adding new Flux Kustomization's, Namespaces and other boilerplate config. I template all of my manifests and deploy them up to GHCR as an OCI image. This is done through a (pretty hacky) bash script which reads the provided YAML file and actions it based on the contents.
The script is triggered by Github Actions, a webhook is then fired after the package is uploaded which tells Flux to reconcile the cluster with the state from the OCI image.
## π Thanks
Thanks to everyone in the [Kubernetes@Home Discord community](https://discord.gg/k8s-at-home) Inspiration for how to deploy and my manage my cluster has been influenced heavily by everyone who's shared their clusters using the [k8s-at-home GitHub tag](https://github.com/topics/k8s-at-home).