feat: distribution is a dict and nodes and cluster are top level (#1288)

* feat: distribution is a dict and nodes and cluster are top level

Signed-off-by: Devin Buhl <devin@buhl.casa>

* chore: housekeeping

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-02-01 20:31:42 -05:00
1 parent cba35dc66a
commit 89673cd17b
55 files changed
+330 -302

No files matched your search

+6 -61
View File
@@ -214,7 +214,7 @@ You have two different options for setting up your local workstation.
### 🔧 Stage 3: Bootstrap configuration
> [!NOTE]
> The [config.sample.yaml](./config.sample.yaml) file contain necessary information that is **vital** to the bootstrap process.
> The [config.sample.yaml](./config.sample.yaml) file contains config that is **vital** to the bootstrap process.
1. Generate the `config.yaml` from the [config.sample.yaml](./config.sample.yaml) configuration file.
@@ -222,72 +222,17 @@ You have two different options for setting up your local workstation.
task init
```
#### 🔧 Stage 3: Flux
2. Fill out the `config.yaml` configuration file using the comments in that file as a guide.
📍 _Using [SOPS](https://github.com/getsops/sops) with [Age](https://github.com/FiloSottile/age) allows us to encrypt secrets and use them with Flux._
1. Create a Age private / public key (this file is gitignored)
```sh
task sops:age-keygen
```
2. Fill out the appropriate vars in `config.yaml`
#### Stage 3: Flux with Cloudflare DNS
> [!NOTE]
> To use `cert-manager` with the Cloudflare DNS challenge you will need to create a API Token.
1. Head over to Cloudflare and create a API Token by going [here](https://dash.cloudflare.com/profile/api-tokens).
2. Under the `API Tokens` section click the blue `Create Token` button.
3. Click the blue `Use template` button for the `Edit zone DNS` template.
4. Name your token something like `home-kubernetes`
5. Under `Permissions`, click `+ Add More` and add each permission below:
```text
Zone - DNS - Edit
Account - Cloudflare Tunnel - Read
```
6. Limit the permissions to a specific account and zone resources.
7. Fill out the appropriate vars in `config.yaml`
#### Stage 3: Flux with Cloudflare Tunnel
> [!NOTE]
> To expose services to the internet you will need to create a [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/).
1. Authenticate cloudflared to your domain
```sh
cloudflared tunnel login
```
2. Create the tunnel
```sh
cloudflared tunnel create k8s
```
3. In the `~/.cloudflared` directory there will be a json file with details you need. Ignore the `cert.pem` file.
4. Fill out the appropriate vars in `config.yaml`
#### Stage 3: Finishing up
1. Complete filling out the rest of the `config.yaml` configuration file.
2. Once done run the following command which will verify and generate all the files needed to continue.
3. Run the following command which will generate all the files needed to continue.
```sh
task configure
```
3. Push you changes to git
4. Push you changes to git
📍 **Verify** all the `*.sops.yaml` and `*.sops.yaml` files under `./kubernetes` directory is **encrypted** with SOPS
📍 _**Verify** all the `./kubernetes/**/*.sops.*` files are **encrypted** with SOPS_
```sh
git add -A
@@ -295,7 +240,7 @@ You have two different options for setting up your local workstation.
git push
```
4. Continue on to ⚡ [**Stage 4**](#-stage-4-prepare-your-nodes-for-kubernetes)
5. Continue on to ⚡ [**Stage 4**](#-stage-4-prepare-your-nodes-for-kubernetes)
### ⚡ Stage 4: Prepare your nodes for Kubernetes