Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
91df195
add a storage-class option for grafana stack
cloudymax Sep 28, 2025
7f94a79
allow ghost source repo: https://small-hack.github.io/ghost-helm-chart
jessebot Sep 28, 2025
676f075
update pyproject version to b3
jessebot Sep 28, 2025
25c4385
chaneg - to _ in grafana backup values
jessebot Sep 28, 2025
c1c373f
update ghost stuff to the latest
jessebot Sep 28, 2025
a739e45
add optinal admin hostname for ghost blogs
jessebot Sep 28, 2025
5b37525
Fix oauth callback uri for forgejo
cloudymax Sep 28, 2025
5ed8695
allow setting the smtp from address for ghost
jessebot Sep 28, 2025
c87b22d
add pxc operator
jessebot Sep 29, 2025
19eaa6f
fix libretranslate and add mysql operator
jessebot Oct 24, 2025
9131ea6
update eso allowed repos
jessebot Oct 24, 2025
0946349
fix pyproject.toml version
jessebot Oct 24, 2025
9ec4635
add forgejo s3_pvc_storage_class as a default secret
jessebot Oct 24, 2025
0605c4e
fix forgejo's restoration of primary PVC
jessebot Oct 24, 2025
3cd73de
use global storage class for forgejo
jessebot Oct 24, 2025
34879bd
add default source repo for forgejo bitnami docker containers
jessebot Oct 24, 2025
bdc2050
fix restore backup configs
jessebot Oct 25, 2025
9d333f9
add secret key for renovate's cronjob schedule
jessebot Oct 25, 2025
1daf639
fix comments for renovate
jessebot Oct 25, 2025
3d0abf1
update forgejo to not restore valkey and update restore to use new cr…
jessebot Oct 26, 2025
ece113e
update the cnpg s3 backup credentials to use ACCESS_KEY_ID and ACCESS…
jessebot Oct 26, 2025
ab1fc4f
fix restores for postgresql
jessebot Oct 26, 2025
b14a25d
add some basic functionality for renovate
jessebot Oct 26, 2025
aaee4fb
update renovate config
jessebot Oct 26, 2025
6282c93
make renovate async
jessebot Oct 26, 2025
7d640cb
add renovate stuff
jessebot Oct 26, 2025
41ab887
add note that we're processing backup values
jessebot Oct 26, 2025
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
28 changes: 13 additions & 15 deletions docs/k8s_apps/experimental/ghost.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ apps:
init:
enabled: false
values:
# admin info
admin_user: ""
admin_email: ""
# smtp info
smtp_host: ""
smtp_user: ""
smtp_port: ""
smtp_protocol: "SMTP"
# smtp from email (verified sender)
smtp_from_address: example.com
smtp_password:
value_from:
env: GHOST_SMTP_PASSWORD
backups:
# cronjob syntax schedule to run ghost pvc backups
pvc_schedule: 10 0 * * *
# cronjob syntax (with SECONDS field) for ghost postgres backups
# must happen at least 10 minutes before pvc backups, to avoid corruption
# due to missing files. This is because the backup shows as completed before
# it actually is
postgres_schedule: 0 0 0 * * *
s3:
# these are for pushing remote backups of your local s3 storage, for speed and cost optimization
endpoint: ""
Expand Down Expand Up @@ -60,18 +65,10 @@ apps:
# affinity_value: ""
# hostname that users go to in the browser
hostname: ""
# admin username
admin_user: "ghost"
# admin email
admin_email: ""
# admin hostname that users go to in the browser
admin_hostname: ""
# title of your title
blog_title: ""
# smtp server
smtp_host: ""
# smtp port
smtp_port: ""
# smtp username
smtp_user: ""
# ghost mysql pvc capacity
mysql_pvc_capacity: 5Gi
# ghost pvc capacity
Expand All @@ -98,6 +95,7 @@ apps:
source_repos:
- registry-1.docker.io
- seaweedfs.github.io/seaweedfs/helm
- https://small-hack.github.io/ghost-helm-chart
destination:
# automatically includes the app's namespace and argocd's namespace
namespaces: []
Expand Down
2 changes: 1 addition & 1 deletion docs/k8s_apps/libretranslate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```yaml
apps:
libre_translate:
libretranslate:
description: |
📖 [link=https://libretranslate.com/]libretranslate[/link] is a self-hosted language translation tool.
This is useful as both a web interface like translate.google.com, but also as an API for use with other apps such as Mastodon
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "smol_k8s_lab"
version = "7.0.0b2"
version = "7.0.0b4"
description = "CLI and TUI to quickly install slimmer Kubernetes distros and then manage apps declaratively using Argo CD"
authors = ["Jesse Hitch <[email protected]>",
"Max Roby <[email protected]>"]
Expand Down
11 changes: 7 additions & 4 deletions smol_k8s_lab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from .k8s_apps.networking.netmaker import configure_netmaker
from .k8s_apps.operators import setup_operators
from .k8s_apps.operators.minio import configure_minio_tenant
from .k8s_apps.social.libre_translate import configure_libretranslate
from .k8s_apps.social.libretranslate import configure_libretranslate
from .k8s_apps.valkey import configure_valkey
from .k8s_distros import create_k8s_distro, delete_cluster
from .tui import launch_config_tui
Expand Down Expand Up @@ -239,6 +239,7 @@ def main(config: str = "",
apps.get('ingress_nginx', {}),
apps.get('cert_manager', {}),
apps.get('cnpg_operator', {}),
apps.get('pxc_operator', {}),
apps['argo_cd'],
SECRETS,
bw)
Expand Down Expand Up @@ -270,6 +271,7 @@ def main(config: str = "",
apps.pop('minio_operator', {'enabled': False}),
apps.pop('seaweedfs', {'enabled': False}),
apps.pop('cnpg_operator', {'enabled': False}),
apps.pop('pxc_operator', {'enabled': False}),
apps.pop('postgres_operator', {'enabled': False}),
apps.pop('openbao', {'enabled': False}),
bw)
Expand Down Expand Up @@ -317,10 +319,10 @@ def main(config: str = "",
configure_tempo(argocd, tempo, bw)

# set up self hosted translation
libre_translate_dict = apps.pop('libre_translate', {'enabled': False})
if libre_translate_dict['enabled']:
libretranslate_dict = apps.pop('libretranslate', {'enabled': False})
if libretranslate_dict['enabled']:
libretranslate_api_key = configure_libretranslate(
argocd, libre_translate_dict, bw
argocd, libretranslate_dict, bw
)
else:
libretranslate_api_key = ""
Expand All @@ -341,6 +343,7 @@ def main(config: str = "",
apps.pop('matrix', {}),
apps.pop('peertube', {}),
apps.pop('writefreely', {}),
apps.pop('renovate', {}),
pvc_storage_class,
zitadel_hostname,
oidc_obj,
Expand Down
70 changes: 42 additions & 28 deletions smol_k8s_lab/config/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ apps:
# set the local s3 provider for forgejo's public data in one bucket
# and private database backups in another. can be seaweedfs for now
s3_provider: seaweedfs
# storage_class for S3 PVCs
# s3_pvc_storage_class: local-path
# how large the backing pvc's capacity should be for minio or seaweedfs
s3_pvc_capacity: 10Gi
# local s3 endpoint for postgresql backups, backed up constantly
Expand Down Expand Up @@ -498,6 +500,7 @@ apps:
- code.forgejo.org
- https://seaweedfs.github.io/seaweedfs/helm
- https://small-hack.github.io/cloudnative-pg-cluster-chart
- registry-1.docker.io
destination:
# automatically includes the app's namespace and argocd's namespace
namespaces: []
Expand Down Expand Up @@ -542,7 +545,10 @@ apps:
project:
name: external-secrets-operator
source_repos:
# needed for the helm chart
- https://charts.external-secrets.io
# needed for the CRDs
- https://github.com/external-secrets/external-secrets
# you can remove this one if you're not using bitwarden to store your k8s secrets
- https://small-hack.github.io/bitwarden-eso-provider
destination:
Expand Down Expand Up @@ -619,17 +625,22 @@ apps:
init:
enabled: true
values:
# admin info
admin_user: ""
admin_email: ""
# smtp info
smtp_host: ""
smtp_user: ""
smtp_port: ""
smtp_protocol: "SMTP"
# smtp from email (verified sender)
smtp_from_address: example.com
smtp_password:
value_from:
env: GHOST_SMTP_PASSWORD
backups:
# cronjob syntax schedule to run ghost pvc backups
pvc_schedule: 10 0 * * *
# cronjob syntax (with SECONDS field) for ghost postgres backups
# must happen at least 10 minutes before pvc backups, to avoid corruption
# due to missing files. This is because the backup shows as completed before
# it actually is
postgres_schedule: 0 0 0 * * *
s3:
# these are for pushing remote backups of your local s3 storage, for speed and cost optimization
endpoint: ""
Expand Down Expand Up @@ -657,18 +668,10 @@ apps:
# affinity_value: ""
# hostname that users go to in the browser
hostname: ""
# admin username
admin_user: "ghost"
# admin email
admin_email: ""
# admin hostname that users go to in the browser
admin_hostname: ""
# title of your title
blog_title: ""
# smtp server
smtp_host: ""
# smtp port
smtp_port: ""
# smtp username
smtp_user: ""
# ghost mysql pvc capacity
mysql_pvc_capacity: 5Gi
# ghost pvc capacity
Expand Down Expand Up @@ -703,6 +706,7 @@ apps:
source_repos:
- registry-1.docker.io
- seaweedfs.github.io/seaweedfs/helm
- https://small-hack.github.io/ghost-helm-chart
destination:
# automatically includes the app's namespace and argocd's namespace
namespaces: []
Expand Down Expand Up @@ -1415,7 +1419,7 @@ apps:
# automatically includes the app's namespace and argocd's namespace
namespaces: []

libre_translate:
libretranslate:
description: |
📖 [link=https://libretranslate.com/]libretranslate[/link] is a self-hosted language translation tool.
This is useful as both a web interface like translate.google.com, but also as an API for use with other apps such as Mastodon
Expand Down Expand Up @@ -2469,6 +2473,8 @@ apps:
s3_endpoint: ""
# capacity for the PVC backing your local s3 instance
s3_pvc_capacity: 100Gi
# StorageClass for the PVC backing your local s3 instance
s3_storage_class: local-path

# git repo to install the Argo CD app from
repo: https://github.com/small-hack/argocd-apps
Expand Down Expand Up @@ -2551,37 +2557,45 @@ apps:

renovate:
description: |
[magenta]DEMO - UNTESTED[/magenta]

[link=https://docs.renovatebot.com/]Renovate[/link] is a tool for automated dependency updates. It's Multi-platform and multi-language. This is a simple helm chart for running a self-hosted RenovateBot.

enabled: false
enabled: true
init:
enabled: true
values:
renovate_pat:
value_from:
env: RENOVATE_PAT
renovate_github_pat:
value_from:
env: RENOVATE_GITHUB_PAT
argo:
# secrets keys to make available to Argo CD ApplicationSets
secret_keys: {}
secret_keys:
# At 01:00 every day
cronjob_schedule: 0 1 * * *
# 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! This
# is an app of apps. Change to "monitoring/kube-prometheus-stack/" to
# only install kube-prometheus-stack (foregoing loki and push gateway)
path: demo/renovate/
repo: https://git.smallhack.org/small-hack/argocd-apps
# path in the argo repo to point to. Trailing slash very important!
path: renovate/
# either the branch or tag to point at in the argo repo above
revision: main
# kubernetes cluster to install the k8s app into, defaults to Argo CD default
cluster: https://kubernetes.default.svc
# namespace to install the k8s app in
namespace: "renovate"
namespace: renovate
# recurse directories in the provided git repo
directory_recursion: false
# source repos for Argo CD App Project (in addition to argo.repo)
project:
name: renovate
source_repos:
- "https://docs.renovatebot.com/helm-charts"
- https://docs.renovatebot.com/helm-charts
- ghcr.io/renovatebot/charts/renovate
destination:
# automatically includes the app's namespace and argocd's namespace
namespaces:
- renovate
- renovate

seaweedfs:
enabled: false
Expand Down
9 changes: 9 additions & 0 deletions smol_k8s_lab/k8s_apps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from .secrets_management.infisical import configure_infisical
from .secrets_management.vault import configure_vault
from .social.forgejo import configure_forgejo
from .renovate import configure_renovate
from .social.ghost import configure_ghost
from .social.gotosocial import configure_gotosocial
from .social.harbor import configure_harbor
Expand Down Expand Up @@ -155,6 +156,7 @@ def setup_base_apps(k8s_obj: K8s,
ingress_dict: dict = {},
cert_manager_dict: dict = {},
cnpg_operator_dict: dict = {},
pxc_operator_dict: dict = {},
argocd_dict: dict = {},
plugin_secrets: dict = {},
bw: BwCLI = None) -> ArgoCD:
Expand All @@ -169,6 +171,7 @@ def setup_base_apps(k8s_obj: K8s,
cilium_enabled = cilium_dict.get('enabled', False)
ingress_nginx_enabled = ingress_dict.get('enabled', False)
cnpg_operator_enabled = cnpg_operator_dict.get('enabled', False)
pxc_operator_enabled = pxc_operator_dict.get('enabled', False)
argocd_enabled = argocd_dict.get('enabled', False)
cert_manager_enabled = cert_manager_dict.get('enabled', False)
argo_secrets_plugin_enabled = argocd_dict['argo']['directory_recursion']
Expand All @@ -177,6 +180,7 @@ def setup_base_apps(k8s_obj: K8s,
metallb_enabled,
cilium_enabled,
cnpg_operator_enabled,
pxc_operator_enabled,
argocd_enabled,
argo_secrets_plugin_enabled)

Expand Down Expand Up @@ -246,6 +250,7 @@ async def setup_federated_apps(
matrix_dict: dict = {},
peertube_dict: dict = {},
writefreely_dict: dict = {},
renovate_dict: dict = {},
pvc_storage_class: str = "local-path",
zitadel_hostname: str = "",
zitadel_obj: Zitadel = None,
Expand All @@ -262,6 +267,10 @@ async def setup_federated_apps(
pvc_storage_class,
zitadel_obj,
bw)
if renovate_dict.get('enabled', False):
await configure_renovate(argocd,
renovate_dict,
bw)

# blogging platforms
if ghost_dict.get('enabled', False):
Expand Down
2 changes: 1 addition & 1 deletion smol_k8s_lab/k8s_apps/monitoring/grafana_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def configure_grafana_stack(argocd: ArgoCD,

if init_enabled:
# configure backup s3 credentials
backup_vals = process_backup_vals(cfg.get('backups', ''), 'grafana-stack', argocd)
backup_vals = process_backup_vals(cfg.get('backups', ''), 'grafana_stack', argocd)

# initial secrets to deploy this app from scratch
if init_enabled and not app_installed:
Expand Down
6 changes: 6 additions & 0 deletions smol_k8s_lab/k8s_apps/operators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def setup_operators(argocd: ArgoCD,
minio_config: dict = {},
seaweed_config: dict = {},
cnpg_config: dict = {},
pxc_config: dict = {},
pg_config: dict = {},
openbao_config: dict = {},
bitwarden: BwCLI = None) -> None:
Expand All @@ -24,6 +25,7 @@ def setup_operators(argocd: ArgoCD,
- minio operator
- seaweedfs
- cnpg (cloud native postgres) operator
- pxc (percona mysql) operator
- zalando postgres operator
- openbao
"""
Expand Down Expand Up @@ -57,6 +59,10 @@ def setup_operators(argocd: ArgoCD,
if cnpg_config and cnpg_config.get('enabled', False):
argocd.install_app('cnpg-operator', cnpg_config['argo'])

# pxc operator is a mysql operator for creating mysql clusters
if pxc_config and pxc_config.get('enabled', False):
argocd.install_app('pxc-operator', pxc_config['argo'])

# zalando postgres operator is a postgres operator for creating postgresql clusters
if pg_config and pg_config.get('enabled', False):
configure_postgres_operator(argocd, pg_config, bitwarden)
Loading
Loading