Compare commits
2 Commits
apps/homea
...
apps/homep
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0ad21a839f | ||
![]() |
62a076b574 |
@@ -1,37 +0,0 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: homeassistant-config-setup
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: config-setup
|
||||
image: busybox:1.35
|
||||
command: ['sh', '-c']
|
||||
args:
|
||||
- |
|
||||
# Wait for config file to exist
|
||||
while [ ! -f /config/configuration.yaml ]; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
# Add HTTP config if not present
|
||||
if ! grep -q "use_x_forwarded_for" /config/configuration.yaml; then
|
||||
echo "" >> /config/configuration.yaml
|
||||
echo "# HTTP configuration for reverse proxy support" >> /config/configuration.yaml
|
||||
echo "http:" >> /config/configuration.yaml
|
||||
echo " use_x_forwarded_for: true" >> /config/configuration.yaml
|
||||
echo " trusted_proxies:" >> /config/configuration.yaml
|
||||
echo " - 10.0.0.0/8" >> /config/configuration.yaml
|
||||
echo " - 172.16.0.0/12" >> /config/configuration.yaml
|
||||
echo " - 192.168.0.0/16" >> /config/configuration.yaml
|
||||
fi
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: homeassistant-config
|
||||
volumes:
|
||||
- name: homeassistant-config
|
||||
persistentVolumeClaim:
|
||||
claimName: homeassistant-pvc
|
@@ -1,88 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: homeassistant
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
component: homeassistant
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: homeassistant
|
||||
spec:
|
||||
# hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
initContainers:
|
||||
- name: config-setup
|
||||
image: busybox:1.35
|
||||
command: ['sh', '-c']
|
||||
args:
|
||||
- |
|
||||
# Create initial config if it doesn't exist
|
||||
if [ ! -f /config/configuration.yaml ]; then
|
||||
cat > /config/configuration.yaml << 'EOF'
|
||||
# Loads default set of integrations. Do not remove.
|
||||
default_config:
|
||||
|
||||
# Load frontend themes from the themes folder
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include scenes.yaml
|
||||
|
||||
# HTTP configuration for reverse proxy support
|
||||
http:
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 10.0.0.0/8
|
||||
- 172.16.0.0/12
|
||||
- 192.168.0.0/16
|
||||
EOF
|
||||
fi
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: homeassistant-config
|
||||
containers:
|
||||
- name: homeassistant
|
||||
image: "{{ .apps.homeassistant.image }}"
|
||||
ports:
|
||||
- containerPort: 8123
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: TZ
|
||||
value: "{{ .apps.homeassistant.timezone }}"
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: homeassistant-config
|
||||
readOnly: false
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "250m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "2"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8123
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8123
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
volumes:
|
||||
- name: homeassistant-config
|
||||
persistentVolumeClaim:
|
||||
claimName: homeassistant-pvc
|
@@ -1,23 +0,0 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: homeassistant-public
|
||||
# annotations:
|
||||
# external-dns.alpha.kubernetes.io/target: "{{ .apps.homeassistant.domain }}"
|
||||
# external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
spec:
|
||||
rules:
|
||||
- host: "{{ .apps.homeassistant.domain }}"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: homeassistant
|
||||
port:
|
||||
number: 8123
|
||||
tls:
|
||||
- secretName: "{{ .apps.homeassistant.tlsKey }}"
|
||||
hosts:
|
||||
- "{{ .apps.homeassistant.domain }}"
|
@@ -1,13 +0,0 @@
|
||||
name: homeassistant
|
||||
install: true
|
||||
description: Home Assistant is an open source home automation platform that puts local control and privacy first.
|
||||
version: 2025.1.0
|
||||
icon: https://brands.home-assistant.io/homeassistant/logo.png
|
||||
requires: []
|
||||
defaultConfig:
|
||||
image: ghcr.io/home-assistant/home-assistant:stable
|
||||
timezone: UTC
|
||||
storage: 50Gi
|
||||
domain: hass.{{ .cloud.internalDomain }}
|
||||
tlsSecretName: wildcard-internal-wild-cloud-tls
|
||||
requiredSecrets: []
|
@@ -1,4 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: homeassistant
|
@@ -1,11 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: homeassistant-pvc
|
||||
spec:
|
||||
storageClassName: longhorn
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .apps.homeassistant.storage }}
|
@@ -1,12 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: homeassistant
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8123
|
||||
targetPort: 8123
|
||||
protocol: TCP
|
||||
selector:
|
||||
component: homeassistant
|
2
apps/homepage/README.md
Normal file
2
apps/homepage/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Homepage
|
||||
|
63
apps/homepage/configmap.yaml
Normal file
63
apps/homepage/configmap.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: homepage-config
|
||||
namespace: homepage
|
||||
labels:
|
||||
app: homepage
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
||||
data:
|
||||
bookmarks.yaml: |
|
||||
- Developer:
|
||||
- Github:
|
||||
- abbr: GH
|
||||
href: https://github.com/
|
||||
kubernetes.yaml: |
|
||||
mode: cluster
|
||||
services.yaml: |
|
||||
- Wild Cloud Services:
|
||||
- Traefik Dashboard:
|
||||
href: https://traefik.example.com
|
||||
description: Traefik reverse proxy dashboard
|
||||
- Longhorn:
|
||||
href: https://longhorn.example.com
|
||||
description: Distributed storage management
|
||||
settings.yaml: |
|
||||
title: Wild Cloud Dashboard
|
||||
theme: dark
|
||||
layout:
|
||||
- Wild Cloud Services:
|
||||
style: row
|
||||
columns: 2
|
||||
widgets.yaml: |
|
||||
- kubernetes:
|
||||
cluster:
|
||||
show: true
|
||||
cpu: true
|
||||
memory: true
|
||||
showLabel: true
|
||||
label: "cluster"
|
||||
nodes:
|
||||
show: true
|
||||
cpu: true
|
||||
memory: true
|
||||
showLabel: true
|
||||
- resources:
|
||||
backend: resources
|
||||
expanded: true
|
||||
cpu: true
|
||||
memory: true
|
||||
network: default
|
||||
- search:
|
||||
provider: duckduckgo
|
||||
target: _blank
|
||||
docker.yaml: |
|
||||
# Docker configuration for homepage
|
||||
# This file is required by the homepage application
|
||||
custom.css: |
|
||||
/* Custom CSS for homepage */
|
||||
/* Add your custom styles here */
|
||||
custom.js: |
|
||||
// Custom JavaScript for homepage
|
||||
// Add your custom scripts here
|
37
apps/homepage/deployment.yaml
Normal file
37
apps/homepage/deployment.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: homepage
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: homepage
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: homepage
|
||||
spec:
|
||||
serviceAccountName: homepage
|
||||
containers:
|
||||
- name: homepage
|
||||
image: "{{ .apps.homepage.image }}"
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http
|
||||
env:
|
||||
- name: HOMEPAGE_ALLOWED_HOSTS
|
||||
value: "{{ .apps.homepage.domain }}"
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /app/config
|
||||
readOnly: true
|
||||
- name: logs
|
||||
mountPath: /app/config/logs
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: homepage-config
|
||||
- name: logs
|
||||
emptyDir: {}
|
@@ -2,23 +2,23 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: jellyfin-public
|
||||
name: homepage-public
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: your.jellyfin.domain
|
||||
external-dns.alpha.kubernetes.io/target: "{{ .apps.homepage.domain }}"
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
spec:
|
||||
rules:
|
||||
- host: your.jellyfin.domain
|
||||
- host: "{{ .apps.homepage.domain }}"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: jellyfin
|
||||
name: homepage
|
||||
port:
|
||||
number: 8096
|
||||
number: 3000
|
||||
tls:
|
||||
- secretName: wildcard-internal-wild-cloud-tls
|
||||
- secretName: wildcard-wild-cloud-tls
|
||||
hosts:
|
||||
- your.jellyfin.domain
|
||||
- "{{ .apps.homepage.domain }}"
|
@@ -1,16 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: homeassistant
|
||||
namespace: homepage
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app: homeassistant
|
||||
app: homepage
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- service-account.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
- pvc.yaml
|
||||
|
||||
- configmap.yaml
|
12
apps/homepage/manifest.yaml
Normal file
12
apps/homepage/manifest.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
name: homepage
|
||||
install: true
|
||||
description: Homepage is a modern, fully static, fast, secure fully proxied, highly customizable application dashboard with integrations for over 100 services.
|
||||
version: 1.0.0
|
||||
icon: https://gethomepage.dev/favicon.ico
|
||||
requires: []
|
||||
defaultConfig:
|
||||
image: ghcr.io/gethomepage/homepage:latest
|
||||
domain: homepage.{{ .cloud.internalDomain }}
|
||||
port: 3000
|
||||
tlsSecretName: wildcard-internal-wild-cloud-tls
|
||||
requiredSecrets: []
|
8
apps/homepage/namespace.yaml
Normal file
8
apps/homepage/namespace.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: homepage
|
||||
labels:
|
||||
app: homepage
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
9
apps/homepage/service-account.yaml
Normal file
9
apps/homepage/service-account.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: homepage
|
||||
namespace: homepage
|
||||
labels:
|
||||
app: homepage
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
17
apps/homepage/service.yaml
Normal file
17
apps/homepage/service.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: homepage
|
||||
namespace: homepage
|
||||
labels:
|
||||
app: homepage
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 3000
|
||||
targetPort: http
|
||||
name: http
|
||||
selector:
|
||||
app: homepage
|
@@ -1,12 +0,0 @@
|
||||
# Config
|
||||
JELLYFIN_DOMAIN=jellyfin.$DOMAIN
|
||||
JELLYFIN_CONFIG_STORAGE=1Gi
|
||||
JELLYFIN_CACHE_STORAGE=10Gi
|
||||
JELLYFIN_MEDIA_STORAGE=100Gi
|
||||
TZ=UTC
|
||||
|
||||
# Docker Images
|
||||
JELLYFIN_IMAGE=jellyfin/jellyfin:latest
|
||||
|
||||
# Jellyfin Configuration
|
||||
JELLYFIN_PublishedServerUrl=https://jellyfin.$DOMAIN
|
@@ -1,49 +0,0 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: jellyfin
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: jellyfin
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: jellyfin
|
||||
spec:
|
||||
containers:
|
||||
- image: jellyfin/jellyfin:latest
|
||||
name: jellyfin
|
||||
ports:
|
||||
- containerPort: 8096
|
||||
protocol: TCP
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: config
|
||||
env:
|
||||
- name: TZ
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: TZ
|
||||
name: config
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: jellyfin-config
|
||||
- mountPath: /cache
|
||||
name: jellyfin-cache
|
||||
- mountPath: /media
|
||||
name: jellyfin-media
|
||||
volumes:
|
||||
- name: jellyfin-config
|
||||
persistentVolumeClaim:
|
||||
claimName: jellyfin-config-pvc
|
||||
- name: jellyfin-cache
|
||||
persistentVolumeClaim:
|
||||
claimName: jellyfin-cache-pvc
|
||||
- name: jellyfin-media
|
||||
persistentVolumeClaim:
|
||||
claimName: jellyfin-media-pvc
|
@@ -1,82 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: jellyfin
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app: jellyfin
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- ingress.yaml
|
||||
- namespace.yaml
|
||||
- pvc.yaml
|
||||
- service.yaml
|
||||
configMapGenerator:
|
||||
- name: config
|
||||
envs:
|
||||
- config/config.env
|
||||
|
||||
replacements:
|
||||
- source:
|
||||
kind: ConfigMap
|
||||
name: config
|
||||
fieldPath: data.DOMAIN
|
||||
targets:
|
||||
- select:
|
||||
kind: Ingress
|
||||
name: jellyfin-public
|
||||
fieldPaths:
|
||||
- metadata.annotations.[external-dns.alpha.kubernetes.io/target]
|
||||
- source:
|
||||
kind: ConfigMap
|
||||
name: config
|
||||
fieldPath: data.JELLYFIN_DOMAIN
|
||||
targets:
|
||||
- select:
|
||||
kind: Ingress
|
||||
name: jellyfin-public
|
||||
fieldPaths:
|
||||
- spec.rules.0.host
|
||||
- spec.tls.0.hosts.0
|
||||
- source:
|
||||
kind: ConfigMap
|
||||
name: config
|
||||
fieldPath: data.JELLYFIN_CONFIG_STORAGE
|
||||
targets:
|
||||
- select:
|
||||
kind: PersistentVolumeClaim
|
||||
name: jellyfin-config-pvc
|
||||
fieldPaths:
|
||||
- spec.resources.requests.storage
|
||||
- source:
|
||||
kind: ConfigMap
|
||||
name: config
|
||||
fieldPath: data.JELLYFIN_CACHE_STORAGE
|
||||
targets:
|
||||
- select:
|
||||
kind: PersistentVolumeClaim
|
||||
name: jellyfin-cache-pvc
|
||||
fieldPaths:
|
||||
- spec.resources.requests.storage
|
||||
- source:
|
||||
kind: ConfigMap
|
||||
name: config
|
||||
fieldPath: data.JELLYFIN_MEDIA_STORAGE
|
||||
targets:
|
||||
- select:
|
||||
kind: PersistentVolumeClaim
|
||||
name: jellyfin-media-pvc
|
||||
fieldPaths:
|
||||
- spec.resources.requests.storage
|
||||
- source:
|
||||
kind: ConfigMap
|
||||
name: config
|
||||
fieldPath: data.JELLYFIN_IMAGE
|
||||
targets:
|
||||
- select:
|
||||
kind: Deployment
|
||||
name: jellyfin
|
||||
fieldPaths:
|
||||
- spec.template.spec.containers.0.image
|
@@ -1,5 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: jellyfin
|
@@ -1,37 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: jellyfin-config-pvc
|
||||
namespace: jellyfin
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: jellyfin-cache-pvc
|
||||
namespace: jellyfin
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: jellyfin-media-pvc
|
||||
namespace: jellyfin
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: nfs
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Gi
|
@@ -1,15 +0,0 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: jellyfin
|
||||
namespace: jellyfin
|
||||
labels:
|
||||
app: jellyfin
|
||||
spec:
|
||||
ports:
|
||||
- port: 8096
|
||||
targetPort: 8096
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: jellyfin
|
Reference in New Issue
Block a user