feat: add fava

This commit is contained in:
JJGadgets
2025-02-17 20:36:37 +08:00
parent a4c50afd69
commit 14e0772d45
5 changed files with 147 additions and 0 deletions

View File

@@ -147,6 +147,7 @@ resources:
- ../../../deploy/apps/flatnotes/
- ../../../deploy/apps/stirling-pdf/
- ../../../deploy/apps/fortidynasync/
- ../../../deploy/apps/fava/
- ../../../deploy/vm/_kubevirt/
#- ../../../deploy/vm/_base/
- ../../../deploy/vm/ad/

View File

@@ -0,0 +1,100 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/app-template-3.7.1/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app fava
namespace: *app
spec:
interval: 5m
chart:
spec:
chart: app-template
version: 3.7.1
sourceRef:
name: bjw-s
kind: HelmRepository
namespace: flux-system
values:
controllers:
fava:
type: deployment
replicas: 1
pod:
labels:
ingress.home.arpa/nginx-internal: allow
containers:
main:
image: &img
repository: jank.ing/jjgadgets/fava
tag: 1.30.1@sha256:1da5e3ff5f62bdfd5cf91730727e650b6bb657fc94cc35d58818a6d35f926446
env: &env
TZ: "${CONFIG_TZ}"
securityContext: &sc
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
resources:
requests:
cpu: "10m"
memory: "64Mi"
limits:
cpu: "1"
memory: "512Mi"
probes:
liveness:
enabled: true
readiness:
enabled: true
service:
fava:
controller: fava
ports:
http:
port: 5000
protocol: HTTP
appProtocol: http
ingress:
main:
className: nginx-internal
annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: "${IP_JJ_V4:=127.0.0.1/32}"
hosts:
- host: &host "${APP_DNS_FAVA:=fava}"
paths: &paths
- path: /
pathType: Prefix
service:
identifier: fava
port: http
tls:
- hosts: [*host]
persistence:
data:
existingClaim: fava-data
globalMounts:
- subPath: data
path: /data
defaultPodOptions:
automountServiceAccountToken: false
enableServiceLinks: false
dnsConfig:
options:
- name: ndots
value: "1"
hostUsers: false
securityContext:
runAsNonRoot: true
runAsUser: &uid 1000
runAsGroup: *uid
fsGroup: *uid
fsGroupChangePolicy: Always
seccompProfile: { type: "RuntimeDefault" }
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: fuckoff.home.arpa/fava
operator: DoesNotExist

View File

@@ -0,0 +1,10 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: fava
labels:
kustomize.toolkit.fluxcd.io/prune: disabled
pod-security.kubernetes.io/enforce: &ps restricted
pod-security.kubernetes.io/audit: *ps
pod-security.kubernetes.io/warn: *ps

View File

@@ -0,0 +1,30 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: fava-app
namespace: flux-system
labels: &l
app.kubernetes.io/name: "fava"
spec:
targetNamespace: "fava"
commonMetadata:
labels: *l
path: ./kube/deploy/apps/fava/app
components:
- ../../../core/storage/volsync/component/
- ../../../core/flux-system/alerts/template/
dependsOn:
- name: 1-core-storage-volsync-app
- name: 1-core-storage-rook-ceph-cluster
postBuild:
substitute:
PVC: "fava-data"
SIZE: "10Gi"
SC: &sc "file"
SNAP: *sc
ACCESSMODE: "ReadWriteMany"
SNAP_ACCESSMODE: "ReadOnlyMany"
RUID: &uid "1000"
RGID: *uid
RFSG: *uid

View File

@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# - ns.yaml
- ks.yaml