Skip to content

Commit

Permalink
fix #132: don't overwrite k3s custom config (#133)
Browse files Browse the repository at this point in the history
* fix #132: don't overwrite k3s custom config

* change README ordering of upgrade instructions and make sure tests ignore docs/ci changes

* update pypi description
  • Loading branch information
jessebot authored Jan 10, 2024
1 parent 853e2bb commit ffe9840
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 141 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-smol-k8s-lab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches-ignore:
- "main"
paths-ignore:
- ".github/**"
- "README.md"
- "docs/**"
jobs:
smol_k8s_lab_kind:
runs-on: ubuntu-latest
Expand Down
93 changes: 47 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,52 +73,6 @@ After you've followed the installation instructions, if you're *new* to `smol-k8
smol-k8s-lab
```

<details>
<summary><h3>Upgrading your config to v1.x</h3></summary>

If you've installed smol-k8s-lab prior to `v1.0.0`, please backup your old configuration, and then remove the `~/.config/smol-k8s-lab/config.yaml` (or `$XDG_CONFIG_HOME/smol-k8s-lab/config.yaml`) file entirely, then run the following:

```yaml
# this upgrades smol-k8s-lab
pip3.11 install --upgrade smol-k8s-lab

# this initializes a new configuration
smol-k8s-lab
```

### Adding custom Applications

You can create any application you already have an Argo CD application repo for, by following a simple application YAML schema in `~/.config/smol-k8s-lab/config.yaml` like this:

```yaml
apps:
# name of application to create in Argo CD
cert_manager:
# if set to false, we ignore this app
enabled: true
argo:
# secret keys to pass to Argo CD Application Set Generator
secret_keys:
# Used for letsencrypt-staging, to generate certs. If set to "" and cert-manager.enabled is true
# smol-k8s-lab will prompt for this value and save it back to this file for you.
email: ""
# 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!
path: "ingress/cert-manager/"
# either the branch or tag to point at in the argo repo above
ref: "main"
# namespace to install the k8s app in
namespace: "ingress"
# source repos for cert-manager CD App Project (in addition to cert-manager.argo.repo)
project_source_repos:
- https://charts.jetstack.io
```
Note: the above application, cert-manager, is already included as a default application in smol-k8s-lab :)
</details>
<details>
<summary><h3>Upgrading config from v1.x to v2.x</h3></summary>

Expand Down Expand Up @@ -193,6 +147,53 @@ apps:
</details>
<details>
<summary><h3>Upgrading your config to v1.x</h3></summary>
If you've installed smol-k8s-lab prior to `v1.0.0`, please backup your old configuration, and then remove the `~/.config/smol-k8s-lab/config.yaml` (or `$XDG_CONFIG_HOME/smol-k8s-lab/config.yaml`) file entirely, then run the following:

```yaml
# this upgrades smol-k8s-lab
pip3.11 install --upgrade smol-k8s-lab
# this initializes a new configuration
smol-k8s-lab
```

### Adding custom Applications

You can create any application you already have an Argo CD application repo for, by following a simple application YAML schema in `~/.config/smol-k8s-lab/config.yaml` like this:

```yaml
apps:
# name of application to create in Argo CD
cert_manager:
# if set to false, we ignore this app
enabled: true
argo:
# secret keys to pass to Argo CD Application Set Generator
secret_keys:
# Used for letsencrypt-staging, to generate certs. If set to "" and cert-manager.enabled is true
# smol-k8s-lab will prompt for this value and save it back to this file for you.
email: ""
# 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!
path: "ingress/cert-manager/"
# either the branch or tag to point at in the argo repo above
ref: "main"
# namespace to install the k8s app in
namespace: "ingress"
# source repos for cert-manager CD App Project (in addition to cert-manager.argo.repo)
project_source_repos:
- https://charts.jetstack.io
```

Note: the above application, cert-manager, is already included as a default application in smol-k8s-lab :)

</details>


# Under the hood
Note: this project is not officially affiliated with any of the below tooling or applications.

Expand Down
Loading

0 comments on commit ffe9840

Please sign in to comment.