Skip to content

Commit

Permalink
feat(omegabrr): update to new env method
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <devin@buhl.casa>
  • Loading branch information
onedr0p committed Dec 12, 2024
1 parent c8b9703 commit 82f238f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 29 deletions.
30 changes: 6 additions & 24 deletions kubernetes/main/apps/default/omegabrr/app/externalsecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ kind: ExternalSecret
metadata:
name: omegabrr
spec:
refreshInterval: 5m
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
Expand All @@ -14,32 +13,15 @@ spec:
template:
engineVersion: v2
data:
config.yaml: |
server:
host: 0.0.0.0
port: 80
apiToken: {{ .OMEGABRR_API_KEY }}
clients:
autobrr:
host: http://autobrr.default.svc.cluster.local
apikey: {{ .AUTOBRR_API_KEY }}
arr:
- name: radarr
type: radarr
host: http://radarr.default.svc.cluster.local
apikey: {{ .RADARR_API_KEY }}
filters: [1]
- name: sonarr
type: sonarr
host: http://sonarr.default.svc.cluster.local
apikey: {{ .SONARR_API_KEY }}
filters: [2]
excludeAlternateTitles: true
AUTOBRR_API_KEY: "{{ .AUTOBRR_API_KEY }}"
OMEGABRR_API_KEY: "{{ .OMEGABRR_API_KEY }}"
RADARR_API_KEY: "{{ .RADARR_API_KEY }}"
SONARR_API_KEY: "{{ .SONARR_API_KEY }}"
dataFrom:
- extract:
key: omegabrr
- extract:
key: autobrr
- extract:
key: omegabrr
- extract:
key: radarr
- extract:
Expand Down
12 changes: 8 additions & 4 deletions kubernetes/main/apps/default/omegabrr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ spec:
tag: v1.16.0@sha256:fe529c331217e0624c505a1aa47d2a089314e8a284d38a621135b848eeef64ad
env:
TZ: America/New_York
OMEGABRR_PORT: &port 80
envFrom:
- secretRef:
name: omegabrr-secret
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand All @@ -54,11 +58,11 @@ spec:
controller: omegabrr
ports:
http:
port: 80
port: *port
persistence:
config-file:
type: secret
name: omegabrr-secret
config:
type: configMap
name: omegabrr-configmap
globalMounts:
- path: /config/config.yaml
subPath: config.yaml
Expand Down
9 changes: 8 additions & 1 deletion kubernetes/main/apps/default/omegabrr/app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- ./externalsecret.yaml
- ./helmrelease.yaml
configMapGenerator:
- name: omegabrr-configmap
files:
- ./resources/config.yaml
generatorOptions:
disableNameSuffixHash: true
annotations:
kustomize.toolkit.fluxcd.io/substitute: disabled
21 changes: 21 additions & 0 deletions kubernetes/main/apps/default/omegabrr/app/resources/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
server:
host: 0.0.0.0
port: ${OMEGABRR_PORT}
apiToken: ${OMEGABRR_API_KEY}
clients:
autobrr:
host: http://autobrr.default.svc.cluster.local
apikey: ${AUTOBRR_API_KEY}
arr:
- name: radarr
type: radarr
host: http://radarr.default.svc.cluster.local
apikey: ${RADARR_API_KEY}
filters: [1]
- name: sonarr
type: sonarr
host: http://sonarr.default.svc.cluster.local
apikey: ${SONARR_API_KEY}
filters: [2]
excludeAlternateTitles: true

0 comments on commit 82f238f

Please sign in to comment.