mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
637e1c43c5 | ||
|
|
da365d0667 | ||
|
|
83deab79ec | ||
|
|
cfc7d13b99 | ||
|
|
fee900fa72 | ||
|
|
9928f908a0 | ||
|
|
d091f3030b | ||
|
|
44ead050c7 | ||
|
|
c5a15ed5d4 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
/secret.*.yaml
|
/secret.*.yaml
|
||||||
/data/
|
/data/
|
||||||
|
*.DS_Store
|
||||||
BIN
assets/2025-09-06-12-29-07.png
Normal file
BIN
assets/2025-09-06-12-29-07.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
BIN
assets/2025-09-06-12-29-15.png
Normal file
BIN
assets/2025-09-06-12-29-15.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
BIN
assets/2025-09-06-12-29-26.png
Normal file
BIN
assets/2025-09-06-12-29-26.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
@@ -1,13 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}-headless'
|
|
||||||
labels:
|
|
||||||
app: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
clusterIP: None
|
|
||||||
ports:
|
|
||||||
- port: 5000
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: '{{ .Release.Name }}'
|
|
||||||
@@ -1,50 +1,49 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: "{{ .Release.Name }}"
|
||||||
labels:
|
labels:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
spec:
|
spec:
|
||||||
serviceName: '{{ .Release.Name }}-headless'
|
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: '{{ .Release.Name }}'
|
- name: "{{ .Release.Name }}"
|
||||||
image: ghcr.io/jordan-dalby/bytestash:latest
|
image: ghcr.io/jordan-dalby/bytestash:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
name: http
|
name: http
|
||||||
env:
|
env:
|
||||||
- name: ALLOW_NEW_ACCOUNTS
|
- name: ALLOW_NEW_ACCOUNTS
|
||||||
value: 'true'
|
value: "true"
|
||||||
- name: DISABLE_INTERNAL_ACCOUNTS
|
- name: DISABLE_INTERNAL_ACCOUNTS
|
||||||
value: 'true'
|
value: "true"
|
||||||
- name: OIDC_ENABLED
|
- name: OIDC_ENABLED
|
||||||
value: 'true'
|
value: "true"
|
||||||
- name: OIDC_DISPLAY_NAME
|
- name: OIDC_DISPLAY_NAME
|
||||||
value: OIDC
|
value: OIDC
|
||||||
- name: OIDC_CLIENT_ID
|
- name: OIDC_CLIENT_ID
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ .Release.Name }}-client'
|
name: "{{ .Release.Name }}-client"
|
||||||
key: clientId
|
key: clientId
|
||||||
- name: OIDC_CLIENT_SECRET
|
- name: OIDC_CLIENT_SECRET
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ .Release.Name }}-client'
|
name: "{{ .Release.Name }}-client"
|
||||||
key: clientSecret
|
key: clientSecret
|
||||||
- name: OIDC_ISSUER_URL
|
- name: OIDC_ISSUER_URL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ .Release.Name }}-client'
|
name: "{{ .Release.Name }}-client"
|
||||||
key: configuration
|
key: configurationIssuer
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /data/snippets
|
- mountPath: /data/snippets
|
||||||
@@ -52,4 +51,4 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: '{{ .Release.Name }}-data'
|
claimName: "{{ .Release.Name }}-data"
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: "{{ .Release.Name }}"
|
||||||
spec:
|
spec:
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: '{{ .Release.Name }}'
|
- name: "{{ .Release.Name }}"
|
||||||
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 3000
|
containerPort: 3000
|
||||||
@@ -36,64 +36,68 @@ spec:
|
|||||||
name: data
|
name: data
|
||||||
env:
|
env:
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: '{{ .Values.globals.timezone }}'
|
value: "{{ .Values.globals.timezone }}"
|
||||||
- name: USER_UID
|
- name: USER_UID
|
||||||
value: '1000'
|
value: "1000"
|
||||||
- name: USER_GID
|
- name: USER_GID
|
||||||
value: '1000'
|
value: "1000"
|
||||||
|
- name: GITEA__server__SSH_DOMAIN
|
||||||
|
value: ssh-gitea.olsen.cloud
|
||||||
|
- name: GITEA__server__SSH_PORT
|
||||||
|
value: "2205"
|
||||||
- name: GITEA__service__REQUIRE_EXTERNAL_REGISTRATION_PASSWORD
|
- name: GITEA__service__REQUIRE_EXTERNAL_REGISTRATION_PASSWORD
|
||||||
value: 'true'
|
value: "true"
|
||||||
#- name: GITEA__service__ENABLE_BASIC_AUTHENTICATION
|
#- name: GITEA__service__ENABLE_BASIC_AUTHENTICATION
|
||||||
# value: 'true'
|
# value: 'true'
|
||||||
- name: GITEA__service__ENABLE_PASSWORD_SIGNIN_FORM
|
- name: GITEA__service__ENABLE_PASSWORD_SIGNIN_FORM
|
||||||
value: 'false'
|
value: "false"
|
||||||
- name: GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE
|
- name: GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE
|
||||||
value: 'true'
|
value: "true"
|
||||||
- name: GITEA__service__DEFAULT_USER_IS_RESTRICTED
|
- name: GITEA__service__DEFAULT_USER_IS_RESTRICTED
|
||||||
value: 'true'
|
value: "true"
|
||||||
- name: GITEA__service__DEFAULT_USER_VISIBILITY
|
- name: GITEA__service__DEFAULT_USER_VISIBILITY
|
||||||
value: 'private'
|
value: "private"
|
||||||
- name: GITEA__service__DEFAULT_ORG_VISIBILITY
|
- name: GITEA__service__DEFAULT_ORG_VISIBILITY
|
||||||
value: 'private'
|
value: "private"
|
||||||
- name: GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION
|
- name: GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION
|
||||||
value: 'true'
|
value: "true"
|
||||||
- name: GITEA__other__SHOW_FOOTER_POWERED_BY
|
- name: GITEA__other__SHOW_FOOTER_POWERED_BY
|
||||||
value: 'false'
|
value: "false"
|
||||||
- name: GITEA__other__SHOW_FOOTER_TEMPLATE_LOAD_TIME
|
- name: GITEA__other__SHOW_FOOTER_TEMPLATE_LOAD_TIME
|
||||||
value: 'false'
|
value: "false"
|
||||||
- name: GITEA__other__SHOW_FOOTER_VERSION
|
- name: GITEA__other__SHOW_FOOTER_VERSION
|
||||||
value: 'false'
|
value: "false"
|
||||||
- name: GITEA__repository__ENABLE_PUSH_CREATE_USER
|
- name: GITEA__repository__ENABLE_PUSH_CREATE_USER
|
||||||
value: 'true'
|
value: "true"
|
||||||
- name: GITEA__repository__ENABLE_PUSH_CREATE_ORG
|
- name: GITEA__repository__ENABLE_PUSH_CREATE_ORG
|
||||||
value: 'true'
|
value: "true"
|
||||||
- name: GITEA__openid__ENABLE_OPENID_SIGNIN
|
- name: GITEA__openid__ENABLE_OPENID_SIGNIN
|
||||||
value: 'false'
|
value: "false"
|
||||||
- name: GITEA__openid__ENABLE_OPENID_SIGNUP
|
- name: GITEA__openid__ENABLE_OPENID_SIGNUP
|
||||||
value: 'false'
|
value: "false"
|
||||||
- name: GITEA__database__DB_TYPE
|
- name: GITEA__database__DB_TYPE
|
||||||
value: postgres
|
value: postgres
|
||||||
- name: GITEA__database__NAME
|
- name: GITEA__database__NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ .Release.Name }}-pg-connection'
|
name: "{{ .Release.Name }}-pg-connection"
|
||||||
key: database
|
key: database
|
||||||
- name: GITEA__database__HOST
|
- name: GITEA__database__HOST
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ .Release.Name }}-pg-connection'
|
name: "{{ .Release.Name }}-pg-connection"
|
||||||
key: host
|
key: host
|
||||||
- name: GITEA__database__USER
|
- name: GITEA__database__USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ .Release.Name }}-pg-connection'
|
name: "{{ .Release.Name }}-pg-connection"
|
||||||
key: user
|
key: user
|
||||||
- name: GITEA__database__PASSWD
|
- name: GITEA__database__PASSWD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ .Release.Name }}-pg-connection'
|
name: "{{ .Release.Name }}-pg-connection"
|
||||||
key: password
|
key: password
|
||||||
volumes:
|
volumes:
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: '{{ .Release.Name }}-data'
|
claimName: "{{ .Release.Name }}-data"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: "{{ .Release.Name }}"
|
||||||
labels:
|
labels:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
@@ -12,21 +12,21 @@ spec:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: http
|
||||||
selector:
|
selector:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}-ssh'
|
name: "{{ .Release.Name }}-ssh"
|
||||||
labels:
|
labels:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
spec:
|
spec:
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
ports:
|
ports:
|
||||||
- port: 2202
|
- port: 2205
|
||||||
targetPort: 22
|
targetPort: 22
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: ssh
|
name: ssh
|
||||||
selector:
|
selector:
|
||||||
app: '{{ .Release.Name }}'
|
app: "{{ .Release.Name }}"
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
|
||||||
kind: HelmRepository
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
interval: 1h
|
|
||||||
url: https://helm.goharbor.io
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: harbor
|
|
||||||
reconcileStrategy: ChartVersion
|
|
||||||
sourceRef:
|
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
|
||||||
kind: HelmRepository
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
namespace: '{{ .Release.Namespace }}'
|
|
||||||
interval: 1h
|
|
||||||
values:
|
|
||||||
persistence:
|
|
||||||
persistentVolumeClaim:
|
|
||||||
registry:
|
|
||||||
storageClass: '{{ .Values.globals.environment }}'
|
|
||||||
jobservice:
|
|
||||||
jobLog:
|
|
||||||
storageClass: '{{ .Values.globals.environment }}'
|
|
||||||
database:
|
|
||||||
storageClass: '{{ .Values.globals.environment }}'
|
|
||||||
redis:
|
|
||||||
storageClass: '{{ .Values.globals.environment }}'
|
|
||||||
trivy:
|
|
||||||
storageClass: '{{ .Values.globals.environment }}'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
globals:
|
|
||||||
environment: prod
|
|
||||||
subdomain: harbor
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
name: monitoring
|
name: openwebui
|
||||||
10
charts/apps/homarr/templates/client.yaml
Normal file
10
charts/apps/homarr/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/callback/oidc
|
||||||
|
subdomain: "{{ .Values.subdomain }}"
|
||||||
|
matchingMode: strict
|
||||||
83
charts/apps/homarr/templates/deployment.yaml
Normal file
83
charts/apps/homarr/templates/deployment.yaml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
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: 7575
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /appdata
|
||||||
|
name: data
|
||||||
|
env:
|
||||||
|
- name: BASE_URL
|
||||||
|
value: https://homarr.olsen.cloud # TODO
|
||||||
|
|
||||||
|
- name: NEXTAUTH_URL
|
||||||
|
value: https://homarr.olsen.cloud
|
||||||
|
|
||||||
|
- name: AUTH_PROVIDERS
|
||||||
|
value: oidc
|
||||||
|
|
||||||
|
- name: AUTH_OIDC_CLIENT_NAME
|
||||||
|
value: Authentik
|
||||||
|
|
||||||
|
- name: AUTH_OIDC_SCOPE_OVERWRITE
|
||||||
|
value: openid email profile
|
||||||
|
|
||||||
|
- name: AUTH_OIDC_GROUPS_ATTRIBUTE
|
||||||
|
value: groups
|
||||||
|
|
||||||
|
- name: AUTH_OIDC_AUTO_LOGIN
|
||||||
|
value: "true"
|
||||||
|
|
||||||
|
- name: SECRET_ENCRYPTION_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-secrets"
|
||||||
|
key: encryptionkey
|
||||||
|
|
||||||
|
- name: AUTH_OIDC_ISSUER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-client"
|
||||||
|
key: configurationIssuer
|
||||||
|
|
||||||
|
- name: AUTH_OIDC_CLIENT_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-client"
|
||||||
|
key: clientId
|
||||||
|
|
||||||
|
- name: AUTH_OIDC_CLIENT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-client"
|
||||||
|
key: clientSecret
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ .Release.Name }}-data"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
kind: HttpService
|
kind: ExternalHttpService
|
||||||
metadata:
|
metadata:
|
||||||
name: '{{ .Release.Name }}'
|
name: '{{ .Release.Name }}'
|
||||||
spec:
|
spec:
|
||||||
11
charts/apps/homarr/templates/http-service.yaml
Normal file
11
charts/apps/homarr/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: HttpService
|
||||||
|
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/homarr/templates/pvc.yaml
Normal file
11
charts/apps/homarr/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/homarr/templates/secret.yaml
Normal file
9
charts/apps/homarr/templates/secret.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: GenerateSecret
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-secrets"
|
||||||
|
spec:
|
||||||
|
fields:
|
||||||
|
- name: encryptionkey
|
||||||
|
encoding: hex
|
||||||
|
length: 64
|
||||||
15
charts/apps/homarr/templates/service.yaml
Normal file
15
charts/apps/homarr/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: 7575
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: "{{ .Release.Name }}"
|
||||||
7
charts/apps/homarr/values.yaml
Normal file
7
charts/apps/homarr/values.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/homarr-labs/homarr
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: homarr
|
||||||
3
charts/apps/home-assistant/Chart.yaml
Normal file
3
charts/apps/home-assistant/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: home-assistant
|
||||||
10
charts/apps/home-assistant/templates/client.yaml
Normal file
10
charts/apps/home-assistant/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: /auth/openid/callback
|
||||||
|
subdomain: "{{ .Values.subdomain }}"
|
||||||
|
matchingMode: strict
|
||||||
44
charts/apps/home-assistant/templates/deployment.yaml
Normal file
44
charts/apps/home-assistant/templates/deployment.yaml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
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:
|
||||||
|
hostNetwork: true
|
||||||
|
|
||||||
|
containers:
|
||||||
|
- name: "{{ .Release.Name }}"
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "{{ .Values.globals.timezone }}"
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8123
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /config
|
||||||
|
name: config
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ .Release.Name }}-config"
|
||||||
@@ -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/home-assistant/templates/http-service.yaml
Normal file
11
charts/apps/home-assistant/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: HttpService
|
||||||
|
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/home-assistant/templates/pvc.yaml
Normal file
11
charts/apps/home-assistant/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-config"
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- "ReadWriteOnce"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "1Gi"
|
||||||
|
storageClassName: "{{ .Values.globals.environment }}"
|
||||||
15
charts/apps/home-assistant/templates/service.yaml
Normal file
15
charts/apps/home-assistant/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: 8123
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: "{{ .Release.Name }}"
|
||||||
8
charts/apps/home-assistant/values.yaml
Normal file
8
charts/apps/home-assistant/values.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
timezone: Europe/Amsterdam
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/home-assistant/home-assistant
|
||||||
|
tag: stable
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: home-assistant
|
||||||
3
charts/apps/mealie/Chart.yaml
Normal file
3
charts/apps/mealie/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: mealie
|
||||||
10
charts/apps/mealie/templates/client.yaml
Normal file
10
charts/apps/mealie/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: /login
|
||||||
|
subdomain: "{{ .Values.subdomain }}"
|
||||||
|
matchingMode: strict
|
||||||
72
charts/apps/mealie/templates/deployment.yaml
Normal file
72
charts/apps/mealie/templates/deployment.yaml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}"
|
||||||
|
labels:
|
||||||
|
app: "{{ .Release.Name }}"
|
||||||
|
spec:
|
||||||
|
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 }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: 9000
|
||||||
|
name: http
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "{{ .Values.globals.timezone }}"
|
||||||
|
- name: BASE_URL
|
||||||
|
value: https://{{ .Values.subdomain }}.{{ .Values.globals.domain }}
|
||||||
|
- name: ALLOW_SIGNUP
|
||||||
|
value: "false"
|
||||||
|
- name: PUID
|
||||||
|
value: "1000"
|
||||||
|
- name: PGID
|
||||||
|
value: "1000"
|
||||||
|
- name: OIDC_AUTH_ENABLED
|
||||||
|
value: "true"
|
||||||
|
- name: OIDC_SIGNUP_ENABLED
|
||||||
|
value: "true"
|
||||||
|
- name: OIDC_USER_GROUP
|
||||||
|
value: "mealie-users"
|
||||||
|
- name: OIDC_ADMIN_GROUP
|
||||||
|
value: "admin"
|
||||||
|
- name: OIDC_AUTO_REDIRECT
|
||||||
|
value: "true"
|
||||||
|
- name: OIDC_PROVIDER_NAME
|
||||||
|
value: Authentik
|
||||||
|
- name: OIDC_REMEMBER_ME
|
||||||
|
value: "true"
|
||||||
|
- name: OIDC_SIGNING_ALGORITHM
|
||||||
|
value: RS256
|
||||||
|
- 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_CONFIGURATION_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-client"
|
||||||
|
key: configuration
|
||||||
|
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /app/data
|
||||||
|
name: data
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ .Release.Name }}-data"
|
||||||
11
charts/apps/mealie/templates/external-http-service.yaml
Normal file
11
charts/apps/mealie/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/mealie/templates/http-service.yaml
Normal file
11
charts/apps/mealie/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: HttpService
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}"
|
||||||
|
spec:
|
||||||
|
environment: "{{ .Values.globals.environment }}"
|
||||||
|
subdomain: "{{ .Values.subdomain }}"
|
||||||
|
destination:
|
||||||
|
host: "{{ .Release.Name }}"
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
11
charts/apps/mealie/templates/pvc.yaml
Normal file
11
charts/apps/mealie/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/mealie/templates/service.yaml
Normal file
15
charts/apps/mealie/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: 9000
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: "{{ .Release.Name }}"
|
||||||
8
charts/apps/mealie/values.yaml
Normal file
8
charts/apps/mealie/values.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
domain: olsen.cloud
|
||||||
|
timezone: Europe/Amsterdam
|
||||||
|
subdomain: mealie
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/mealie-recipes/mealie
|
||||||
|
tag: latest
|
||||||
3
charts/apps/music-assistant/Chart.yaml
Normal file
3
charts/apps/music-assistant/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: music-assistant
|
||||||
44
charts/apps/music-assistant/templates/deployment.yaml
Normal file
44
charts/apps/music-assistant/templates/deployment.yaml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
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:
|
||||||
|
hostNetwork: true
|
||||||
|
|
||||||
|
containers:
|
||||||
|
- name: "{{ .Release.Name }}"
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8095
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /data
|
||||||
|
name: data
|
||||||
|
securityContext:
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- SYS_ADMIN
|
||||||
|
- DAC_READ_SEARCH
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ .Release.Name }}-data"
|
||||||
11
charts/apps/music-assistant/templates/http-service.yaml
Normal file
11
charts/apps/music-assistant/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: HttpService
|
||||||
|
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/music-assistant/templates/pvc.yaml
Normal file
11
charts/apps/music-assistant/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/music-assistant/templates/service.yaml
Normal file
15
charts/apps/music-assistant/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: 8095
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: "{{ .Release.Name }}"
|
||||||
7
charts/apps/music-assistant/values.yaml
Normal file
7
charts/apps/music-assistant/values.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/music-assistant/server
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: music-assistant
|
||||||
3
charts/apps/photoprism/Chart.yaml
Normal file
3
charts/apps/photoprism/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: photoprism
|
||||||
10
charts/apps/photoprism/templates/client.yaml
Normal file
10
charts/apps/photoprism/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/v1/oidc/redirect
|
||||||
|
subdomain: "{{ .Values.subdomain }}"
|
||||||
|
matchingMode: strict
|
||||||
92
charts/apps/photoprism/templates/deployment.yaml
Normal file
92
charts/apps/photoprism/templates/deployment.yaml
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
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 }}"
|
||||||
|
env:
|
||||||
|
- name: PHOTOPRISM_UPLOAD_NSFW
|
||||||
|
value: "true"
|
||||||
|
- name: PHOTOPRISM_SITE_URL
|
||||||
|
value: "https://{{ .Values.subdomain }}.olsen.cloud" #TODO
|
||||||
|
# - name: PHOTOPRISM_UID
|
||||||
|
# value: "1000"
|
||||||
|
# - name: PHOTOPRISM_GID
|
||||||
|
# value: "1000"
|
||||||
|
# - name: PHOTOPRISM_DISABLE_CHOWN
|
||||||
|
# value: "true"
|
||||||
|
- name: PHOTOPRISM_AUTH_MODE
|
||||||
|
value: password
|
||||||
|
- name: PHOTOPRISM_DISABLE_TLS
|
||||||
|
value: "false"
|
||||||
|
- name: PHOTOPRISM_READONLY
|
||||||
|
value: "false"
|
||||||
|
- name: PHOTOPRISM_HTTP_COMPRESSION
|
||||||
|
value: "gzip"
|
||||||
|
|
||||||
|
- name: PHOTOPRISM_ADMIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-secrets"
|
||||||
|
key: password
|
||||||
|
- name: PHOTOPRISM_OIDC_SCOPES
|
||||||
|
value: "openid email profile offline_access"
|
||||||
|
- name: PHOTOPRISM_OIDC_PROVIDER
|
||||||
|
value: Authentik
|
||||||
|
- name: PHOTOPRISM_OIDC_ICON
|
||||||
|
value: https://cdn.jsdelivr.net/gh/selfhst/icons/png/authentik.png
|
||||||
|
- name: PHOTOPRISM_OIDC_REGISTER
|
||||||
|
value: "true"
|
||||||
|
- name: PHOTOPRISM_OIDC_REDIRECT
|
||||||
|
value: "false"
|
||||||
|
- name: PHOTOPRISM_OIDC_CLIENT
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-client"
|
||||||
|
key: clientId
|
||||||
|
- name: PHOTOPRISM_OIDC_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-client"
|
||||||
|
key: clientSecret
|
||||||
|
- name: PHOTOPRISM_OIDC_URI
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-client"
|
||||||
|
key: configurationIssuer
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 2342
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /photoprism/storage
|
||||||
|
name: data
|
||||||
|
- mountPath: /photoprism/originals
|
||||||
|
name: originals
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ .Release.Name }}-data"
|
||||||
|
- name: originals
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pictures
|
||||||
11
charts/apps/photoprism/templates/external-http-service.yaml
Normal file
11
charts/apps/photoprism/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/photoprism/templates/http-service.yaml
Normal file
11
charts/apps/photoprism/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: HttpService
|
||||||
|
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/photoprism/templates/pvc.yaml
Normal file
11
charts/apps/photoprism/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/photoprism/templates/secret.yaml
Normal file
9
charts/apps/photoprism/templates/secret.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: homelab.mortenolsen.pro/v1
|
||||||
|
kind: GenerateSecret
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-secrets"
|
||||||
|
spec:
|
||||||
|
fields:
|
||||||
|
- name: password
|
||||||
|
encoding: base64
|
||||||
|
length: 64
|
||||||
15
charts/apps/photoprism/templates/service.yaml
Normal file
15
charts/apps/photoprism/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: 2342
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: "{{ .Release.Name }}"
|
||||||
7
charts/apps/photoprism/values.yaml
Normal file
7
charts/apps/photoprism/values.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
image:
|
||||||
|
repository: photoprism/photoprism
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: photoprism
|
||||||
3
charts/backup/Chart.yaml
Normal file
3
charts/backup/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: backup
|
||||||
48
charts/backup/templates/cron-job-backup.yaml
Normal file
48
charts/backup/templates/cron-job-backup.yaml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{{- $values := .Values -}}
|
||||||
|
{{- $release := .Release -}}
|
||||||
|
|
||||||
|
---
|
||||||
|
{{- range $key, $value := $values.jobs}}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: "{{ $release.Name }}-{{ $key }}-backup"
|
||||||
|
spec:
|
||||||
|
schedule: "{{ $value.cron.backup }}"
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
successfulJobsHistoryLimit: 3
|
||||||
|
failedJobsHistoryLimit: 1
|
||||||
|
jobTemplate:
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
sidecar.istio.io/inject: "false"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: "{{ $release.Name }}-{{ $key }}-backup"
|
||||||
|
image: ghcr.io/morten-olsen/homelab-operator-backup:main
|
||||||
|
imagePullPolicy: Always
|
||||||
|
command: ["/app/backup.sh"]
|
||||||
|
env:
|
||||||
|
- name: RESTIC_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ $values.password.name }}"
|
||||||
|
key: "{{ $values.password.key }}"
|
||||||
|
volumeMounts:
|
||||||
|
- name: source
|
||||||
|
mountPath: "/mnt/source"
|
||||||
|
- name: target
|
||||||
|
mountPath: "/mnt/backup"
|
||||||
|
subPath: "{{ $release.Name }}-{{ $key }}"
|
||||||
|
volumes:
|
||||||
|
- name: source
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ $value.source }}"
|
||||||
|
- name: target
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ $values.target }}"
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
---
|
||||||
|
{{- end }}
|
||||||
43
charts/backup/templates/cron-job-cleanup.yaml
Normal file
43
charts/backup/templates/cron-job-cleanup.yaml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{{- $values := .Values -}}
|
||||||
|
{{- $release := .Release -}}
|
||||||
|
|
||||||
|
---
|
||||||
|
{{- range $key, $value := $values.jobs}}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: "{{ $release.Name }}-{{ $key }}-cleanup"
|
||||||
|
spec:
|
||||||
|
schedule: "{{ $value.cron.cleanup }}"
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
successfulJobsHistoryLimit: 3
|
||||||
|
failedJobsHistoryLimit: 1
|
||||||
|
jobTemplate:
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
sidecar.istio.io/inject: "false"
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: "{{ $release.Name }}-{{ $key }}-cleanup"
|
||||||
|
image: ghcr.io/morten-olsen/homelab-operator-backup:main
|
||||||
|
imagePullPolicy: Always
|
||||||
|
command: ["/app/cleanup.sh"]
|
||||||
|
env:
|
||||||
|
- name: RESTIC_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ $values.password.name }}"
|
||||||
|
key: "{{ $values.password.key }}"
|
||||||
|
volumeMounts:
|
||||||
|
- name: target
|
||||||
|
mountPath: "/mnt/backup"
|
||||||
|
subPath: "{{ $release.Name }}-{{ $key }}"
|
||||||
|
volumes:
|
||||||
|
- name: target
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: "{{ $values.target }}"
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
---
|
||||||
|
{{- end }}
|
||||||
10
charts/backup/values.yaml
Normal file
10
charts/backup/values.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
password:
|
||||||
|
name: backup
|
||||||
|
key: password
|
||||||
|
jobs:
|
||||||
|
pictures:
|
||||||
|
cron:
|
||||||
|
backup: "0 2 * * *"
|
||||||
|
cleanup: "0 4 * * SUN"
|
||||||
|
source: pictures
|
||||||
|
target: backups
|
||||||
32
cloudflare.yaml
Normal file
32
cloudflare.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: cloudflare
|
||||||
|
namespace: homelab
|
||||||
|
data:
|
||||||
|
token: WDhqQ1Z2WGtHUVh4XzIzb0d2WmNUcWZkWm8zZGpsMXE0dGIxU0J3Zg==
|
||||||
|
account: ZThkZDYwMDQ5MTI2NDM3MDhhNGZlMDI4YjNkNWEzMzM=
|
||||||
|
tunnelName: aG9tZWxhYg==
|
||||||
|
tunnelId: YTI1ZTI1MDEtNzNiNi00MDc1LWI3MjYtZDc1YWViZmE4ZmNk
|
||||||
|
secret: UWgvRWtGNkY2MUNxSnFwMGlCQXJ3MUxyd245ZldtcTd1RDNrZk1VUEVBVT0=
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: ClusterIssuer
|
||||||
|
metadata:
|
||||||
|
name: lets-encrypt-prod
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
|
||||||
|
spec:
|
||||||
|
acme:
|
||||||
|
server: https://acme-v02.api.letsencrypt.org/directory
|
||||||
|
email: alice@alice.com
|
||||||
|
privateKeySecretRef:
|
||||||
|
name: letsencrypt-prod-account-key
|
||||||
|
solvers:
|
||||||
|
- dns01:
|
||||||
|
cloudflare:
|
||||||
|
email: alice@alice.com
|
||||||
|
apiTokenSecretRef:
|
||||||
|
name: cloudflare
|
||||||
|
key: token
|
||||||
@@ -16,14 +16,14 @@ mkdir -p "/mnt/backup"
|
|||||||
echo "Starting Restic backup from $SOURCE_DIR to $RESTIC_REPOSITORY"
|
echo "Starting Restic backup from $SOURCE_DIR to $RESTIC_REPOSITORY"
|
||||||
|
|
||||||
echo "Checking/Initializing Restic repository..."
|
echo "Checking/Initializing Restic repository..."
|
||||||
restic init --repository "$RESTIC_REPOSITORY" || true
|
restic init --repo "$RESTIC_REPOSITORY" || true
|
||||||
|
|
||||||
echo "Running Restic backup..."
|
echo "Running Restic backup..."
|
||||||
restic backup \
|
restic backup \
|
||||||
|
-r "$RESTIC_REPOSITORY" \
|
||||||
"$SOURCE_DIR" \
|
"$SOURCE_DIR" \
|
||||||
--verbose \
|
--verbose \
|
||||||
--tag "daily" \
|
--tag "daily"
|
||||||
--exclude-cache \
|
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Restic backup completed successfully!"
|
echo "Restic backup completed successfully!"
|
||||||
|
|||||||
Reference in New Issue
Block a user