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

Commit 4bda8bc

Browse files
jessebotcloudymax
andauthored
make smol-k8s-lab more async for federated apps and add new experimental apps (#363)
* make smol-k8s-lab more async for federated apps * more work for asyncing everything * make more things async * get rid of duplicate refresh_bweso function in grafana_stack.py, update naming schema for appset secret * change to use grafana_stack_oidc_credentials_bitwarden_id everywhere and always refresh the grafana oidc credentials * try to create missing user credentials (#364) * change thanos_hostame to mimir_hostname * try to create missing user credentials * fix name and force vaules to update * sync with jesse * avoid reloading the argocd secrets plugin deployment entirely * resolve s3_user_id' is not defined. when refreshing bitwarden * fix typo * remove extra s3 user for monitoring * update allowed repos for grafana_stack * add seaweedfs to allowed repos for the grafana stack monitoring project * add optionals tolerations and afffinity to grafana-stack * fix restores for seaweedfs for grafana-stack * add experimental opa gatekeeper app * add link to opa doc and update example header * fix crash when adding nodes with >1 label * always create the loki valkey credentials * add temp to be optionally installed * update mkdocs * update tempo allowed repos * more grafana source repos * fix tempo source repos again * make tempo generate secrets * more tempo stuff * always include s3 endpoint for tempo * add kube-state-metrics repo to grafana_stack * update netmaker database hostname to be netmaker-postgresql * update netmaker database hostname to be netmaker-postgresql.netmaker.svc.cluster.local * start adding restore capabilities to netmaker * Update docs/k8s_apps/prometheus.md * update poetry lock file --------- Co-authored-by: Max! <admin@cloudydev.net>
1 parent b3afb94 commit 4bda8bc

27 files changed

+971
-405
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[Tempo](https://grafana.com/docs/tempo/latest/) is an open-source, easy-to-use, and high-scale distributed tracing backend. Tempo lets you search for traces, generate metrics from spans, and link your tracing data with logs and metrics. We're still experimenting with it here at small-hack, so feel free to grab anything you like, but understand that it is still in development.
2+
3+
## Experimental
4+
5+
```yaml
6+
apps:
7+
tempo:
8+
description: |
9+
[magenta]⚠️ Experimental[/magenta]
10+
[link=https://grafana.com.com/oss/tempo]Tempo[/link]
11+
enabled: true
12+
init:
13+
# if init is enabled, we'll set up an app in Zitadel for using Oauth2 with Grafana
14+
enabled: true
15+
# restore:
16+
# enabled: false
17+
# restic_snapshot_ids:
18+
# seaweedfs_volume: latest
19+
# seaweedfs_filer: latest
20+
# backups:
21+
# # cronjob syntax schedule to run forgejo pvc backups
22+
# pvc_schedule: 10 0 * * *
23+
# s3:
24+
# # these are for pushing remote backups of your local s3 storage, for speed and cost optimization
25+
# endpoint: ''
26+
# bucket: ''
27+
# region: ''
28+
# secret_access_key:
29+
# value_from:
30+
# env: TEMPO_S3_BACKUP_SECRET_KEY
31+
# access_key_id:
32+
# value_from:
33+
# env: TEMPO_S3_BACKUP_ACCESS_ID
34+
# restic_repo_password:
35+
# value_from:
36+
# env: TEMPO_RESTIC_REPO_PASSWORD
37+
38+
argo:
39+
# secrets keys to make available to Argo CD ApplicationSets
40+
# toleration affinity
41+
# toleration_key: dedicated
42+
# toleration_operator: Equal
43+
# toleration_value: example
44+
# toleration_effect: NoSchedule
45+
# affinity_key: dedicated
46+
# affinity_value: example
47+
secret_keys:
48+
hostname: tempo.example.com
49+
# local s3 endpoint for tempo S3, backed up constantly
50+
# make this the same as your grafana_stack if you're using that
51+
s3_endpoint: ""
52+
# git repo to install the Argo CD app from
53+
repo: https://github.com/small-hack/argocd-apps
54+
# path in the argo repo to point to
55+
path: tempo/app_of_apps/
56+
# either the branch or tag to point at in the argo repo above
57+
revision: main
58+
# kubernetes cluster to install the k8s app into, defaults to Argo CD default
59+
cluster: https://kubernetes.default.svc
60+
# namespace to install the k8s app in
61+
namespace: monitoring
62+
# recurse directories in the provided git repo
63+
directory_recursion: false
64+
# source repos for Argo CD App Project (in addition to argo.repo)
65+
project:
66+
name: monitoring
67+
source_repos:
68+
- registry-1.docker.io
69+
- ghcr.io/grafana/helm-charts
70+
- https://seaweedfs.github.io/seaweedfs/helm
71+
- https://github.github.io/helm-charts
72+
destination:
73+
# automatically includes the app's namespace and argocd's namespace
74+
namespaces: []
75+
```

docs/k8s_apps/grafana_monitoring_stack.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ apps:
8080
init:
8181
# if init is enabled, we'll set up an app in Zitadel for using Oauth2 with Grafana
8282
enabled: true
83+
restore:
84+
enabled: false
85+
restic_snapshot_ids:
86+
seaweedfs_volume: latest
87+
seaweedfs_filer: latest
8388

8489
backups:
85-
# cronjob syntax schedule to run forgejo pvc backups
90+
# cronjob syntax schedule to run grafana stack pvc backups
8691
pvc_schedule: 10 0 * * *
87-
# cronjob syntax (with SECONDS field) for forgejo postgres backups
88-
# must happen at least 10 minutes before pvc backups, to avoid corruption
89-
# due to missing files. This is because the backup shows as completed before
90-
# it actually is
91-
postgres_schedule: 0 0 0 * * *
9292
s3:
9393
# these are for pushing remote backups of your local s3 storage, for speed and cost optimization
9494
endpoint: ""
@@ -107,6 +107,14 @@ apps:
107107
argo:
108108
# secrets keys to make available to Argo CD ApplicationSets
109109
secret_keys:
110+
## you can delete these if you're not using tolerations/affinity
111+
# toleration_key: ""
112+
# toleration_operator: ""
113+
# toleration_value: ""
114+
# toleration_effect: ""
115+
## these are for node affinity, delete if not in use
116+
# affinity_key: ""
117+
# affinity_value: ""
110118
# FQDN to use for Thanos web interface
111119
thanos_hostname: ""
112120
# FQDN to use for Grafana
@@ -140,11 +148,12 @@ apps:
140148
project:
141149
name: monitoring
142150
source_repos:
143-
- "registry-1.docker.io"
144-
- "https://grafana.github.io/helm-charts"
145-
- "https://github.com/grafana/helm-charts.git"
146-
- "https://github.com/prometheus-community/helm-charts.git"
147-
- "https://prometheus-community.github.io/helm-charts"
151+
- registry-1.docker.io
152+
- https://grafana.github.io/helm-charts
153+
- ghcr.io/grafana/helm-charts
154+
- https://github.com/prometheus-community/helm-charts.git
155+
- https://prometheus-community.github.io/helm-charts
156+
- https://seaweedfs.github.io/seaweedfs/helm
148157
destination:
149158
# automatically includes the app's namespace and argocd's namespace
150159
namespaces:

docs/k8s_apps/opa.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Open Policy Agent Gatekeeper
2+
3+
An experimental app for writing security policies for Kubernetes.
4+
5+
Learn more here: https://open-policy-agent.github.io/gatekeeper/website/
6+
7+
## Example Config
8+
9+
```yaml
10+
apps:
11+
opa:
12+
enabled: true
13+
description: |
14+
[magenta]⚠️ Experimental[/magenta]
15+
[link=https://open-policy-agent.github.io/gatekeeper/website/]OPA (Open Policy Agent) Gatekeeper[/link] is a customizable cloud native policy controller that helps enforce policies and strengthen governance. Put simply, it lets you set up policies for security requirements in Kubernetes.
16+
17+
init:
18+
enabled: true
19+
argo:
20+
# secrets keys to make available to Argo CD ApplicationSets
21+
secret_keys: []
22+
# git repo to install the Argo CD app from
23+
repo: https://github.com/small-hack/argocd-apps
24+
# path in the argo repo to point to
25+
path: opa/app_of_apps/
26+
# either the branch or tag to point at in the argo repo above
27+
revision: main
28+
# kubernetes cluster to install the k8s app into, defaults to Argo CD default
29+
cluster: https://kubernetes.default.svc
30+
# namespace to install the k8s app in
31+
namespace: gatekeeper-system
32+
# recurse directories in the provided git repo
33+
# if set to false, we will not deploy the CSI driver
34+
directory_recursion: false
35+
# source repos for Argo CD App Project (in addition to argo.repo)
36+
project:
37+
name: opa
38+
source_repos:
39+
- https://open-policy-agent.github.io/gatekeeper/charts
40+
destination:
41+
# automatically includes the app's namespace and argocd's namespace
42+
namespaces: []
43+
```

docs/k8s_apps/prometheus.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ You can see an overview of the whole Prometheus Stack Argo CD Application at [sm
66
<img src="../../assets/images/screenshots/prometheus_screenshot.png" alt="screenshot of the Argo CD web interface showing the prometheus app of apps which includes the following children: loki, prometheus-crd, prometheus-appset, prometheus-pushgateway-appset">
77
</a>
88

9+
*NOTE*: This stack is deprecated in favor of the [Grafana Monitoring Stack](k8s_apps/grafana_monitoring_stack.md)!
10+
911
## Important note
1012

1113
We haven't generated new screenshots, but we've updated how we now deploy the Prometheus CRDs. They are now deployed separately, so that anything that relies on them that gets deployed earlier on, such as your identity provider, which you may want to secure the prometheus related frontends.

mkdocs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@ nav:
9595
- Longhorn: k8s_apps/experimental/longhorn.md
9696
- Openbao: k8s_apps/experimental/openbao.md
9797
- MinIO: k8s_apps/experimental/minio.md
98+
- Tempo: k8s_apps/experimental/tempo.md
9899
- WriteFreely: k8s_apps/experimental/writefreely.md
99100
- Zalando Postgress Operator: k8s_apps/experimental/postgres_operator.md
100101
- Generic App: k8s_apps/generic_app.md
101102
- Generic Device Plugin: k8s_apps/generic_device_plugin.md
102103
- GoToSocial: k8s_apps/gotosocial.md
104+
- Grafana Monitoring Stack: k8s_apps/grafana_monitoring_stack.md
103105
- Home Assistant: k8s_apps/home_assistant.md
104106
- Ingress Nginx: k8s_apps/ingress_nginx.md
105107
- K8tz: k8s_apps/k8tz.md

0 commit comments

Comments
 (0)