Skip to content

Commit

Permalink
fix: calibre and calibre-web
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaribe committed Jun 23, 2024
1 parent f6182a4 commit ef2fb25
Show file tree
Hide file tree
Showing 31 changed files with 108 additions and 260 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/.deprecated/values2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ endpointRoutes:
# ipam:
# mode: cluster-pool
# ipv4NativeRoutingCIDR: 10.100.0.0/16
# k8sServiceHost: 10.0.1.6
# k8sServiceHost: truenas.rafaribe.com
# k8sServicePort: 6443
# kubeProxyReplacement: strict
# kubeProxyReplacementHealthzBindAddr: 0.0.0.0:10356
Expand Down
2 changes: 1 addition & 1 deletion docs/src/general/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ My homelab consists of a variety of hardware equipment between networking and co
| Dell Optiplex 3040 | 250GB SSD Apacer AS350 | Sandisk 250GB NVMe & 8TB WD Elements | 16GB | <img width="32" src="https://simpleicons.org/icons/proxmox.svg"> | [loki](https://www.britannica.com/topic/Loki) | Proxmox / VM's with Kubernetes | 10.0.1.8 |
| Odroid H2+ | 128GB Gigabyte NVME | 4 TB WD MyPassport | 16GB | <img width="32" src="https://simpleicons.org/icons/proxmox.svg"> | [freya](https://www.britannica.com/topic/Frigg-Norse-mythology) | Proxmox / VM's with Kubernetes | 10.0.1.9 |
| Dell Optiplex 3040 | 250GB SSD Apacer AS350 | Sandisk 1TB NVMe | 16GB | <img width="32" src="https://simpleicons.org/icons/proxmox.svg"> | [thor](https://www.britannica.com/topic/Thor-Germanic-deity) | Proxmox / VM's with Kubernetes | 10.0.1.10 |
| TrueNas Scale Box | Samsung 850 250GB SSD | 6 TB WD Red Plus x2 ZFS Pool | 32GB | <img width="32" src="https://simpleicons.org/icons/truenas.svg"> | [truenas](https://www.truenas.com/truenas-scale/) | NAS / truenas Kubernetes Cluster / Mass Storage | 10.0.1.6 |
| TrueNas Scale Box | Samsung 850 250GB SSD | 6 TB WD Red Plus x2 ZFS Pool | 32GB | <img width="32" src="https://simpleicons.org/icons/truenas.svg"> | [truenas](https://www.truenas.com/truenas-scale/) | NAS / truenas Kubernetes Cluster / Mass Storage | truenas.rafaribe.com |
| USG 3P | N/A | N/A | 4GB | <img width="32" src="https://simpleicons.org/icons/ubiquiti.svg"> | [USG - Office](https://dl.ubnt.com/datasheets/unifi/UniFi_Security_Gateway_DS.pdf) | Router | 10.0.1.1 |
| Unifi AP 6 Lite | N/A | N/A | N/A | <img width="32" src="https://simpleicons.org/icons/ubiquiti.svg"> | [AP - Office](https://eu.store.ui.com/products/unifi-ap-6-l ite) | Access Point for my Home office | - |
| Unifi AP AC-LR | N/A | N/A | N/A | <img width="32" src="https://simpleicons.org/icons/ubiquiti.svg"> | [AP - Living Room](https://eu.store.ui.com/collections/unifi-network-wireless/products/unifi-ac-lr) | Access Point for my Living Room | - |
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/terraform/unifi/devices.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ locals {
{
name = "truenas"
mac = "0c:c4:7a:c0:df:0a"
fixed_ip = "10.0.1.6"
fixed_ip = "10.0.0.6"
note = "stable server running truenas scale "
},
{
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/terraform/unifi/networks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "unifi_network" "default" {
dhcp_dns = local.dhcp_dns
dhcpd_boot_enabled = true
dhcpd_boot_filename = "ipxe.efi"
dhcpd_boot_server = "10.0.1.6"
dhcpd_boot_server = "10.0.0.6"
}

resource "unifi_network" "iot" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
media:
enabled: true
type: nfs
server: 10.0.0.6
server: truenas.rafaribe.com
path: /mnt/storage-0/media
globalMounts:
- path: /media
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/main/apps/media/bazarr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ spec:
data:
enabled: true
type: nfs
server: 10.0.0.6
server: truenas.rafaribe.com
path: /mnt/storage-0/media
globalMounts:
- path: /data
Expand Down
87 changes: 39 additions & 48 deletions kubernetes/main/apps/media/calibre-web/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
---
# 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: calibre-web
namespace: media
spec:
chart:
spec:
chart: app-template
version: 3.0.4
interval: 15m
version: 3.2.1
interval: 30m
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
interval: 15m
interval: 30m
values:
defaultPodOptions:
enableServiceLinks: false
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch
supplementalGroups: [44, 105, 568]
seLinuxOptions:
level: s0
controllers:
main:
calibre-web:
annotations:
reloader.stakater.com/auto: "true"

pod:
enableServiceLinks: false
labels:
egress.home.arpa/internet: allow
egress.home.arpa/kubedns: allow # FIXME: Remove when clusterNetworkPolicy is in place
ingress.home.arpa/nginx-internal: allow
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
fsGroupChangePolicy: "OnRootMismatch"

containers:
main:
app:
image:
repository: ghcr.io/bjw-s/calibre-web
tag: 0.6.21@sha256:b02ff6d78863f3eede324f53c84a292afeb39442b8df1181dc676c30b6daef5a
env:
CACHE_DIR: /cache
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
spec:
failureThreshold: 30
periodSeconds: 5
resources:
requests:
cpu: 5m
Expand All @@ -53,49 +53,40 @@ spec:
memory: 470M

service:
main:
app:
controller: calibre-web
ports:
http:
port: 8083

ingress:
main:
enabled: true
className: external
labels:
theme-park.home/name: calibreweb
theme-park.home/theme: hotline
app:
className: internal
annotations:
hajimari.io/enable: "true"
hajimari.io/icon: "book-open-page-variant"
theme.home.arpa/enabled: "true"
external-dns.alpha.kubernetes.io/target: internal.rafaribe.com
hosts:
- host: &host library.rafaribe.com
- host: calibre-web.rafaribe.com
paths:
- path: /
service:
name: main
identifier: app
port: http
tls:
- secretName: library-tls
hosts:
- *host

persistence:
config:
enabled: true
existingClaim: calibre-web-config-v3
existingClaim: calibre-web
advancedMounts:
main:
main:
calibre-web:
app:
- path: /config
media:

data:
enabled: true
type: nfs
server: 10.0.1.6
path: /mnt/storage-0/media/books
advancedMounts:
main:
main:
- path: /media
server: truenas.rafaribe.com
path: /mnt/storage-0/media
globalMounts:
- path: /data
cache:
type: emptyDir
globalMounts:
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/main/apps/media/calibre-web/app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ./pvc.yaml
- ./volsync.yaml
- ../../../../templates/gatus/guarded
- ../../../../templates/volsync
13 changes: 0 additions & 13 deletions kubernetes/main/apps/media/calibre-web/app/pvc.yaml

This file was deleted.

68 changes: 0 additions & 68 deletions kubernetes/main/apps/media/calibre-web/app/volsync.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/main/apps/media/calibre-web/ks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: media-calibre-web
name: &app calibre-web
namespace: flux-system
spec:
path: ./kubernetes/main/apps/media/calibre-web/app
Expand All @@ -15,3 +15,11 @@ spec:
interval: 30m
retryInterval: 1m
timeout: 5m
targetNamespace: media
commonMetadata:
labels:
app.kubernetes.io/name: *app
postBuild:
substitute:
APP: *app
VOLSYNC_CLAIM: calibre-web
Loading

0 comments on commit ef2fb25

Please sign in to comment.