feat(sabnzbd): add servicemonitor and prometheus exporter sidecar
This commit is contained in:
parent
96b9ecc395
commit
92ff2e42de
|
@ -0,0 +1,71 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: sabnzbd-apikey
|
||||
namespace: download
|
||||
stringData:
|
||||
apikey: ENC[AES256_GCM,data:aH5ao3l5kX5UvaeNU1gzbYk99tfW5Mwg0nFJ6NwGwlo=,iv:+MMqR2vdGB977nX4r/8bMJu3eo8+HaGh70ajGn/gqyo=,tag:RcNtXTfi+FAw6fTl031vRA==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age: []
|
||||
lastmodified: "2024-06-15T18:30:28Z"
|
||||
mac: ENC[AES256_GCM,data:F+wpzS5c9k2eKHgoyjqFMo5E5iin7IceZCYcrdTTQUF+swL6hrVpicPThzuAnEVG2XFtCJ4R3DaDqUK7NqpuPoPlXu5HlvH34LK3syyXYzkoVzYtVvU+LaazVdK3ySkll1e3t6TMQKnKaPr2/zO/hvzbhAz4Pvwr7raZHiLkD7w=,iv:5rME0k1cdg08OLG13ivWoXrfKMHp6mYJnggjPNx0hTs=,tag:70ZXHC4HJqcR+fnU+o6Q6g==,type:str]
|
||||
pgp:
|
||||
- created_at: "2024-06-15T18:30:28Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMAyqlIeyoxYovARAA5NLxekAHw8y5gt8AZ9CBUbECNHdC3XoRSZx+PzHZI3qz
|
||||
QG56GcSzegjQ7GCzGgR+YvbsMQ5HI63bj0OGXUVrtmrnUPog2zLCGLgnOvqWyp+T
|
||||
Az/iACMHcTvsqmjElz/h2Ex4jfJWOuPZ9floGvHOR9vwBO2js+wyQSn92IFIEpx3
|
||||
wLzdXQa1WiGJcmyOMcgQtWmo0NKI4vK5Y8PbllbsBesb1IH2Hvjq3Ao5pvfL84qW
|
||||
l2hKUaJWcw3qNT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KGJJeiizaagbXcdf4+sbfs
|
||||
vXcpyVfLXeJHLm0+AyStBFhehaYHefCegxr+K93LFl/FQue5XOna8kPm74n6wg01
|
||||
gITPvy9ZAjswHeoF9yod00a4CahPyx4d4ag+IRgDiPH37XLo4kxy4uyVqdc5MNRo
|
||||
AQkCELI9OI+VUOyZWBn33t3y3OKrOm5XnOc5HhRR45OyRRiGlZ8NmVJ8jTAazvjF
|
||||
RPbkgIO0u2tIgEbpkDPwyeTKHF+AZK92AxxLa3hkLqccOyNQObjq/+T4gJDKBO4C
|
||||
o+vrm+EitzU=
|
||||
=Zs94
|
||||
-----END PGP MESSAGE-----
|
||||
fp: BD1AAF9D8170F4BEE437365FF6F0933799CFEBCD
|
||||
- created_at: "2024-06-15T18:30:28Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMAy5t8IMoPu4VAQ/+KKzDH7L3uW01NCvAoVWZVUe8E0NmomSBUYYjwNW5gkNT
|
||||
Jb7tI+pFBoSz6PuzX/P0xC+MivheQ4rSilljkUWOw2Je+33Hm2SCRAhKCTXXUA1G
|
||||
2xWTulpYLt4ta2D1i5plpeEqZQldn75b0wMmRdyV83R3R6DEN5bVvOxyozAPdGna
|
||||
/Fc3cpmiIcz9UyP3m77c2khOAhLwAxVpFqpQZah0oAsuo9X2f7uqTHnDib/4OKP3
|
||||
tb9Atc9kvAm9U/IsT7gWyFWNmynUF07ZqsRmd5qJTOFriXm7y1uI7iKCNEVV8j/o
|
||||
xua7uml2ghPs74FRrKxw7tZyfeyK1k+HjsQFiK3XFdCCR0CHmIzpRGCq+4heNEB3
|
||||
rt+Ub0EaKXdLJ+ChQuoIa6Skzj3ETNtXm8lFBUDy8AEiQ1bVL3UjP6JFfvlN1B5p
|
||||
SWBiEDwKQGXclYYxob6AIyB02wwayYSaNba2deAZjF00NEsaW0gn6ExWgqKKbWOZ
|
||||
rKnmmSVEwcF8cn+B0mCpX8mEsQYjoTtaYZMSdYhhjcyrwmV74tIg2QA0FcAp18Tr
|
||||
c0Sfz0AYsgz9FVNnKAhh9xEyTsqgrt5tBo2EBxUovKGAWXHYZ2GYGhmzpl6/4Svm
|
||||
XgD6Bg2/Cd05iAFCJ+UHLpPiuUNlkQVdKLJbuIQkCfHzwiBuQotoHuo4YoG0KuPU
|
||||
aAEJAhAlKOjjzLDq8hVzZWycSRw7OMticLiAwjmMDmPfjMM62kZe0lhg0JufaCMa
|
||||
7RujVagxp2i2g7Cf9BEm4gQzVKdQUff7cFSk3TfUNn18OkePfMO4nbUa6XHF7mQ0
|
||||
e9ivK+zxMIfg
|
||||
=0U9t
|
||||
-----END PGP MESSAGE-----
|
||||
fp: 687802D4DFD8AA82EA55666CF7DADAC782D7663D
|
||||
encrypted_regex: ^(data|stringData)$
|
||||
version: 3.8.1
|
|
@ -0,0 +1,112 @@
|
|||
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: sabnzbd
|
||||
namespace: download
|
||||
spec:
|
||||
interval: 5m
|
||||
chart:
|
||||
spec:
|
||||
chart: app-template
|
||||
version: 3.1.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bjws-charts
|
||||
namespace: flux-system
|
||||
|
||||
values:
|
||||
controllers:
|
||||
main:
|
||||
pod:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
# runAsGroup: 10000
|
||||
# runAsUser: 10000
|
||||
# fsGroup: 10000
|
||||
# fsGroupChangePolicy: "OnRootMismatch"
|
||||
|
||||
containers:
|
||||
app:
|
||||
image:
|
||||
repository: lscr.io/linuxserver/sabnzbd
|
||||
tag: 4.3.2
|
||||
|
||||
env:
|
||||
PGID: 10000
|
||||
PUID: 10000
|
||||
|
||||
metrics:
|
||||
image:
|
||||
repository: msroest/sabnzbd_exporter
|
||||
tag: 0.1.73
|
||||
|
||||
env:
|
||||
- name: SABNZBD_BASEURLS
|
||||
value: http://localhost:8080
|
||||
- name: SABNZBD_APIKEYS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sabnzbd-apikey
|
||||
key: apikey
|
||||
|
||||
service:
|
||||
app:
|
||||
controller: main
|
||||
|
||||
ports:
|
||||
http:
|
||||
port: 8080
|
||||
|
||||
metrics:
|
||||
port: 9387
|
||||
protocol: HTTP
|
||||
|
||||
serviceMonitor:
|
||||
app:
|
||||
enabled: true
|
||||
serviceName: sabnzbd
|
||||
|
||||
labels:
|
||||
release: kube-prometheus-stack
|
||||
|
||||
endpoints:
|
||||
- port: metrics
|
||||
scheme: http
|
||||
path: /metrics
|
||||
interval: 3m
|
||||
scrapeTimeout: 1m
|
||||
|
||||
ingress:
|
||||
main:
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-production
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd
|
||||
|
||||
hosts:
|
||||
- host: &host "usenet.${SECRET_NEW_DOMAIN}"
|
||||
paths:
|
||||
- path: /
|
||||
service:
|
||||
identifier: app
|
||||
port: http
|
||||
|
||||
tls:
|
||||
- hosts:
|
||||
- *host
|
||||
|
||||
persistence:
|
||||
storage:
|
||||
type: hostPath
|
||||
hostPath: /mnt/MainPool/Media/Usenet
|
||||
globalMounts:
|
||||
- path: /storage/Usenet
|
||||
|
||||
config:
|
||||
type: hostPath
|
||||
hostPath: /mnt/MainPool/Kubernetes/sabnzbd
|
||||
advancedMounts:
|
||||
main: # controller name
|
||||
app: # container name
|
||||
- path: /config
|
|
@ -0,0 +1,5 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./apikey.sops.yaml
|
||||
- ./helm-release.yaml
|
Loading…
Reference in New Issue