Skip to content

Commit

Permalink
apps/multimedia: expose arr stack on private ingress
Browse files Browse the repository at this point in the history
Signed-off-by: paulfantom <[email protected]>
  • Loading branch information
paulfantom committed Sep 29, 2024
1 parent 9e31ded commit 22ddcf3
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 0 deletions.
32 changes: 32 additions & 0 deletions apps/multimedia/jsonnet/arr.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ local defaults = {
for labelName in std.objectFields(defaults.commonLabels)
if !std.setMember(labelName, ['app.kubernetes.io/version'])
},
domain: '',
ingressClassName: 'private',
database: {
usernameRef: {
key: 'username',
Expand Down Expand Up @@ -113,6 +115,36 @@ function(params) {
},
},

ingress: {
apiVersion: 'networking.k8s.io/v1',
kind: 'Ingress',
metadata: $._metadata,
spec: {
ingressClassName: $._config.ingressClassName,
rules: [{
host: $._config.domain,
http: {
paths: [{
path: '/',
pathType: 'Prefix',
backend: {
service: {
name: $._config.name,
port: {
number: $.service.spec.ports[0].port,
},
},
},
}],
},
}],
tls: [{
hosts: [$._config.domain],
secretName: '%s-tls' % std.strReplace($._config.domain, '.', '-'),
}],
},
},

serviceMonitor: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor',
Expand Down
5 changes: 5 additions & 0 deletions apps/multimedia/jsonnet/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ local all = {
},

plex: plex(config.plex) + {
statefulset+: {
spec+: {
replicas: 0,
},
},
plexClaim: externalsecret(
{
name: config.plex.plexClaim.secretName,
Expand Down
27 changes: 27 additions & 0 deletions apps/multimedia/manifests/prowlarr/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prowlarr
app.kubernetes.io/part-of: prowlarr
app.kubernetes.io/version: 1.16.2.4435-ls67
name: prowlarr
namespace: multimedia
spec:
ingressClassName: private
rules:
- host: prowlarr.ankhmorpork.thaum.xyz
http:
paths:
- backend:
service:
name: prowlarr
port:
number: 9696
path: /
pathType: Prefix
tls:
- hosts:
- prowlarr.ankhmorpork.thaum.xyz
secretName: prowlarr-ankhmorpork-thaum-xyz-tls
27 changes: 27 additions & 0 deletions apps/multimedia/manifests/radarr/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: radarr
app.kubernetes.io/part-of: radarr
app.kubernetes.io/version: 5.4.6.8723-ls216
name: radarr
namespace: multimedia
spec:
ingressClassName: private
rules:
- host: radarr.ankhmorpork.thaum.xyz
http:
paths:
- backend:
service:
name: radarr
port:
number: 7878
path: /
pathType: Prefix
tls:
- hosts:
- radarr.ankhmorpork.thaum.xyz
secretName: radarr-ankhmorpork-thaum-xyz-tls
27 changes: 27 additions & 0 deletions apps/multimedia/manifests/readarr/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: readarr
app.kubernetes.io/part-of: readarr
app.kubernetes.io/version: develop-0.3.26.2526-ls107
name: readarr
namespace: multimedia
spec:
ingressClassName: private
rules:
- host: ""
http:
paths:
- backend:
service:
name: readarr
port:
number: 8787
path: /
pathType: Prefix
tls:
- hosts:
- ""
secretName: -tls
27 changes: 27 additions & 0 deletions apps/multimedia/manifests/sonarr/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: sonarr
app.kubernetes.io/part-of: sonarr
app.kubernetes.io/version: 4.0.4.1491-ls237
name: sonarr
namespace: multimedia
spec:
ingressClassName: private
rules:
- host: sonarr.ankhmorpork.thaum.xyz
http:
paths:
- backend:
service:
name: sonarr
port:
number: 8989
path: /
pathType: Prefix
tls:
- hosts:
- sonarr.ankhmorpork.thaum.xyz
secretName: sonarr-ankhmorpork-thaum-xyz-tls
3 changes: 3 additions & 0 deletions apps/multimedia/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ prowlarr:
image: "linuxserver/prowlarr:1.16.2.4435-ls67" # application-image-from-github: linuxserver/docker-prowlarr
namespace: *namespace
port: 9696
domain: "prowlarr.ankhmorpork.thaum.xyz"
exporter:
port: 9709
resources:
Expand Down Expand Up @@ -121,6 +122,7 @@ radarr:
image: "lscr.io/linuxserver/radarr:5.4.6.8723-ls216" # application-image-from-github: linuxserver/docker-radarr
namespace: *namespace
port: 7878
domain: "radarr.ankhmorpork.thaum.xyz"
multimediaPVCName: "movies"
downloadsPVCName: "downloaded"
resources:
Expand Down Expand Up @@ -174,6 +176,7 @@ sonarr:
image: "lscr.io/linuxserver/sonarr:4.0.4.1491-ls237" # application-image-from-github: linuxserver/docker-sonarr
namespace: *namespace
port: 8989
domain: "sonarr.ankhmorpork.thaum.xyz"
multimediaPVCName: "tv"
downloadsPVCName: "downloaded"
exporter:
Expand Down

0 comments on commit 22ddcf3

Please sign in to comment.