small-hack / smol-k8s-lab

☁️ CLI & TUI with a smol friendly vibe to get started with Kubernetes on metal, then bootstrap apps using Argo CD 🧸 Great for testing webapps and benchmarking.
https://small-hack.github.io/smol-k8s-lab/
GNU Affero General Public License v3.0
12 stars 1 forks source link

`v5.0.0`: backup/restore apps, overhaul TTS, add new node to existing cluster + :bug: fixes #210

Closed jessebot closed 4 months ago

jessebot commented 5 months ago

Features

Sensitive Values Overhaul

apps:
  nextcloud:
    init:
      values:
        admin_user: nextcloud_admin_user
        smtp_user: my-smtp-username
        smtp_host: my-smtp-host.com
        # this value is taken from an external source
        smtp_password:
          value_from:
            # you can change this to any environment variable present at the time of running smol-k8s-lab
            env: NC_SMTP_PASSWORD

NOTE: the TUI doesn't support setting sensitive values via value_from right now. It will just pull your sensitive value and change it to dots. This feature will come at a later date.

Backups and Restores

currently only supported for a handful of apps (nextcloud, matrix, mastodon, home assistant, and zitadel), but more coming soon!

apps:
  nextcloud:
    backups:
      # cronjob syntax schedule to run nextcloud pvc backups
      pvc_schedule: 10 0 * * *
      # cronjob syntax (with SECONDS field) for nextcloud postgres backups
      # must happen at least 10 minutes before pvc backups, to avoid corruption
      # due to missing files. This is because the cnpg backup shows as completed
      # before it actually is, due to the wal archive it lists as it's end not
      # being in the backup yet
      postgres_schedule: 0 0 0 * * *
      s3:
        # these are for pushing remote backups of your local s3 storage, for speed and cost optimization
        endpoint: s3.eu-central-003.backblazeb2.com
        bucket: my-nextcloud-bucket
        region: eu-central-003
        secret_access_key:
          value_from:
            env: NC_S3_BACKUP_SECRETKEY
        access_key_id:
          value_from:
            env: NC_S3_BACKUP_ACCESS_ID
      restic_repo_password:
        value_from:
          env: NC_RESTIC_REPO_PASS
apps:
  nextcloud:
    init:
      enabled: true
      # this is the restore section, as it's a type of initialization
      restore:
        enabled: true
        # for postgresql cluster restores using the cloud native postgresql operator
        cnpg_restore: true
        # these can all be set to any restic snapshot ID (long or short), but they default to latest
        restic_snapshot_ids:
          seaweedfs_volume: latest
          seaweedfs_filer: latest
          seaweedfs_master: latest
          nextcloud_files: latest

Overhaul the text to speech features to be their own widget called SmolAudio

New nodes for k3s after cluster is already up

Release process

We will now attempt to release an appimage each time we release :) This will assist in ensuring the brew install goes more smoothly in the future. This has never been done for this project before, so we expect some initial growing pains on this. Please be patient as we get a consistent appimage.

Misc

smol_k8s_lab:
  run_command:
    # command to run after smol-k8s-lab tui is done or immediately when running
    command: k9s --command applications.argoproj.io
    # tell me which terminal you use if you'd like to use split or tab features, only supports wezterm and zellij right now. submit issue/PR for more options :)
    terminal: wezterm
    # where to run the command, options: same window, new window, new tab, split left, split right, split top, split bottom
    # if set to "same window", we just run the command in the same window after we're done the entire smol-k8s-lab cli run
    window_behavior: split right

Bug Fixes

Misc changes

outstanding tasks

This PR will be merged in conjuction with: https://github.com/small-hack/argocd-apps/pull/695

jessebot commented 4 months ago

just some docs to do, and then we're all set :D