Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.

Commit 0a09ba9

Browse files
committed
forgejo: add admin_user and admin_email to set forgejo credentials
1 parent 1e0e504 commit 0a09ba9

4 files changed

Lines changed: 18 additions & 7 deletions

File tree

docs/k8s_apps/experimental/forgejo.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,18 @@ apps:
1515
- FORGEJO_S3_BACKUP_SECRET_KEY
1616
- FORGEJO_S3_BACKUP_ACCESS_ID
1717
- FORGEJO_RESTIC_REPO_PASSWORD
18+
- FORGEJO_SMTP_PASSWORD
1819
enabled: false
1920
init:
2021
enabled: false
22+
values:
23+
admin_user: admin
24+
admin_email: test@test.com
25+
smtp_user: test
26+
smtp_host: mymailhost.com
27+
smtp_password:
28+
value_from:
29+
env: FORGEJO_SMTP_PASSWORD
2130
backups:
2231
# cronjob syntax schedule to run forgejo pvc backups
2332
pvc_schedule: 10 0 * * *

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "smol_k8s_lab"
3-
version = "6.4.3"
3+
version = "6.4.4"
44
description = "CLI and TUI to quickly install slimmer Kubernetes distros and then manage apps declaratively using Argo CD"
55
authors = ["Jesse Hitch <jessebot@linux.com>",
66
"Max Roby <emax@cloudydev.net>"]

smol_k8s_lab/config/default_config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@ apps:
428428
enabled: false
429429
init:
430430
enabled: true
431+
values:
432+
admin_user: admin
433+
admin_email: test@test.com
431434
backups:
432435
# cronjob syntax schedule to run forgejo pvc backups
433436
pvc_schedule: 10 0 * * *
@@ -485,7 +488,7 @@ apps:
485488
# depending on if you use seaweedfs or minio, you can remove the other source repo
486489
source_repos:
487490
- code.forgejo.org
488-
- seaweedfs.github.io/seaweedfs/helm
491+
- https://seaweedfs.github.io/seaweedfs/helm
489492
destination:
490493
# automatically includes the app's namespace and argocd's namespace
491494
namespaces: []

smol_k8s_lab/k8s_apps/social/forgejo.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def configure_forgejo(argocd: ArgoCD,
7575

7676
if not restore_enabled:
7777
# configure the admin user credentials
78-
forgejo_admin_username = init_values.get('admin_user', 'tootadmin')
79-
forgejo_admin_email = init_values.get('admin_email', '')
78+
forgejo_admin_username = init_values.get('admin_user', 'forgejo')
79+
forgejo_admin_email = init_values.get('admin_email', 'forgejo@test.com')
8080

8181
# configure the smtp credentials
8282
mail_user = init_values.get('smtp_user', '')
@@ -138,9 +138,8 @@ def configure_forgejo(argocd: ArgoCD,
138138
# these are standard k8s secrets yaml
139139
elif not bitwarden and not restore_enabled:
140140
# admin creds k8s secret
141-
# k8s_obj.create_secret('forgejo-admin-credentials', 'forgejo',
142-
# {"username": username,
143-
# "email": email})
141+
argocd.k8s.create_secret('forgejo-admin-credentials', 'forgejo',
142+
{"username": forgejo_admin_username})
144143

145144
# postgres creds k8s secret
146145
forgejo_pgsql_password = create_password()

0 commit comments

Comments
 (0)