mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21262705a7 | ||
|
|
4d46998668 | ||
|
|
00d90bfa21 |
3
charts/apps/audiobookshelf/Chart.yaml
Normal file
3
charts/apps/audiobookshelf/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: audiobookshelf
|
||||||
13
charts/apps/audiobookshelf/templates/client.yaml
Normal file
13
charts/apps/audiobookshelf/templates/client.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: OidcClient
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
redirectUris:
|
||||||
|
- path: /audiobookshelf/auth/openid/callback
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
matchingMode: strict
|
||||||
|
- path: /audiobookshelf/auth/openid/mobile-redirect
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
matchingMode: strict
|
||||||
52
charts/apps/audiobookshelf/templates/deployment.yaml
Normal file
52
charts/apps/audiobookshelf/templates/deployment.yaml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}'
|
||||||
|
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||||
|
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /config
|
||||||
|
name: config
|
||||||
|
- mountPath: /metadata
|
||||||
|
name: metadata
|
||||||
|
- mountPath: /audiobooks
|
||||||
|
name: audiobooks
|
||||||
|
- mountPath: /podcasts
|
||||||
|
name: podcasts
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-config'
|
||||||
|
- name: metadata
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-metadata'
|
||||||
|
- name: audiobooks
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: books
|
||||||
|
- name: podcasts
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: podcasts
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: ExternalHttpService
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
destination:
|
||||||
|
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
24
charts/apps/audiobookshelf/templates/pvc.yaml
Normal file
24
charts/apps/audiobookshelf/templates/pvc.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-config'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-metadata'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
15
charts/apps/audiobookshelf/templates/service.yaml
Normal file
15
charts/apps/audiobookshelf/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
7
charts/apps/audiobookshelf/values.yaml
Normal file
7
charts/apps/audiobookshelf/values.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/advplyr/audiobookshelf
|
||||||
|
tag: 2.26.1
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: audiobookshelf
|
||||||
@@ -3,7 +3,7 @@ kind: OidcClient
|
|||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: '{{ .Release.Name }}'
|
||||||
spec:
|
spec:
|
||||||
environment: '{{ .Values.environment }}'
|
environment: '{{ .Values.globals.environment }}'
|
||||||
redirectUris:
|
redirectUris:
|
||||||
- path: /api/auth/oidc/callback
|
- path: /api/auth/oidc/callback
|
||||||
subdomain: bytestash
|
subdomain: bytestash
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: '{{ .Release.Name }}'
|
||||||
labels:
|
labels:
|
||||||
@@ -22,6 +22,10 @@ spec:
|
|||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
name: http
|
name: http
|
||||||
env:
|
env:
|
||||||
|
- name: ALLOW_NEW_ACCOUNTS
|
||||||
|
value: 'true'
|
||||||
|
- name: DISABLE_INTERNAL_ACCOUNTS
|
||||||
|
value: 'true'
|
||||||
- name: OIDC_ENABLED
|
- name: OIDC_ENABLED
|
||||||
value: 'true'
|
value: 'true'
|
||||||
- name: OIDC_DISPLAY_NAME
|
- name: OIDC_DISPLAY_NAME
|
||||||
@@ -44,20 +48,8 @@ spec:
|
|||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /data/snippets
|
- mountPath: /data/snippets
|
||||||
name: bytestash-data
|
name: data
|
||||||
|
volumes:
|
||||||
# Defines security context for the pod to avoid running as root.
|
- name: data
|
||||||
# securityContext:
|
persistentVolumeClaim:
|
||||||
# runAsUser: 1000
|
claimName: '{{ .Release.Name }}-data'
|
||||||
# runAsGroup: 1000
|
|
||||||
# fsGroup: 1000
|
|
||||||
|
|
||||||
volumeClaimTemplates:
|
|
||||||
- metadata:
|
|
||||||
name: bytestash-data
|
|
||||||
spec:
|
|
||||||
accessModes: ['ReadWriteOnce']
|
|
||||||
storageClassName: '{{ .Values.environment }}'
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 5Gi
|
|
||||||
@@ -3,7 +3,7 @@ kind: ExternalHttpService
|
|||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: '{{ .Release.Name }}'
|
||||||
spec:
|
spec:
|
||||||
environment: '{{ .Values.environment }}'
|
environment: '{{ .Values.globals.environment }}'
|
||||||
subdomain: '{{ .Values.subdomain }}'
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
destination:
|
destination:
|
||||||
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||||
|
|||||||
11
charts/apps/bytestash/templates/pvc.yaml
Normal file
11
charts/apps/bytestash/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-data'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
environment: prod
|
globals:
|
||||||
|
environment: prod
|
||||||
subdomain: bytestash
|
subdomain: bytestash
|
||||||
|
|||||||
3
charts/apps/gitea/Chart.yaml
Normal file
3
charts/apps/gitea/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: gitea
|
||||||
10
charts/apps/gitea/templates/client.yaml
Normal file
10
charts/apps/gitea/templates/client.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: OidcClient
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
redirectUris:
|
||||||
|
- path: /user/oauth2/Authentik/callback
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
matchingMode: strict
|
||||||
6
charts/apps/gitea/templates/database.yaml
Normal file
6
charts/apps/gitea/templates/database.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: PostgresDatabase
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
96
charts/apps/gitea/templates/deployment.yaml
Normal file
96
charts/apps/gitea/templates/deployment.yaml
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}'
|
||||||
|
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||||
|
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 3000
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /data
|
||||||
|
name: data
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: '{{ .Values.globals.timezone }}'
|
||||||
|
- name: USER_UID
|
||||||
|
value: '1000'
|
||||||
|
- name: USER_GID
|
||||||
|
value: '1000'
|
||||||
|
- name: GITEA__service__REQUIRE_EXTERNAL_REGISTRATION_PASSWORD
|
||||||
|
value: 'true'
|
||||||
|
- name: GITEA__service__ENABLE_BASIC_AUTHENTICATION
|
||||||
|
value: 'true'
|
||||||
|
- name: GITEA__service__ENABLE_PASSWORD_SIGNIN_FORM
|
||||||
|
value: 'false'
|
||||||
|
- name: GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE
|
||||||
|
value: 'true'
|
||||||
|
- name: GITEA__service__DEFAULT_USER_IS_RESTRICTED
|
||||||
|
value: 'true'
|
||||||
|
- name: GITEA__service__DEFAULT_USER_VISIBILITY
|
||||||
|
value: 'private'
|
||||||
|
- name: GITEA__service__DEFAULT_ORG_VISIBILITY
|
||||||
|
value: 'private'
|
||||||
|
- name: GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION
|
||||||
|
value: 'true'
|
||||||
|
- name: GITEA__other__SHOW_FOOTER_POWERED_BY
|
||||||
|
value: 'false'
|
||||||
|
- name: GITEA__other__SHOW_FOOTER_TEMPLATE_LOAD_TIME
|
||||||
|
value: 'false'
|
||||||
|
- name: GITEA__other__SHOW_FOOTER_VERSION
|
||||||
|
value: 'false'
|
||||||
|
- name: GITEA__repository__ENABLE_PUSH_CREATE_USER
|
||||||
|
value: 'true'
|
||||||
|
- name: GITEA__repository__ENABLE_PUSH_CREATE_ORG
|
||||||
|
value: 'true'
|
||||||
|
- name: GITEA__openid__ENABLE_OPENID_SIGNIN
|
||||||
|
value: 'false'
|
||||||
|
- name: GITEA__openid__ENABLE_OPENID_SIGNUP
|
||||||
|
value: 'false'
|
||||||
|
- name: GITEA__database__DB_TYPE
|
||||||
|
value: postgres
|
||||||
|
- name: GITEA__database__NAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: database
|
||||||
|
- name: GITEA__database__HOST
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: host
|
||||||
|
- name: GITEA__database__USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: user
|
||||||
|
- name: GITEA__database__PASSWD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: password
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-data'
|
||||||
11
charts/apps/gitea/templates/external-http-service.yaml
Normal file
11
charts/apps/gitea/templates/external-http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: ExternalHttpService
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
destination:
|
||||||
|
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
11
charts/apps/gitea/templates/pvc.yaml
Normal file
11
charts/apps/gitea/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-data'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
15
charts/apps/gitea/templates/service.yaml
Normal file
15
charts/apps/gitea/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 3000
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
8
charts/apps/gitea/values.yaml
Normal file
8
charts/apps/gitea/values.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
timezone: Europe/Amsterdam
|
||||||
|
image:
|
||||||
|
repository: docker.gitea.com/gitea
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: gitea
|
||||||
@@ -6,5 +6,5 @@ spec:
|
|||||||
environment: '{{ .Values.environment }}'
|
environment: '{{ .Values.environment }}'
|
||||||
redirectUris:
|
redirectUris:
|
||||||
- path: /sso/OID/redirect/Authentik
|
- path: /sso/OID/redirect/Authentik
|
||||||
subdomain: '{{ .Values.subdomain }}'
|
subdomain: '{{ .Values.globals.subdomain }}'
|
||||||
matchingMode: strict
|
matchingMode: strict
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: '{{ .Release.Name }}'
|
app: '{{ .Release.Name }}'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ kind: ExternalHttpService
|
|||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: '{{ .Release.Name }}'
|
||||||
spec:
|
spec:
|
||||||
environment: '{{ .Values.environment }}'
|
environment: '{{ .Values.globals.environment }}'
|
||||||
subdomain: '{{ .Values.subdomain }}'
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
destination:
|
destination:
|
||||||
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
image:
|
image:
|
||||||
repository: docker.io/jellyfin/jellyfin
|
repository: docker.io/jellyfin/jellyfin
|
||||||
tag: latest
|
tag: latest
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
environment: prod
|
|
||||||
subdomain: jellyfin
|
subdomain: jellyfin
|
||||||
|
|||||||
3
charts/apps/metamcp/Chart.yaml
Normal file
3
charts/apps/metamcp/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: metamcp
|
||||||
6
charts/apps/metamcp/templates/database.yaml
Normal file
6
charts/apps/metamcp/templates/database.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: PostgresDatabase
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
79
charts/apps/metamcp/templates/deployment.yaml
Normal file
79
charts/apps/metamcp/templates/deployment.yaml
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}'
|
||||||
|
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||||
|
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 12008
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /data
|
||||||
|
name: data
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: '{{ .Values.globals.timezone }}'
|
||||||
|
- name: APP_URL
|
||||||
|
value: https://metamcp.olsen.cloud # TODO: Change
|
||||||
|
- name: NEXT_PUBLIC_APP_URL
|
||||||
|
value: https://metamcp.olsen.cloud # TODO: Change
|
||||||
|
- name: BETTER_AUTH_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-secrets'
|
||||||
|
key: betterauth
|
||||||
|
- name: DATABASE_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: url
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: database
|
||||||
|
- name: POSTGRES_HOST
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: host
|
||||||
|
- name: POSTGRES_PORT
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: port
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: user
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: password
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-data'
|
||||||
11
charts/apps/metamcp/templates/external-http-service.yaml
Normal file
11
charts/apps/metamcp/templates/external-http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: ExternalHttpService
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
destination:
|
||||||
|
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
11
charts/apps/metamcp/templates/pvc.yaml
Normal file
11
charts/apps/metamcp/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-data'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
9
charts/apps/metamcp/templates/secret.yaml
Normal file
9
charts/apps/metamcp/templates/secret.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: GenerateSecret
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-secrets'
|
||||||
|
spec:
|
||||||
|
fields:
|
||||||
|
- name: betterauth
|
||||||
|
encoding: base64
|
||||||
|
length: 64
|
||||||
15
charts/apps/metamcp/templates/service.yaml
Normal file
15
charts/apps/metamcp/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 12008
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
8
charts/apps/metamcp/values.yaml
Normal file
8
charts/apps/metamcp/values.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
timezone: Europe/Amsterdam
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/metatool-ai/metamcp
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: metamcp
|
||||||
3
charts/apps/miniflux.disable/Chart.yaml
Normal file
3
charts/apps/miniflux.disable/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: ByteStash
|
||||||
10
charts/apps/miniflux.disable/templates/client.yaml
Normal file
10
charts/apps/miniflux.disable/templates/client.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: OidcClient
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
redirectUris:
|
||||||
|
- path: /api/auth/oidc/callback
|
||||||
|
subdomain: bytestash
|
||||||
|
matchingMode: strict
|
||||||
55
charts/apps/miniflux.disable/templates/deployment.yaml
Normal file
55
charts/apps/miniflux.disable/templates/deployment.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
serviceName: '{{ .Release.Name }}-headless'
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}'
|
||||||
|
image: ghcr.io/miniflux/miniflux:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: http
|
||||||
|
env:
|
||||||
|
- name: ALLOW_NEW_ACCOUNTS
|
||||||
|
value: 'true'
|
||||||
|
- name: DISABLE_INTERNAL_ACCOUNTS
|
||||||
|
value: 'true'
|
||||||
|
- name: OIDC_ENABLED
|
||||||
|
value: 'true'
|
||||||
|
- name: OIDC_DISPLAY_NAME
|
||||||
|
value: OIDC
|
||||||
|
- name: OIDC_CLIENT_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: clientId
|
||||||
|
- name: OIDC_CLIENT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: clientSecret
|
||||||
|
- name: OIDC_ISSUER_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: configuration
|
||||||
|
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /data/snippets
|
||||||
|
name: data
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-data'
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: ExternalHttpService
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
destination:
|
||||||
|
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
11
charts/apps/miniflux.disable/templates/pvc.yaml
Normal file
11
charts/apps/miniflux.disable/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-data'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
15
charts/apps/miniflux.disable/templates/service.yaml
Normal file
15
charts/apps/miniflux.disable/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
3
charts/apps/miniflux.disable/values.yaml
Normal file
3
charts/apps/miniflux.disable/values.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
subdomain: miniflux
|
||||||
3
charts/apps/n8n/Chart.yaml
Normal file
3
charts/apps/n8n/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: Jellyfin
|
||||||
6
charts/apps/n8n/templates/database.yaml
Normal file
6
charts/apps/n8n/templates/database.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: PostgresDatabase
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
73
charts/apps/n8n/templates/deployment.yaml
Normal file
73
charts/apps/n8n/templates/deployment.yaml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}'
|
||||||
|
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||||
|
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 5678
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /home/node/.n8n
|
||||||
|
name: data
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: '{{ .Values.globals.timezone }}'
|
||||||
|
- name: GENERIC_TIMEZONE
|
||||||
|
value: '{{ .Values.globals.timezone }}'
|
||||||
|
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
||||||
|
value: 'true'
|
||||||
|
- name: N8N_RUNNERS_ENABLED
|
||||||
|
value: 'true'
|
||||||
|
- name: DB_TYPE
|
||||||
|
value: postgresdb
|
||||||
|
- name: DB_POSTGRESDB_DATABASE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: database
|
||||||
|
- name: DB_POSTGRESDB_HOST
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: host
|
||||||
|
- name: DB_POSTGRESDB_PORT
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: port
|
||||||
|
- name: DB_POSTGRESDB_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: user
|
||||||
|
- name: DB_POSTGRESDB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-pg-connection'
|
||||||
|
key: password
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-data'
|
||||||
11
charts/apps/n8n/templates/external-http-service.yaml
Normal file
11
charts/apps/n8n/templates/external-http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: ExternalHttpService
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
destination:
|
||||||
|
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
11
charts/apps/n8n/templates/pvc.yaml
Normal file
11
charts/apps/n8n/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-data'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
15
charts/apps/n8n/templates/service.yaml
Normal file
15
charts/apps/n8n/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 5678
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
8
charts/apps/n8n/values.yaml
Normal file
8
charts/apps/n8n/values.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
timezone: Europe/Amsterdam
|
||||||
|
image:
|
||||||
|
repository: docker.n8n.io/n8nio/n8n
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: n8n
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
name: Ollama
|
name: ollama
|
||||||
|
|||||||
10
charts/apps/ollama/templates/client.yaml
Normal file
10
charts/apps/ollama/templates/client.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: OidcClient
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
redirectUris:
|
||||||
|
- path: /oauth/oidc/callback
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
matchingMode: strict
|
||||||
@@ -2,9 +2,9 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: '{{ .Release.Name }}'
|
||||||
labels:
|
|
||||||
app: '{{ .Release.Name }}'
|
|
||||||
spec:
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -15,38 +15,24 @@ spec:
|
|||||||
app: '{{ .Release.Name }}'
|
app: '{{ .Release.Name }}'
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: ollama
|
- name: '{{ .Release.Name }}'
|
||||||
image: ghcr.io/ollama/ollama:latest # Official image
|
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 11434
|
- name: http
|
||||||
name: http
|
containerPort: 11434
|
||||||
volumeMounts:
|
protocol: TCP
|
||||||
- name: ollama-data
|
livenessProbe:
|
||||||
mountPath: /root/.ollama
|
tcpSocket:
|
||||||
env:
|
port: http
|
||||||
# If you want to pre‑start a model, set this env var to the
|
|
||||||
# model name (e.g., "gpt-4o-mini"). The container will download
|
|
||||||
# it automatically at startup.
|
|
||||||
# - name: OLLAMA_MODEL
|
|
||||||
# value: "gpt-4o-mini"
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
tcpSocket:
|
||||||
scheme: HTTP
|
port: http
|
||||||
path: /api/status
|
volumeMounts:
|
||||||
port: 11434
|
- mountPath: /root/.ollama
|
||||||
initialDelaySeconds: 5
|
name: data
|
||||||
periodSeconds: 10
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 3
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 500m
|
|
||||||
memory: 1Gi
|
|
||||||
limits:
|
|
||||||
cpu: 2000m
|
|
||||||
memory: 4Gi
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: ollama-data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: '{{ .Release.Name }}-data'
|
claimName: '{{ .Release.Name }}-data'
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}-data'
|
name: '{{ .Release.Name }}-data'
|
||||||
spec:
|
spec:
|
||||||
storageClassName: '{{ .Values.environment }}'
|
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- 'ReadWriteOnce'
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 20Gi
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app: '{{ .Release.Name }}'
|
app: '{{ .Release.Name }}'
|
||||||
spec:
|
spec:
|
||||||
type: LoadBalancer # Set to NodePort/ClusterIP if you prefer
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- port: 80
|
||||||
port: 11434
|
targetPort: 11434
|
||||||
targetPort: http
|
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
name: http
|
||||||
selector:
|
selector:
|
||||||
app: '{{ .Release.Name }}'
|
app: '{{ .Release.Name }}'
|
||||||
|
|||||||
@@ -1,2 +1,7 @@
|
|||||||
environment: dev
|
globals:
|
||||||
subdomain: bytestash
|
environment: prod
|
||||||
|
image:
|
||||||
|
repository: ollama/ollama
|
||||||
|
tag: 0.11.8
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: openwebui
|
||||||
|
|||||||
3
charts/apps/openwebui/Chart.yaml
Normal file
3
charts/apps/openwebui/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: openwebui
|
||||||
10
charts/apps/openwebui/templates/client.yaml
Normal file
10
charts/apps/openwebui/templates/client.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: OidcClient
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
redirectUris:
|
||||||
|
- path: /oauth/oidc/callback
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
matchingMode: strict
|
||||||
70
charts/apps/openwebui/templates/deployment.yaml
Normal file
70
charts/apps/openwebui/templates/deployment.yaml
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}'
|
||||||
|
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||||
|
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /app/backend/data
|
||||||
|
name: data
|
||||||
|
env:
|
||||||
|
- name: ENABLE_SIGNUP
|
||||||
|
value: 'false'
|
||||||
|
- name: WEBUI_URL # TODO: remove
|
||||||
|
value: https://openwebui.olsen.cloud
|
||||||
|
- name: ENABLE_OAUTH_PERSISTENT_CONFIG
|
||||||
|
value: 'false'
|
||||||
|
- name: ENABLE_OAUTH_SIGNUP
|
||||||
|
value: 'true'
|
||||||
|
- name: OAUTH_MERGE_ACCOUNTS_BY_EMAIL
|
||||||
|
value: 'true'
|
||||||
|
- name: OAUTH_PROVIDER_NAME
|
||||||
|
value: authentik
|
||||||
|
- name: OPENID_PROVIDER_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: configuration
|
||||||
|
- name: OAUTH_CLIENT_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: clientId
|
||||||
|
- name: OAUTH_CLIENT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: clientSecret
|
||||||
|
- name: ENABLE_LOGIN_FORM
|
||||||
|
value: 'false'
|
||||||
|
- name: OPENID_REDIRECT
|
||||||
|
value: https://openwebui.olsen.cloud/oauth/oidc/callback
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-data'
|
||||||
11
charts/apps/openwebui/templates/external-http-service.yaml
Normal file
11
charts/apps/openwebui/templates/external-http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: ExternalHttpService
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
environment: '{{ .Values.globals.environment }}'
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
destination:
|
||||||
|
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
11
charts/apps/openwebui/templates/pvc.yaml
Normal file
11
charts/apps/openwebui/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-data'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
15
charts/apps/openwebui/templates/service.yaml
Normal file
15
charts/apps/openwebui/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
7
charts/apps/openwebui/values.yaml
Normal file
7
charts/apps/openwebui/values.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/open-webui/open-webui
|
||||||
|
tag: main
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: openwebui
|
||||||
0
charts/apps/values.yaml
Normal file
0
charts/apps/values.yaml
Normal file
3
charts/root/Chart.yaml
Normal file
3
charts/root/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: root
|
||||||
33
charts/root/templates/apps.yaml
Normal file
33
charts/root/templates/apps.yaml
Normal 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
|
||||||
21
charts/root/templates/root.yaml
Normal file
21
charts/root/templates/root.yaml
Normal 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
4
charts/root/values.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
globals:
|
||||||
|
env: prod
|
||||||
|
repo: https://github.com/morten-olsen/homelab-operator.git
|
||||||
|
ref: HEAD
|
||||||
@@ -10,19 +10,17 @@ spec:
|
|||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
storageClassName: manual
|
storageClassName: manual-books
|
||||||
hostPath: null
|
|
||||||
nfs:
|
nfs:
|
||||||
path: '{{ .Values.books.path }}'
|
path: '{{ .Values.books.path }}'
|
||||||
server: '{{ .Values.host }}'
|
server: '{{ .Values.host }}'
|
||||||
readOnly: true
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: books
|
name: books
|
||||||
spec:
|
spec:
|
||||||
storageClassName: manual
|
storageClassName: manual-books
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -10,19 +10,17 @@ spec:
|
|||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
storageClassName: manual
|
storageClassName: manual-movies
|
||||||
hostPath: null
|
|
||||||
nfs:
|
nfs:
|
||||||
path: '{{ .Values.movies.path }}'
|
path: '{{ .Values.movies.path }}'
|
||||||
server: '{{ .Values.host }}'
|
server: '{{ .Values.host }}'
|
||||||
readOnly: true
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: movies
|
name: movies
|
||||||
spec:
|
spec:
|
||||||
storageClassName: manual
|
storageClassName: manual-movies
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -10,19 +10,17 @@ spec:
|
|||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
storageClassName: manual
|
storageClassName: manual-music
|
||||||
hostPath: null
|
|
||||||
nfs:
|
nfs:
|
||||||
path: '{{ .Values.music.path }}'
|
path: '{{ .Values.music.path }}'
|
||||||
server: '{{ .Values.host }}'
|
server: '{{ .Values.host }}'
|
||||||
readOnly: true
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: music
|
name: music
|
||||||
spec:
|
spec:
|
||||||
storageClassName: manual
|
storageClassName: manual-music
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -10,19 +10,17 @@ spec:
|
|||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
storageClassName: manual
|
storageClassName: manual-podcasts
|
||||||
hostPath: null
|
|
||||||
nfs:
|
nfs:
|
||||||
path: '{{ .Values.podcasts.path }}'
|
path: '{{ .Values.podcasts.path }}'
|
||||||
server: '{{ .Values.host }}'
|
server: '{{ .Values.host }}'
|
||||||
readOnly: true
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: podcasts
|
name: podcasts
|
||||||
spec:
|
spec:
|
||||||
storageClassName: manual
|
storageClassName: manual-podcasts
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -10,19 +10,17 @@ spec:
|
|||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
storageClassName: manual
|
storageClassName: manual-tvshows
|
||||||
hostPath: null
|
|
||||||
nfs:
|
nfs:
|
||||||
path: '{{ .Values.tvshows.path }}'
|
path: '{{ .Values.tvshows.path }}'
|
||||||
server: '{{ .Values.host }}'
|
server: '{{ .Values.host }}'
|
||||||
readOnly: true
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: tvshows
|
name: tvshows
|
||||||
spec:
|
spec:
|
||||||
storageClassName: manual
|
storageClassName: manual-tvshows
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -204,7 +204,11 @@ class Environment extends CustomResource<typeof specSchema> {
|
|||||||
spec: {
|
spec: {
|
||||||
targetNamespace: this.#argoNamespace.name,
|
targetNamespace: this.#argoNamespace.name,
|
||||||
interval: '1h',
|
interval: '1h',
|
||||||
values: {},
|
values: {
|
||||||
|
applicationset: {
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
chart: {
|
chart: {
|
||||||
spec: {
|
spec: {
|
||||||
chart: 'argo-cd',
|
chart: 'argo-cd',
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class GenerateSecret extends CustomResource<typeof specSchema> {
|
|||||||
...current,
|
...current,
|
||||||
};
|
};
|
||||||
|
|
||||||
await this.#secret.ensure(expected);
|
await this.#secret.set(expected);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ type SecretData = {
|
|||||||
database: string;
|
database: string;
|
||||||
host: string;
|
host: string;
|
||||||
port: string;
|
port: string;
|
||||||
|
url: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const sanitizeName = (input: string) => {
|
const sanitizeName = (input: string) => {
|
||||||
@@ -87,15 +88,22 @@ class PostgresDatabase extends CustomResource<typeof specSchema> {
|
|||||||
throw new NotReadyError('MissingClusterSecret');
|
throw new NotReadyError('MissingClusterSecret');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const expected = {
|
||||||
|
password: generateRandomHexPass(),
|
||||||
|
user: this.username,
|
||||||
|
database: this.database,
|
||||||
|
...this.#secret.value,
|
||||||
|
host: clusterSecret.host,
|
||||||
|
port: clusterSecret.port,
|
||||||
|
};
|
||||||
|
|
||||||
|
const url = `postgresql://${expected.user}:${expected.password}@${expected.host}:${expected.port}/${expected.database}`;
|
||||||
|
|
||||||
await this.#secret.set(
|
await this.#secret.set(
|
||||||
(current) => ({
|
{
|
||||||
password: generateRandomHexPass(),
|
...expected,
|
||||||
user: this.username,
|
url,
|
||||||
database: this.database,
|
},
|
||||||
...current,
|
|
||||||
host: clusterSecret.host,
|
|
||||||
port: clusterSecret.port,
|
|
||||||
}),
|
|
||||||
{
|
{
|
||||||
metadata: {
|
metadata: {
|
||||||
ownerReferences: [this.ref],
|
ownerReferences: [this.ref],
|
||||||
|
|||||||
Reference in New Issue
Block a user