Compare commits

..

2 Commits

Author SHA1 Message Date
Morten Olsen
00d90bfa21 more-stuff 2025-09-03 17:24:27 +02:00
Morten Olsen
03e406322f more stuff 2025-09-03 15:16:50 +02:00
20 changed files with 91 additions and 21 deletions

View File

@@ -1,2 +1,2 @@
environment: dev
environment: prod
subdomain: bytestash

View File

@@ -0,0 +1 @@
https://www.authelia.com/integration/openid-connect/clients/jellyfin/

View File

@@ -5,6 +5,6 @@ metadata:
spec:
environment: '{{ .Values.environment }}'
redirectUris:
- path: /api/auth/oidc/callback
- path: /sso/OID/redirect/Authentik
subdomain: '{{ .Values.subdomain }}'
matchingMode: strict

View File

@@ -33,10 +33,20 @@ spec:
name: config
- mountPath: /media/movies
name: movies
- mountPath: /media/tv-shows
name: tvshows
- mountPath: /media/music
name: music
volumes:
- name: config
persistentVolumeClaim:
claimName: '{{ .Release.Name }}-config'
- name: movies
persistentVolumeClaim:
claimName: 'movies'
claimName: movies
- name: tvshows
persistentVolumeClaim:
claimName: tvshows
- name: music
persistentVolumeClaim:
claimName: music

View File

@@ -2,5 +2,5 @@ image:
repository: docker.io/jellyfin/jellyfin
tag: latest
pullPolicy: IfNotPresent
environment: dev
environment: prod
subdomain: jellyfin

0
charts/apps/values.yaml Normal file
View File

3
charts/root/Chart.yaml Normal file
View File

@@ -0,0 +1,3 @@
apiVersion: v2
version: 1.0.0
name: root

View File

@@ -0,0 +1,33 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: homelab-apps
namespace: '{{ .Values.env }}-argo'
spec:
generators:
- git:
repoURL: '{{ .Values.repo }}'
revision: '{{ .Values.ref }}'
directories:
- path: charts/apps/*
include: '.*'
exclude: '.*.disabled'
template:
metadata:
name: '{{`{{path.basename}}`}}'
spec:
project: default
source:
repoURL: '{{ .Values.repo }}'
targetRevision: '{{ .Values.ref }}'
path: charts/apps/{{`{{path.basename}}`}}
helm:
values: |
globals: {{ .Values.globals | toYaml | nindent 14 }}
destination:
server: https://kubernetes.default.svc
namespace: '{{ .Values.globals.env }}'
syncPolicy:
automated:
prune: true
selfHeal: true

View File

@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: homelab-root
namespace: '{{ .Values.globals.env }}-argo'
spec:
project: default
source:
repoURL: '{{ .Values.repo }}'
targetRevision: '{{ .Values.ref }}'
path: charts/root
helm:
valueFiles:
- values.yaml
destination:
server: https://kubernetes.default.svc
namespace: '{{ .Values.globals.env }}-argo'
syncPolicy:
automated:
prune: true
selfHeal: true

4
charts/root/values.yaml Normal file
View File

@@ -0,0 +1,4 @@
globals:
env: prod
repo: https://github.com/morten-olsen/homelab-operator.git
ref: HEAD

View File

@@ -1,7 +1,7 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: tv-shows
name: tvshows
labels:
type: nfs
spec:
@@ -13,14 +13,14 @@ spec:
storageClassName: manual
hostPath: null
nfs:
path: '{{ .Values.tv-shows.path }}'
path: '{{ .Values.tvshows.path }}'
server: '{{ .Values.host }}'
readOnly: true
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tv-shows
name: tvshows
spec:
storageClassName: manual
accessModes:

View File

@@ -1,11 +1,11 @@
host: 192.168.20.106
movies:
path: /mnt/HDD/Movies
tv-shows:
tvshows:
path: /mnt/HDD/TV-Shows
music:
path: /mnt/HDD/Music2
books:
path: /mnt/HDD/Books
podcats:
podcasts:
path: /mnt/HDD/Podcasts

View File

@@ -6,9 +6,9 @@ metadata:
apiVersion: homelab.mortenolsen.pro/v1
kind: Environment
metadata:
name: dev
name: prod
spec:
domain: mortenolsen.net
networkIp: 192.168.64.2
domain: olsen.cloud
networkIp: 192.168.20.180
tls:
issuer: lets-encrypt-prod

View File

@@ -4,16 +4,10 @@ metadata:
name: homelab-operator
build:
# This tells Skaffold to build the image locally using your Docker daemon.
local:
push: false
# This is the crucial part for your workflow. Instead of pushing to a
# registry, it loads the built image directly into your cluster's nodes.
# load: true
cluster: {}
artifacts:
# Defines the image to build. It matches the placeholder in deployment.yaml.
- image: homelaboperator
context: . # The build context is the root directory
context: .
docker:
dockerfile: Dockerfile

View File

@@ -204,7 +204,11 @@ class Environment extends CustomResource<typeof specSchema> {
spec: {
targetNamespace: this.#argoNamespace.name,
interval: '1h',
values: {},
values: {
applicationset: {
enabled: true,
},
},
chart: {
spec: {
chart: 'argo-cd',