Skip to content

Commit

Permalink
--wip-- [skipci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Liana64 committed Nov 23, 2024
1 parent 8118b73 commit f145363
Show file tree
Hide file tree
Showing 45 changed files with 826 additions and 48 deletions.
42 changes: 21 additions & 21 deletions kubernetes/lianalabs/apps/auth/authelia/app/secret.sops.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: dragonfly-secret
type: Opaque
stringData:
password: ENC[AES256_GCM,data:pvyPbML/Zy6kNojkUUu47KpvnKlphwiDZutvcQ==,iv:TgAD23Ecs4Zx/7GlzfPYmOvsGnmv0Co/BQVkKHAZw0M=,tag:UnRU+oeQbEYoSGx31KvTHw==,type:str]
password: ENC[AES256_GCM,data:g2neVjzuv69zVQWlCok6hjuSh5XG/qudxGpgeQ==,iv:7cmGSzTFNau8tPo/EAM3E8mJnq6S/vqA6T87YuOA1MM=,tag:CCiD1h/EKPpM4ti5q5GV9Q==,type:str]
sops:
kms: []
gcp_kms: []
Expand All @@ -15,14 +15,14 @@ sops:
- recipient: age19nu7uf8dageqlmzk23x7vl24fpn0l7cq20l3l4xxf2sk2xd5h98qss437p
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrbUxGN0o2TzhrVEFBSDRO
Z1RZZXg2YVA0YzMwa2lCSlpEQWtYRnMyblV3ClcwT2Rscm5sUFRkSUVaL2VUWGZ1
Mk0rY3Z5QnBWOFpxc2FXVjlPQkI0ZzgKLS0tIHhEWXoxMjB2c2hjU0NKR1Nha1Zo
clBpdXdZTSszQ0J4QWp3bkxEVWNFTFUKFUnCafT0bYkozGiNSeJ3oDDrcgkK2VhP
Lc9sKPYSbRRhNweR/8k2ks4a+ukJrlCxlIjYfX9QgE+84qplujDOpg==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBHcXlTSGVDa214ZWJiSHpi
TXptQ2hvMVdhMGpyMlgwMkkyMExZb01jK1E0Ck0xa0I0Q1U3Ky9pRGZia3pBbnpT
RlpLWTNldGdZVExHcnZZTjFYZkxuY1EKLS0tIExOWHRTcVNYZHNzRlBDZzVUeldE
R3FWUEFYazVNQUJDQnlXVzVTYkJFOTQK+RRCpx4EgiXUwttpuDa/rNeIMM1ku7Og
bOJsEBRxGdd9ALeAbxswnd7PuADgAuq383EnQmZWPsKwtnWnbVUcMQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-11-11T18:41:20Z"
mac: ENC[AES256_GCM,data:uqEV/3FgL9fSlRGyYwZN6OlWe829NEAmTXAsjhb7EUCoi7D+raPrpaRfEESEBRJ3bejfssmFj6U2xTaQhGboE0jeoJKdkLLR2c/Wnuxfmfw4rC53oAkc8klpoCneL5Vp/jNlSijKzZgXHCpg+g69CuJC2N4fZtmJkzlZCqhA1dM=,iv:4IUcANqUcDdAhcezbUUhdGgjfXIL8jbjRGRjxEDND0E=,tag:N675xUG51Vwch87RDebNSQ==,type:str]
lastmodified: "2024-11-23T01:03:25Z"
mac: ENC[AES256_GCM,data:w7CUzV2NoD50UpehusXqXGnVFkPrQMGJ4qufzPs/9WRj4oOoQ0z+jGytap+qo1P3ulJosvu1Y1DpYZKanhVrAVlGvX3sYOmS8iQ4YrHP3BTsG74ep5cQpjQAPas5aZg14X9ww2OGfhQk0u6nQB3VGETtklRptNIrJw2yB/2Qyso=,iv:pjrnV2iX84nvr7n/Nzj/SSZtJZTqOV+TJKFtIsB6fbU=,tag:d+NT+tWfQ+N3CWdWrWbpDQ==,type:str]
pgp: []
encrypted_regex: ^(data|stringData)$
version: 3.9.1
6 changes: 6 additions & 0 deletions kubernetes/lianalabs/apps/federated/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
7 changes: 7 additions & 0 deletions kubernetes/lianalabs/apps/federated/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: federated
labels:
kustomize.toolkit.fluxcd.io/prune: disabled
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
---
- Network:
# - OPNsense:
# href: https://opnsense.${SECRET_OLD_DOMAIN}
# siteMonitor: https://opnsense.${SECRET_OLD_DOMAIN}
# icon: opnsense
# description: RSS feed
# widget:
# type: opnsense
# url: https://opnsense.${SECRET_OLD_DOMAIN}
# key: "{{HOMEPAGE_VAR_OPNSENSE_TOKEN}}"
- Services:
- Miniflux:
href: https://rss.${SECRET_INTERNAL_DOMAIN}
siteMonitor: http://miniflux.labs.svc.cluster.local/healthcheck
icon: miniflux
description: RSS feed
widget:
type: miniflux
url: http://miniflux.labs.svc.cluster.local
key: "{{HOMEPAGE_VAR_MINIFLUX_TOKEN}}"
- Media:
- Jellyfin:
href: https://${SECRET_MEDIA_DOMAIN}
siteMonitor: https://${SECRET_MEDIA_DOMAIN}
icon: jellyfin
description: Media streaming
widget:
type: jellyfin
url: https://${SECRET_MEDIA_DOMAIN}
key: "{{HOMEPAGE_VAR_JELLYFIN_TOKEN}}"
- Jellyfin:
href: https://jellyseerr.${SECRET_MEDIA_DOMAIN}
siteMonitor: https://jellyseerr.${SECRET_MEDIA_DOMAIN}
icon: jellyseerr
description: Media requests
widget:
type: jellyseerr
url: https://jellyseerr.${SECRET_MEDIA_DOMAIN}
key: "{{HOMEPAGE_VAR_JELLYSEERR_TOKEN}}"
- Sonarr:
href: https://sonarr.${SECRET_MEDIA_DOMAIN}
siteMonitor: https://sonarr.${SECRET_MEDIA_DOMAIN}
icon: sonarr
description: TV
widget:
type: sonarr
url: https://sonarr.${SECRET_MEDIA_DOMAIN}
key: "{{HOMEPAGE_VAR_SONARR_TOKEN}}"
- Radarr:
href: https://radarr.${SECRET_MEDIA_DOMAIN}
siteMonitor: https://radarr.${SECRET_MEDIA_DOMAIN}
icon: radarr
description: Movies
widget:
type: radarr
url: https://radarr.${SECRET_MEDIA_DOMAIN}
key: "{{HOMEPAGE_VAR_RADARR_TOKEN}}"
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ layout:
tab: Main
style: row
columns: 4
Observability:
tab: Main
Services:
tab: Main
Tools:
Expand Down
4 changes: 1 addition & 3 deletions kubernetes/lianalabs/apps/labs/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ kind: Kustomization
resources:
- ./namespace.yaml
- ./homepage/ks.yaml
- ./archivebox/ks.yaml
- ./miniflux/ks.yaml
- ./changedetection/ks.yaml
- ./atuin/ks.yaml
- ./it-tools/ks.yaml
- ./cyberchef/ks.yaml
- ./redlib/ks.yaml
- ./linkding/ks.yaml
- ./netbox/ks.yaml
146 changes: 146 additions & 0 deletions kubernetes/lianalabs/apps/labs/netbox/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app netbox
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.5.1
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
controllers:
netbox:
strategy: RollingUpdate
annotations:
reloader.stakater.com/auto: "true"
initContainers:
init-db:
image:
repository: ghcr.io/onedr0p/postgres-init
tag: 16
env:
INIT_POSTGRES_HOST: postgres-1-rw.database.svc.cluster.local
INIT_POSTGRES_DBNAME: netbox
INIT_POSTGRES_SUPER_PASS:
valueFrom:
secretKeyRef:
name: cloudnative-pg-secret
key: password
envFrom: &envFrom
- secretRef:
name: netbox-secret
containers:
app:
image:
repository: ghcr.io/netbox-community/netbox
tag: v4.1.7-3.0.2@sha256:e88d5e58dd32d643d8d9851f6c9edde20a69a87fd4a72a14259d045f6d3e19d3
env:
DB_HOST: postgres-1-rw.database.svc.cluster.local
DB_USER: ${INIT_POSTGRES_USER}
DB_PASSWORD: ${INIT_POSTGRES_PASS}
EMAIL_USERNAME: ${EMAIL_FROM}
EMAIL_USE_TLS: true
EMAIL_PORT: 587
GRAPHQL_ENABLED: false
HOUSEKEEPING_INTERVAL: 86400 # Every 24 hours
MEDIA_ROOT: /media
REDIS_DATABASE: 3
REDIS_HOST: dragonfly.database.svc.cluster.local
REDIS_PASSWORD:
valueFrom:
secretKeyRef:
name: dragonfly-secret
key: password
REDIS_INSECURE_SKIP_TLS_VERIFY: true
REDIS_CACHE_DATABASE: 2
REDIS_CACHE_HOST: dragonfly.database.svc.cluster.local
REDIS_CACHE_PASSWORD: ${REDIS_PASSWORD}
REDIS_CACHE_INSECURE_SKIP_TLS_VERIFY: true
SKIP_SUPERUSER: false
envFrom: *envFrom
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /healthcheck
port: &port 80
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: { drop: ["ALL"] }
resources:
requests:
cpu: 10m
limits:
memory: 512Mi
defaultPodOptions:
securityContext:
runAsNonRoot: true
runAsUser: 65534
runAsGroup: 65534
seccompProfile: { type: RuntimeDefault }
service:
app:
controller: *app
ports:
http:
port: *port
serviceMonitor:
app:
serviceName: *app
endpoints:
- port: http
scheme: http
path: /metrics
interval: 1m
scrapeTimeout: 10s
ingress:
app:
className: traefik
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-production"
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Services
gethomepage.dev/name: Netbox
gethomepage.dev/description: Network documentation
gethomepage.dev/icon: netbox
hosts:
- host: &host "netbox.${SECRET_INTERNAL_DOMAIN}"
paths:
- path: /
service:
identifier: app
port: http
tls:
- secretName: netbox-tls
hosts: [*host]
persistence:
media:
storageClass: local-nvme
accessMode: ReadWriteOnce
size: 6Gi
retain: true
globalMounts:
- path: /media
9 changes: 9 additions & 0 deletions kubernetes/lianalabs/apps/labs/netbox/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./secret.sops.yaml
- ./helmrelease.yaml
- ../../../database/dragonfly/app/secret.sops.yaml
- ../../../database/cloudnative-pg/app/secret.sops.yaml
39 changes: 39 additions & 0 deletions kubernetes/lianalabs/apps/labs/netbox/app/secret.sops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# yamllint disable
kind: Secret
apiVersion: v1
type: Opaque
metadata:
name: netbox-secret
stringData:
SECRET_KEY: ENC[AES256_GCM,data:uHO2vC5EOnu+yKMEWtH4gPvP0NleI8TCqwiGku+refiHI4h+gQMUT9adjTdXj87nmQjIC5wXhSoeNtaZdhySUQ==,iv:zMrQBqRHEKrNN/lWbytPmBC6c0aUuVs7RZogn89nneo=,tag:d9yUnAKk5YCYbOixYNAlbQ==,type:str]
SUPERUSER_NAME: ENC[AES256_GCM,data:bUcXfi4=,iv:1yIxdCH4NX66hAsbe4CIcQyzzeovUkTqKaXvNlMcsHM=,tag:f6f9lRx//0uNVStMROViDw==,type:str]
SUPERUSER_EMAIL: ENC[AES256_GCM,data:XDbVoFiZyCRkRr7kQI304A==,iv:b+orZBFugnuui2CqIltafq/Alb0C1fN3BXNLERROV38=,tag:26y4JRXSKyVqYLTDnsrTEg==,type:str]
SUPERUSER_PASSWORD: ENC[AES256_GCM,data:EvX93KA+zB3YtPef5HsT2su6OxIPv7OID61FHkoVykk=,iv:Jnq0Oz7Iuv7mTwWKXiAEFBAkhfqpWWyAGzAlR5MB04M=,tag:vWvO1q/U8iSdAG8b3eYEpA==,type:str]
SUPERUSER_API_TOKEN: ENC[AES256_GCM,data:rMK5cjGfoBJNY6JvQu/coxHMj306pfIoajVeObKLcSRg49RYDEW0EOb2EwU3+3yOAL3uDz9UKVoPX9ndvNN/ag==,iv:HeTH3QK2cPnqlIOiahVA3IutSGjJIeNlm1MTfXx65ZM=,tag:j051pmcPBS5lzHPogcqNTQ==,type:str]
INIT_POSTGRES_USER: ENC[AES256_GCM,data:pjGjzc6J,iv:v0sSs8N4C9cF2br37JZ0fcEWrRG5fjCpqivmK/TKmHo=,tag:U88VKNMRLc1KC7ytxJDD4w==,type:str]
INIT_POSTGRES_PASS: ENC[AES256_GCM,data:XI3kpPu3exstGOVn7A5BCE2e/n6wnjXB7YAZcf3aZjgQMAakoB48Dg==,iv:uuriYjqfb3ljhrAvmRhOTaZ+yvBjExl8byyedh2i8b0=,tag:Mag+JyeW1PofUShGkPmNdQ==,type:str]
DB_NAME: ENC[AES256_GCM,data:f+xgQoJ0,iv:yDLugviU/P6w+9yydF4WSVVhH57j1fFUqwqX7WIhrm0=,tag:8xK5yqgzpSLbZwwtFpPVcw==,type:str]
EMAIL_FROM: ENC[AES256_GCM,data:cuj2/ZEArFDlcf+NRiKfdGfb9DTkeAuHnkTJAN0=,iv:7sYrjTUx7fiWkdZrRXuxBNKYC0DprZTirnhhV15jB/Q=,tag:PvHf+HhjPJguWq+2QuOvuA==,type:str]
EMAIL_SERVER: ENC[AES256_GCM,data:CkzdZIaFMZ1IHybU7Im+wg==,iv:0rG+T1OsW+AU+8HUZg9lMMY86c852Oo4Saxw9U/aR0A=,tag:jQygIK/R9rhHtq04Djh+Vg==,type:str]
EMAIL_PASSWORD: ENC[AES256_GCM,data:jG3dAsm6Ylg+kDT+CYISyTc7AaP6td/ViJ6aL2P0jSxeNrRrbDbs4EFXKpcJmZVs5sg=,iv:xcQTBXPlhMH3EQu7r/7z188mFvNHkMJVZzEhQvEeLxk=,tag:QBltZUpRGmC6+cheTEkSNA==,type:str]
REDIS_CACHE_PASSWORD: ENC[AES256_GCM,data:qeYKkL+ZYH304mAZJrkF6cQqp4MvA8T7Io5mKg==,iv:X489snXPpgCPKJtBXQr3RRsW6S1aEEJQotHbMA7LNpU=,tag:uCLzmwuriWe5IWE9YZDzLQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age19nu7uf8dageqlmzk23x7vl24fpn0l7cq20l3l4xxf2sk2xd5h98qss437p
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBXdS85SDdtaml2a1Q1Ui9t
UGlXb1hOUXMwdE92RllaNitrZHFnUGF0cVE0CjZYeXFqT2VNcWZsUkpTWEhJVVFS
Nld4bnBKVlBWTjhMdVpuNUcwZEVudDgKLS0tIHdVZXhmSDBDd1pOSWlsR0oyRkZ6
MjdJN1dkbE8xeitmR3JyMyt4R2ZDbW8Kfw/uH6qvPc4z9zrxTrPsE6wG8GcwHrcO
UY507QULJ+q1cwGKHy3R5oSk7uZgH57Y53Rnvoc6hkaeY5zgAfHfGg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-11-23T01:03:25Z"
mac: ENC[AES256_GCM,data:dblF4Tb0LiLXAW0Tbf6y/ieG9W8gpfq7+KylRoUigCCyZmF1HHHQ8vSUfUuS920bbCqtXIzvghOFlXuvxhYzWlUgGJhtevVoY76UQCfXLAn9OSGEs9xQtGp5n8WPZZiU/eV4zyHx8kT/i+oxwk4U4OmvyWe02YyyWhBTkgSQAu4=,iv:zzljOFgqynYZOo7NlCQXEd3UFJB6ikpf1gGA/nYhjKc=,tag:hzGyWjIkuhAGkKYAN9R1Zg==,type:str]
pgp: []
encrypted_regex: ^(data|stringData)$
version: 3.9.1
28 changes: 28 additions & 0 deletions kubernetes/lianalabs/apps/labs/netbox/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app netbox
namespace: flux-system
spec:
targetNamespace: labs
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: traefik
- name: cloudnative-pg
- name: dragonfly
path: ./kubernetes/lianalabs/apps/labs/netbox/app
prune: true
sourceRef:
kind: GitRepository
name: k8s-gitops
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
postBuild:
substitute:
APP: *app
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ spec:
data:
storageClass: local-nvme
accessMode: ReadWriteOnce
size: 4Gi
size: 5Gi
retain: true
globalMounts:
- path: /data
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ metadata:
name: &app archivebox
namespace: flux-system
spec:
targetNamespace: labs
targetNamespace: media
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: traefik
path: ./kubernetes/lianalabs/apps/labs/archivebox/app
path: ./kubernetes/lianalabs/apps/media/archivebox/app
prune: true
sourceRef:
kind: GitRepository
Expand Down
2 changes: 2 additions & 0 deletions kubernetes/lianalabs/apps/media/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./archivebox/ks.yaml
#- ./piped/ks.yaml
Loading

0 comments on commit f145363

Please sign in to comment.