Skip to content

Commit 69cb2af

Browse files
add flaresolverr
1 parent be46262 commit 69cb2af

16 files changed

+309
-150
lines changed

apps/mealie/components/oidc/upsert-secret-mealie-oidc.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

apps/media/build-radarr-apikey.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

apps/media/components/postgres/upsert-secret-media-postgres.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

apps/media/components/reverse-proxy-oidc/upsert-secret-media-reverse-proxy-oidc.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
apiVersion: networking.istio.io/v1alpha3
3+
kind: VirtualService
4+
metadata:
5+
name: "flaresolverr"
6+
spec:
7+
hosts:
8+
- "flaresolverr"
9+
gateways:
10+
- "istio-system/gateway"
11+
http:
12+
- match:
13+
- uri:
14+
prefix: "/"
15+
route:
16+
- destination:
17+
host: "flaresolverr"
18+
port:
19+
number: 80
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
4+
resources:
5+
- istio-virtualservice.yaml
6+
patches:
7+
- target:
8+
kind: "NetworkPolicy"
9+
name: "flaresolverr"
10+
patch: |-
11+
- op: add
12+
path: "/spec/ingress/0/from/-"
13+
value:
14+
namespaceSelector:
15+
matchLabels:
16+
kubernetes.io/metadata.name: "istio-system"
17+
podSelector:
18+
matchLabels:
19+
istio: "ingressgateway"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
4+
patches:
5+
- target:
6+
kind: Deployment
7+
name: sonarr
8+
patch: |-
9+
- op: add
10+
path: /spec/template/spec/containers/0/env/-
11+
value:
12+
name: SONARR__POSTGRES_HOST
13+
value: postgres
14+
- op: add
15+
path: /spec/template/spec/containers/0/env/-
16+
value:
17+
name: SONARR__POSTGRES_MAIN_DB
18+
value: sonarr
19+
- op: add
20+
path: /spec/template/spec/containers/0/env/-
21+
value:
22+
name: SONARR__POSTGRES_USER
23+
valueFrom:
24+
secretKeyRef:
25+
key: POSTGRES_USER
26+
name: media-sonarr-postgres
27+
- op: add
28+
path: /spec/template/spec/containers/0/env/-
29+
value:
30+
name: SONARR__POSTGRES_PASSWORD
31+
valueFrom:
32+
secretKeyRef:
33+
key: POSTGRES_PASSWORD
34+
name: media-sonarr-postgres
35+
- target:
36+
kind: Deployment
37+
name: sonarr
38+
path: patch-initcontainer.yaml
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
- op: replace
3+
path: /spec/template/spec/initContainers
4+
value:
5+
- name: "init"
6+
image: "ghcr.io/onedr0p/postgres-init:16"
7+
env:
8+
- name: "INIT_POSTGRES_HOST"
9+
value: "postgres"
10+
- name: "INIT_POSTGRES_DBNAME"
11+
value: "sonarr"
12+
- name: "INIT_POSTGRES_SUPER_USER"
13+
valueFrom:
14+
secretKeyRef:
15+
key: "POSTGRES_USER"
16+
name: "media-components-postgres"
17+
optional: true
18+
- name: "INIT_POSTGRES_SUPER_PASS"
19+
valueFrom:
20+
secretKeyRef:
21+
key: "POSTGRES_PASSWORD"
22+
name: "media-components-postgres"
23+
- name: "INIT_POSTGRES_USER"
24+
valueFrom:
25+
secretKeyRef:
26+
key: "POSTGRES_USER"
27+
name: "media-components-postgres"
28+
- name: "INIT_POSTGRES_PASS"
29+
valueFrom:
30+
secretKeyRef:
31+
key: "POSTGRES_PASSWORD"
32+
name: "media-components-postgres"
File renamed without changes.
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: flaresolverr
6+
labels:
7+
app: flaresolverr
8+
annotations:
9+
reloader.stakater.com/auto: "true"
10+
prometheus.io/port: "8192"
11+
prometheus.io/scrape: "true"
12+
spec:
13+
replicas: 1
14+
selector:
15+
matchLabels:
16+
app: flaresolverr
17+
strategy:
18+
type: Recreate
19+
template:
20+
metadata:
21+
labels:
22+
app: flaresolverr
23+
app.kubernetes.io/name: flaresolverr
24+
app.kubernetes.io/instance: media-prod
25+
app.kubernetes.io/component: flaresolverr
26+
app.kubernetes.io/part-of: arr
27+
spec:
28+
securityContext:
29+
runAsNonRoot: true
30+
runAsGroup: 20568
31+
runAsUser: 20568
32+
fsGroup: 20568
33+
seccompProfile:
34+
type: RuntimeDefault
35+
initContainers:
36+
- name: "init"
37+
image: "ghcr.io/flaresolverr/flaresolverr:v3.4.1"
38+
imagePullPolicy: "IfNotPresent"
39+
securityContext:
40+
privileged: false
41+
runAsNonRoot: true
42+
runAsUser: 20568
43+
runAsGroup: 20568
44+
allowPrivilegeEscalation: false
45+
readOnlyRootFilesystem: true
46+
seccompProfile:
47+
type: "RuntimeDefault"
48+
capabilities:
49+
drop:
50+
- "ALL"
51+
resources:
52+
requests:
53+
memory: "128Mi"
54+
cpu: "10m"
55+
limits:
56+
memory: "2Gi"
57+
command:
58+
- cp
59+
- -r
60+
- /app/.
61+
- /app-local/
62+
volumeMounts:
63+
- name: "app"
64+
mountPath: "/app-local"
65+
containers:
66+
- image: "ghcr.io/flaresolverr/flaresolverr:v3.4.1"
67+
imagePullPolicy: "IfNotPresent"
68+
name: "flaresolverr"
69+
ports:
70+
- containerPort: 8191
71+
name: "flaresolverr"
72+
- containerPort: 8192
73+
name: "flare-prom"
74+
securityContext:
75+
privileged: false
76+
runAsNonRoot: true
77+
runAsUser: 20568
78+
runAsGroup: 20568
79+
allowPrivilegeEscalation: false
80+
readOnlyRootFilesystem: true
81+
seccompProfile:
82+
type: "RuntimeDefault"
83+
capabilities:
84+
drop:
85+
- "ALL"
86+
resources:
87+
requests:
88+
memory: "128Mi"
89+
cpu: "10m"
90+
limits:
91+
memory: "2Gi"
92+
readinessProbe:
93+
httpGet:
94+
path: "/health"
95+
port: "flaresolverr"
96+
initialDelaySeconds: 5
97+
periodSeconds: 10
98+
timeoutSeconds: 1
99+
failureThreshold: 3
100+
livenessProbe:
101+
httpGet:
102+
path: "/health"
103+
port: "flaresolverr"
104+
initialDelaySeconds: 15
105+
periodSeconds: 10
106+
timeoutSeconds: 1
107+
failureThreshold: 3
108+
env:
109+
- name: "HOME"
110+
value: "/tmp"
111+
- name: "TZ"
112+
value: "Europe/Berlin"
113+
- name: "PROMETHEUS_ENABLED"
114+
value: "true"
115+
volumeMounts:
116+
- name: "app"
117+
mountPath: "/app/"
118+
- name: "tmp"
119+
mountPath: "/tmp"
120+
affinity:
121+
nodeAffinity:
122+
preferredDuringSchedulingIgnoredDuringExecution:
123+
- weight: 5
124+
preference:
125+
matchExpressions:
126+
- key: "cpu_speed"
127+
operator: "In"
128+
values:
129+
- "slow"
130+
podAffinity:
131+
preferredDuringSchedulingIgnoredDuringExecution:
132+
- weight: 100
133+
podAffinityTerm:
134+
labelSelector:
135+
matchExpressions:
136+
- key: "app.kubernetes.io/part-of"
137+
operator: "In"
138+
values:
139+
- "media"
140+
topologyKey: "kubernetes.io/hostname"
141+
volumes:
142+
- name: "app"
143+
emptyDir:
144+
sizeLimit: "512Mi"
145+
- name: "tmp"
146+
emptyDir:
147+
sizeLimit: "1Gi"

0 commit comments

Comments
 (0)