diff --git a/streaming/.env.example b/streaming/.env.example new file mode 100644 index 0000000..5e336c0 --- /dev/null +++ b/streaming/.env.example @@ -0,0 +1,3 @@ +PUID=1000 +PGID=1000 +TZ=Europe/Berlin diff --git a/streaming/active b/streaming/active new file mode 100644 index 0000000..e69de29 diff --git a/streaming/compose.yaml b/streaming/compose.yaml new file mode 100644 index 0000000..1d11420 --- /dev/null +++ b/streaming/compose.yaml @@ -0,0 +1,115 @@ +services: + jellyfin: + image: lscr.io/linuxserver/jellyfin:latest + container_name: jellyfin + restart: unless-stopped + environment: + - PUID=${PUID:-1000} + - PGID=${PGID:-1000} + - TZ=${TZ:-Europe/Berlin} + volumes: + - jellyfin-cfg:/config + - movies:/media/movies + - tv:/media/tv + devices: + - /dev/dri:/dev/dri + ports: + - "18096:8096" + networks: + - streaming + + qbittorrent: + image: lscr.io/linuxserver/qbittorrent:latest + container_name: qbittorrent + restart: unless-stopped + environment: + - PUID=${PUID:-1000} + - PGID=${PGID:-1000} + - TZ=${TZ:-Europe/Berlin} + - WEBUI_PORT=8080 + volumes: + - qbittorrent-cfg:/config + - downloads:/downloads + ports: + - "18180:8080" + - "6881:6881" + - "6881:6881/udp" + networks: + - streaming + + sonarr: + image: lscr.io/linuxserver/sonarr:latest + container_name: sonarr + restart: unless-stopped + environment: + - PUID=${PUID:-1000} + - PGID=${PGID:-1000} + - TZ=${TZ:-Europe/Berlin} + volumes: + - sonarr-cfg:/config + - downloads:/downloads + - tv:/tv + ports: + - "18989:8989" + networks: + - streaming + + radarr: + image: lscr.io/linuxserver/radarr:latest + container_name: radarr + restart: unless-stopped + environment: + - PUID=${PUID:-1000} + - PGID=${PGID:-1000} + - TZ=${TZ:-Europe/Berlin} + volumes: + - radarr-cfg:/config + - downloads:/downloads + - movies:/movies + ports: + - "17878:7878" + networks: + - streaming + + prowlarr: + image: lscr.io/linuxserver/prowlarr:latest + container_name: prowlarr + restart: unless-stopped + environment: + - PUID=${PUID:-1000} + - PGID=${PGID:-1000} + - TZ=${TZ:-Europe/Berlin} + volumes: + - prowlarr-cfg:/config + ports: + - "19696:9696" + networks: + - streaming + + jellyseerr: + image: fallenbagel/jellyseerr:latest + container_name: jellyseerr + restart: unless-stopped + environment: + - TZ=${TZ:-Europe/Berlin} + volumes: + - jellyseerr-cfg:/app/config + ports: + - "15055:5055" + networks: + - streaming + +volumes: + jellyfin-cfg: + qbittorrent-cfg: + sonarr-cfg: + radarr-cfg: + prowlarr-cfg: + jellyseerr-cfg: + downloads: + movies: + tv: + +networks: + streaming: + name: streaming diff --git a/streaming/k8s/active b/streaming/k8s/active new file mode 100644 index 0000000..e69de29 diff --git a/streaming/k8s/namespace.yaml b/streaming/k8s/namespace.yaml new file mode 100644 index 0000000..fc53997 --- /dev/null +++ b/streaming/k8s/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: streaming diff --git a/streaming/k8s/routing/certificates.yaml b/streaming/k8s/routing/certificates.yaml new file mode 100644 index 0000000..2777176 --- /dev/null +++ b/streaming/k8s/routing/certificates.yaml @@ -0,0 +1,93 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: internal-wildcard-tls + namespace: streaming +spec: + secretName: internal-wildcard-tls + dnsNames: + - "*.workstation.internal" + - "*.gigaforust.internal" + - workstation.internal + - gigaforust.internal + issuerRef: + name: internal-ca + kind: ClusterIssuer +# --- +# apiVersion: cert-manager.io/v1 +# kind: Certificate +# metadata: +# name: jellyfin-prod-tls +# namespace: streaming +# spec: +# secretName: jellyfin-prod-tls +# dnsNames: +# - jellyfin.forust.xyz +# issuerRef: +# name: letsencrypt-prod +# kind: ClusterIssuer +# --- +# apiVersion: cert-manager.io/v1 +# kind: Certificate +# metadata: +# name: qbittorrent-prod-tls +# namespace: streaming +# spec: +# secretName: qbittorrent-prod-tls +# dnsNames: +# - qbittorrent.forust.xyz +# issuerRef: +# name: letsencrypt-prod +# kind: ClusterIssuer +# --- +# apiVersion: cert-manager.io/v1 +# kind: Certificate +# metadata: +# name: sonarr-prod-tls +# namespace: streaming +# spec: +# secretName: sonarr-prod-tls +# dnsNames: +# - sonarr.forust.xyz +# issuerRef: +# name: letsencrypt-prod +# kind: ClusterIssuer +# --- +# apiVersion: cert-manager.io/v1 +# kind: Certificate +# metadata: +# name: radarr-prod-tls +# namespace: streaming +# spec: +# secretName: radarr-prod-tls +# dnsNames: +# - radarr.forust.xyz +# issuerRef: +# name: letsencrypt-prod +# kind: ClusterIssuer +# --- +# apiVersion: cert-manager.io/v1 +# kind: Certificate +# metadata: +# name: prowlarr-prod-tls +# namespace: streaming +# spec: +# secretName: prowlarr-prod-tls +# dnsNames: +# - prowlarr.forust.xyz +# issuerRef: +# name: letsencrypt-prod +# kind: ClusterIssuer +# --- +# apiVersion: cert-manager.io/v1 +# kind: Certificate +# metadata: +# name: jellyseerr-prod-tls +# namespace: streaming +# spec: +# secretName: jellyseerr-prod-tls +# dnsNames: +# - jellyseerr.forust.xyz +# issuerRef: +# name: letsencrypt-prod +# kind: ClusterIssuer diff --git a/streaming/k8s/routing/external-service.yaml b/streaming/k8s/routing/external-service.yaml new file mode 100644 index 0000000..7cfdcd8 --- /dev/null +++ b/streaming/k8s/routing/external-service.yaml @@ -0,0 +1,161 @@ +apiVersion: v1 +kind: Service +metadata: + name: jellyfin + namespace: streaming +spec: + ports: + - port: 18096 + targetPort: 18096 +--- +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice +metadata: + name: jellyfin + namespace: streaming + labels: + kubernetes.io/service-name: jellyfin +addressType: IPv4 +ports: + - port: 18096 + protocol: TCP +endpoints: + - addresses: + - "192.168.88.100" + conditions: + ready: true +--- +apiVersion: v1 +kind: Service +metadata: + name: qbittorrent + namespace: streaming +spec: + ports: + - port: 18180 + targetPort: 18180 +--- +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice +metadata: + name: qbittorrent + namespace: streaming + labels: + kubernetes.io/service-name: qbittorrent +addressType: IPv4 +ports: + - port: 18180 + protocol: TCP +endpoints: + - addresses: + - "192.168.88.100" + conditions: + ready: true +--- +apiVersion: v1 +kind: Service +metadata: + name: sonarr + namespace: streaming +spec: + ports: + - port: 18989 + targetPort: 18989 +--- +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice +metadata: + name: sonarr + namespace: streaming + labels: + kubernetes.io/service-name: sonarr +addressType: IPv4 +ports: + - port: 18989 + protocol: TCP +endpoints: + - addresses: + - "192.168.88.100" + conditions: + ready: true +--- +apiVersion: v1 +kind: Service +metadata: + name: radarr + namespace: streaming +spec: + ports: + - port: 17878 + targetPort: 17878 +--- +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice +metadata: + name: radarr + namespace: streaming + labels: + kubernetes.io/service-name: radarr +addressType: IPv4 +ports: + - port: 17878 + protocol: TCP +endpoints: + - addresses: + - "192.168.88.100" + conditions: + ready: true +--- +apiVersion: v1 +kind: Service +metadata: + name: prowlarr + namespace: streaming +spec: + ports: + - port: 19696 + targetPort: 19696 +--- +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice +metadata: + name: prowlarr + namespace: streaming + labels: + kubernetes.io/service-name: prowlarr +addressType: IPv4 +ports: + - port: 19696 + protocol: TCP +endpoints: + - addresses: + - "192.168.88.100" + conditions: + ready: true +--- +apiVersion: v1 +kind: Service +metadata: + name: jellyseerr + namespace: streaming +spec: + ports: + - port: 15055 + targetPort: 15055 +--- +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice +metadata: + name: jellyseerr + namespace: streaming + labels: + kubernetes.io/service-name: jellyseerr +addressType: IPv4 +ports: + - port: 15055 + protocol: TCP +endpoints: + - addresses: + - "192.168.88.100" + conditions: + ready: true diff --git a/streaming/k8s/routing/ingress.yaml b/streaming/k8s/routing/ingress.yaml new file mode 100644 index 0000000..e58a9e5 --- /dev/null +++ b/streaming/k8s/routing/ingress.yaml @@ -0,0 +1,101 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: jellyfin-local + namespace: streaming +spec: + entryPoints: + - websecure + routes: + - match: Host(`jellyfin.workstation.internal`) + kind: Rule + services: + - name: jellyfin + port: 18096 + tls: + secretName: internal-wildcard-tls +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: qbittorrent-local + namespace: streaming +spec: + entryPoints: + - websecure + routes: + - match: Host(`qbittorrent.workstation.internal`) + kind: Rule + services: + - name: qbittorrent + port: 18180 + tls: + secretName: internal-wildcard-tls +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: sonarr-local + namespace: streaming +spec: + entryPoints: + - websecure + routes: + - match: Host(`sonarr.workstation.internal`) + kind: Rule + services: + - name: sonarr + port: 18989 + tls: + secretName: internal-wildcard-tls +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: radarr-local + namespace: streaming +spec: + entryPoints: + - websecure + routes: + - match: Host(`radarr.workstation.internal`) + kind: Rule + services: + - name: radarr + port: 17878 + tls: + secretName: internal-wildcard-tls +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: prowlarr-local + namespace: streaming +spec: + entryPoints: + - websecure + routes: + - match: Host(`prowlarr.workstation.internal`) + kind: Rule + services: + - name: prowlarr + port: 19696 + tls: + secretName: internal-wildcard-tls +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: jellyseerr-local + namespace: streaming +spec: + entryPoints: + - websecure + routes: + - match: Host(`jellyseerr.workstation.internal`) + kind: Rule + services: + - name: jellyseerr + port: 15055 + tls: + secretName: internal-wildcard-tls \ No newline at end of file