Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0: Support adding new nodes to k3s; Support dns01 challenge for lets encrypt; Graduate home assistant to a live app; Update CI tests #163

Merged
merged 39 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
06e3223
initial rework of default issuers for cert manager
jessebot Mar 13, 2024
b64ad35
add more tui components for extra nodes
jessebot Mar 13, 2024
e6995de
moved the k3s additional nodes box to a tab on the distro config page
jessebot Mar 13, 2024
269120b
finish up initial tui pass 1 for new nodes to the cluster
jessebot Mar 13, 2024
406252e
add totoro placeholder, fix dropdown, and rig up submit button for ne…
jessebot Mar 14, 2024
6d9fa12
add updating yaml for new nodes and actual function for adding new no…
jessebot Mar 14, 2024
f63a442
add more detailed comments in default config file for adding new nodes
jessebot Mar 14, 2024
63a682d
finish up making sure that extra node taints and labels are processed…
jessebot Mar 14, 2024
33d53a3
make labels have spaces instead of _ for input/dropdown generic widge…
jessebot Mar 14, 2024
ed34cb4
fix deleting a node
jessebot Mar 14, 2024
84855bc
graduating home assitant to prod and adding more docs on affinity and…
jessebot Mar 14, 2024
80e2064
update the cert manager docs to include info on DNS01 challenge type …
jessebot Mar 14, 2024
3d36a8d
cleaning up handling of dns01 challenge solvers for certmanager ACME …
jessebot Mar 14, 2024
93db5e0
updating cert-manager app in default config to new spec
jessebot Mar 14, 2024
4100306
update empty fields checker to pass on certmanager if we're using htt…
jessebot Mar 14, 2024
e3b6713
rig up the cli portion of the k3s remote node join cluster functionality
jessebot Mar 14, 2024
52edb85
update docs and screenshots on add news nodes via the tui and config …
jessebot Mar 14, 2024
4d61e30
update certmanager docs
jessebot Mar 14, 2024
8f9473c
fix broken bool_option widget, update screenshot of new node tab for k3s
jessebot Mar 14, 2024
99f4190
fix wrong variable for solver being used in clusterissuer creation
jessebot Mar 14, 2024
140e2d3
fixed forgot to pass in k8s_obj to create_cluster_issuers for cert_ma…
jessebot Mar 14, 2024
5fc76ca
switch from using explicit sensitive values for cert manager
jessebot Mar 14, 2024
0564c0d
fix issues with taints/labels for new nodes and fix issue with ssh ke…
jessebot Mar 14, 2024
dd888fb
fix issue with sshing into another node by single quoting the command…
jessebot Mar 15, 2024
05a13df
update the version to be v3.0 and explain breaking changes in the readme
jessebot Mar 15, 2024
0590d63
clean up cert manager docs, home assistant docs, and readme upgrade docs
jessebot Mar 15, 2024
a4b1521
note the home assitant change from demo to live app
jessebot Mar 15, 2024
9535fca
update the join for default ssh key file to be a separate var
jessebot Mar 15, 2024
942d59e
run k3s and kind tests in different jobs
jessebot Mar 15, 2024
04e4538
add a debug line for init dict for cert-manager
jessebot Mar 15, 2024
0c83a68
update the ci config files for both k3s and kind to latest config fil…
jessebot Mar 15, 2024
5011d73
add k3s kubeconfig variable for ci job
jessebot Mar 15, 2024
c6c6061
remove debug line with sensitive info for cert manager
jessebot Mar 15, 2024
89a35ca
remove k3s ip debug line
jessebot Mar 15, 2024
00ecbfe
add a cli test for k3d
jessebot Mar 15, 2024
a1c51e2
update the contributing docs to mention that we have some ci tests vi…
jessebot Mar 15, 2024
4e2a43b
update k3d tests to install k3d
jessebot Mar 15, 2024
613a742
add confirmation screen doc page and work on bitwarden screenshots
jessebot Mar 15, 2024
302f05a
update docs for bitwarden credentials screen
jessebot Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,115 changes: 1,115 additions & 0 deletions .github/smol_k8s_lab_config_k3d.yaml

Large diffs are not rendered by default.

25 changes: 16 additions & 9 deletions .github/smol_k8s_lab_config_k3s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ k8s_distros:
- "ingress-ready=true"
kubelet-arg:
- "max-pods=150"
# not yet adjustable on k3s at this time
nodes:
control_plane: 1
workers: 0
nodes: {}

k3d:
# set to true to enable deploying a Kubernetes cluster using k3d
Expand Down Expand Up @@ -196,13 +193,23 @@ apps:
# Initialize of the app through smol-k8s-lab
init:
# Deploys staging and prod ClusterIssuers and prompts you for
# cert-manager.argo.secret_keys if they were not set. Switch to false if
# you don't want to deploy any ClusterIssuers
# values if they were not set. Switch to false if you don't want
# to deploy any ClusterIssuers
enabled: true
argo:
secret_keys:
# Used for letsencrypt-staging, to generate certs
values:
# Used for to generate certs and alert you if they're going to expire
email: "[email protected]"
# choose between "http01" or "dns01"
cluster_issuer_acme_challenge_solver: http01
# only needed if cluster_issuer_challenge_solver set to dns01
# currently only cloudflare is supported
cluster_issuer_acme_dns01_provider: cloudflare
sensitive_values:
# can be passed in as env vars if you pre-pend CERT_MANAGER_
# e.g. CERT_MANAGER_CLOUDFLARE_API_TOKEN
- CLOUDFLARE_API_TOKEN
argo:
secret_keys: {}
# git repo to install the Argo CD app from
repo: "https://github.com/small-hack/argocd-apps"
# path in the argo repo to point to. Trailing slash very important!
Expand Down
20 changes: 15 additions & 5 deletions .github/smol_k8s_lab_config_kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,23 @@ apps:
# Initialize of the app through smol-k8s-lab
init:
# Deploys staging and prod ClusterIssuers and prompts you for
# cert-manager.argo.secret_keys if they were not set. Switch to false if
# you don't want to deploy any ClusterIssuers
# values if they were not set. Switch to false if you don't want
# to deploy any ClusterIssuers
enabled: true
argo:
secret_keys:
# Used for letsencrypt-staging, to generate certs
values:
# Used for to generate certs and alert you if they're going to expire
email: "[email protected]"
# choose between "http01" or "dns01"
cluster_issuer_acme_challenge_solver: http01
# only needed if cluster_issuer_challenge_solver set to dns01
# currently only cloudflare is supported
cluster_issuer_acme_dns01_provider: cloudflare
sensitive_values:
# can be passed in as env vars if you pre-pend CERT_MANAGER_
# e.g. CERT_MANAGER_CLOUDFLARE_API_TOKEN
- CLOUDFLARE_API_TOKEN
argo:
secret_keys: {}
# git repo to install the Argo CD app from
repo: "https://github.com/small-hack/argocd-apps"
# path in the argo repo to point to. Trailing slash very important!
Expand Down
70 changes: 68 additions & 2 deletions .github/workflows/test-smol-k8s-lab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
pull_request:
paths-ignore:
- ".github/**"
- "mkdocs.yaml"
- "README.md"
- "docs/**"
jobs:
smol_k8s_lab_test:
test_kind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -16,7 +17,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@v1
Expand All @@ -39,7 +40,72 @@ jobs:
source .venv/bin/activate
smol-k8s-lab -c .github/smol_k8s_lab_config_kind.yaml

test_k3s:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install smol-k8s-lab via poetry
run: poetry install

- name: Install Argo CD cli
run: |
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64

- name: test smol-k8s-lab with k3s
run: |
source .venv/bin/activate
export KUBECONFIG="/home/runner/.config/kube/config"
smol-k8s-lab -c .github/smol_k8s_lab_config_k3s.yaml

test_k3d:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install smol-k8s-lab via poetry
run: poetry install

- name: Install Argo CD cli
run: |
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64

- name: Install k3d
run: |
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash

- name: test smol-k8s-lab with k3d
run: |
source .venv/bin/activate
export KUBECONFIG="/home/runner/.config/kube/config"
smol-k8s-lab -c .github/smol_k8s_lab_config_k3d.yaml
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If it's a code fix, please:

We also utilize the [Bitwarden cli], for a password manager so you never have to see/know your Argo CD password.

NOTE: We're open to unit, integration, and ci testing btw! We just don't have any because we weren't stable enough to justify them yet. 🤦
NOTE: We're open to unit and integration tests btw! We just don't have anything but ci via Github Actions, because we weren't stable enough to justify them yet. 🤦

### Prereqs

Expand Down
Loading
Loading