Skip to content

Commit

Permalink
feat: removal of all addons (#1247)
Browse files Browse the repository at this point in the history
* feat: removal of all addons

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

* fix: update the mj script

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

* fix: remove the default namespace

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

* fix: remove descheduler and move reloader into flux-system

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

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
  • Loading branch information
onedr0p committed Jan 25, 2024
1 parent a5cb9b8 commit e321b14
Show file tree
Hide file tree
Showing 91 changed files with 13 additions and 2,019 deletions.
53 changes: 0 additions & 53 deletions .github/tests/addons.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
- k3s-ipv4
- k3s-ipv6
- talos
addon-files: ["addons"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -79,7 +78,6 @@ jobs:
run: |
task init
cp ./.github/tests/config-${{ matrix.config-files }}.yaml ./bootstrap/vars/config.yaml
cp ./.github/tests/${{ matrix.addon-files }}.yaml ./bootstrap/vars/addons.yaml
export BOOTSTRAP_AGE_PUBLIC_KEY=$(sed -n 's/# public key: //gp' age.key)
envsubst < ./bootstrap/vars/config.yaml | sponge ./bootstrap/vars/config.yaml
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ You have two different options for setting up your local workstation. First one

### 🔧 Stage 3: Do bootstrap configuration

📍 _Both `bootstrap/vars/config.yaml` and `bootstrap/vars/addons.yaml` files contain necessary information that is **vital** to the bootstrap process._
📍 _The_ `bootstrap/vars/config.yaml` contain necessary information that is **vital** to the bootstrap process._

1. Generate the `bootstrap/vars/config.yaml` and `bootstrap/vars/addons.yaml` configuration files.
1. Generate the `bootstrap/vars/config.yaml` configuration file.

```sh
task init
Expand Down Expand Up @@ -282,8 +282,6 @@ You have two different options for setting up your local workstation. First one

6a. Ensure `bootstrap_acme_production_enabled` is set to `false`.

6b. [Optional] Update `bootstrap/vars/addons.yaml` and enable applications you would like included.

7. Once done run the following command which will verify and generate all the files needed to continue.

📍 _The following configure task will create a `./ansible` directory for k3s or k0s and the following directories under `./kubernetes` for all distributions_
Expand Down
8 changes: 1 addition & 7 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ vars:
KUBERNETES_DIR: "{{.ROOT_DIR}}/kubernetes"
PRIVATE_DIR: "{{.ROOT_DIR}}/.private"
# Files
BOOTSTRAP_ADDONS_FILE: "{{.BOOTSTRAP_DIR}}/vars/addons.yaml"
BOOTSTRAP_CONFIG_FILE: "{{.BOOTSTRAP_DIR}}/vars/config.yaml"
KUBECONFIG_FILE: "{{.ROOT_DIR}}/kubeconfig"
MAKEJINJA_CONFIG_FILE: "{{.ROOT_DIR}}/makejinja.toml"
Expand Down Expand Up @@ -42,18 +41,14 @@ tasks:
desc: Initialize configuration files
cmds:
- mkdir -p {{.PRIVATE_DIR}}
- cp -n {{.BOOTSTRAP_ADDONS_FILE | replace ".yaml" ".sample.yaml"}} {{.BOOTSTRAP_ADDONS_FILE}}
- cp -n {{.BOOTSTRAP_CONFIG_FILE | replace ".yaml" ".sample.yaml"}} {{.BOOTSTRAP_CONFIG_FILE}}
- cmd: echo === Configuration files copied ===
- cmd: echo === Configuration file copied ===
silent: true
- cmd: echo Proceed with updating the configuration files...
silent: true
- cmd: echo {{.BOOTSTRAP_CONFIG_FILE}}
silent: true
- cmd: echo {{.BOOTSTRAP_ADDONS_FILE}}
silent: true
status:
- test -f "{{.BOOTSTRAP_ADDONS_FILE}}"
- test -f "{{.BOOTSTRAP_CONFIG_FILE}}"

configure:
Expand All @@ -72,7 +67,6 @@ tasks:
- { msg: "Missing virtual environment", sh: "test -d {{.ROOT_DIR}}/.venv" }
- { msg: "Missing Makejinja config file", sh: "test -f {{.MAKEJINJA_CONFIG_FILE}}" }
- { msg: "Missing Makejinja plugin file", sh: "test -f {{.BOOTSTRAP_DIR}}/scripts/plugin.py" }
- { msg: "Missing bootstrap addons file", sh: "test -f {{.BOOTSTRAP_ADDONS_FILE}}" }
- { msg: "Missing bootstrap config file", sh: "test -f {{.BOOTSTRAP_CONFIG_FILE}}" }

.validate:
Expand Down
6 changes: 1 addition & 5 deletions bootstrap/scripts/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from typing import Any

from typing import Any
from bcrypt import hashpw, gensalt
from netaddr import IPNetwork

import makejinja
Expand All @@ -21,9 +20,6 @@ def nthhost(value: str, query: int) -> str:
return False
return value

def encrypt(value: str) -> str:
return hashpw(value.encode(), gensalt(rounds=10)).decode("ascii")

def import_filter(file: Path) -> Callable[[dict[str, Any]], bool]:
module_path = file.relative_to(Path.cwd()).with_suffix("")
module_name = str(module_path).replace("/", ".")
Expand All @@ -50,7 +46,7 @@ def __init__(self, data: dict[str, Any], config: makejinja.config.Config):
validation.validate(data)

def filters(self) -> makejinja.plugin.Filters:
return [nthhost, encrypt]
return [nthhost]

def path_filters(self):
return [self._mjfilter_func]
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit e321b14

Please sign in to comment.