mirror of
https://github.com/morten-olsen/homelab-apps.git
synced 2026-02-08 01:36:28 +01:00
cleanup
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
version: 1.0.0
|
|
||||||
name: appsmith
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
|
||||||
kind: OidcClient
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
environment: '{{ .Values.globals.environment }}'
|
|
||||||
redirectUris:
|
|
||||||
- path: /api/auth/oidc/callback
|
|
||||||
subdomain: '{{ .Values.subdomain }}'
|
|
||||||
matchingMode: strict
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
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: 80
|
|
||||||
name: http
|
|
||||||
env:
|
|
||||||
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /appsmith-stacks
|
|
||||||
name: data
|
|
||||||
volumes:
|
|
||||||
- name: data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: "{{ .Release.Name }}-data"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}-data'
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- 'ReadWriteOnce'
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: '1Gi'
|
|
||||||
storageClassName: '{{ .Values.globals.environment }}'
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
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 }}'
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateway }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
subdomain: appsmith
|
|
||||||
image:
|
|
||||||
repository: index.docker.io/appsmith/appsmith-ce
|
|
||||||
tag: latest@sha256:0776a0a9665919800d22fc736956ec54fedd16a9a30f9d4ad3f3fc0fd8ac8694
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
version: 1.0.0
|
|
||||||
name: backup
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
{{- $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 }}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
{{- $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 }}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
globals:
|
|
||||||
environment: prod
|
|
||||||
timezone: Europe/Amsterdam
|
|
||||||
domain: olsen.cloud
|
|
||||||
image:
|
|
||||||
repository: garethgeorge/backrest
|
|
||||||
tag: latest@sha256:1308397161321b3c5aeca8acc6bf26eccb990df385f2532d3ce0eaa8b483dedf
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
subdomain: restic
|
|
||||||
password:
|
|
||||||
name: backup
|
|
||||||
key: password
|
|
||||||
jobs:
|
|
||||||
pictures:
|
|
||||||
cron:
|
|
||||||
backup: "0 2 * * *"
|
|
||||||
cleanup: "0 4 * * SUN"
|
|
||||||
source: pictures
|
|
||||||
target: backups
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
|
||||||
kind: OidcClient
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
environment: '{{ .Values.globals.environment }}'
|
|
||||||
redirectUris:
|
|
||||||
- path: /api/auth/oidc/callback
|
|
||||||
subdomain: '{{ .Values.subdomain }}'
|
|
||||||
matchingMode: strict
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
|
||||||
kind: OidcClient
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
environment: '{{ .Values.globals.environment }}'
|
|
||||||
redirectUris:
|
|
||||||
- path: /api/v2/users/oidc/callback
|
|
||||||
subdomain: '{{ .Values.subdomain }}'
|
|
||||||
matchingMode: strict
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
version: 1.0.0
|
|
||||||
name: drip
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
replicas: 1
|
|
||||||
revisionHistoryLimit: 0
|
|
||||||
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: {{ .Values.service.port }}
|
|
||||||
protocol: TCP
|
|
||||||
- name: tcp-tunnel-min
|
|
||||||
containerPort: {{ .Values.service.tcpPortMin }}
|
|
||||||
protocol: TCP
|
|
||||||
- name: tcp-tunnel-max
|
|
||||||
containerPort: {{ .Values.service.tcpPortMax }}
|
|
||||||
protocol: TCP
|
|
||||||
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /app/data
|
|
||||||
name: data
|
|
||||||
env:
|
|
||||||
- name: TZ
|
|
||||||
value: UTC
|
|
||||||
- name: AUTH_TOKEN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: "{{ .Release.Name }}-secrets"
|
|
||||||
key: authtoken
|
|
||||||
- name: DOMAIN
|
|
||||||
value: "{{ .Values.subdomain }}.{{ .Values.globals.environment }}"
|
|
||||||
command:
|
|
||||||
- drip-server
|
|
||||||
- --domain
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.environment }}"
|
|
||||||
- --port
|
|
||||||
- "{{ .Values.service.port }}"
|
|
||||||
- --token
|
|
||||||
- "$(AUTH_TOKEN)"
|
|
||||||
- --tcp-port-min
|
|
||||||
- "{{ .Values.service.tcpPortMin }}"
|
|
||||||
- --tcp-port-max
|
|
||||||
- "{{ .Values.service.tcpPortMax }}"
|
|
||||||
livenessProbe:
|
|
||||||
exec:
|
|
||||||
command: {{ .Values.healthcheck.test }}
|
|
||||||
initialDelaySeconds: {{ .Values.healthcheck.startPeriod | default 0 | trimSuffix "s" | int }}
|
|
||||||
periodSeconds: {{ .Values.healthcheck.interval | default 10 | trimSuffix "s" | int }}
|
|
||||||
timeoutSeconds: {{ .Values.healthcheck.timeout | default 1 | trimSuffix "s" | int }}
|
|
||||||
failureThreshold: {{ .Values.healthcheck.retries | default 3 }}
|
|
||||||
readinessProbe:
|
|
||||||
exec:
|
|
||||||
command: {{ .Values.healthcheck.test }}
|
|
||||||
initialDelaySeconds: {{ .Values.healthcheck.startPeriod | default 0 | trimSuffix "s" | int }}
|
|
||||||
periodSeconds: {{ .Values.healthcheck.interval | default 10 | trimSuffix "s" | int }}
|
|
||||||
timeoutSeconds: {{ .Values.healthcheck.timeout | default 1 | trimSuffix "s" | int }}
|
|
||||||
failureThreshold: {{ .Values.healthcheck.retries | default 3 }}
|
|
||||||
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: "{{ .Values.resources.limits.cpu }}"
|
|
||||||
memory: "{{ .Values.resources.limits.memory }}"
|
|
||||||
volumes:
|
|
||||||
- name: data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: "{{ .Release.Name }}-data"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
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: {{ .Values.service.port }}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-data"
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
storageClassName: '{{ .Values.globals.environment }}'
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
|
||||||
kind: GenerateSecret
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-secrets"
|
|
||||||
spec:
|
|
||||||
fields:
|
|
||||||
- name: authtoken
|
|
||||||
encoding: hex
|
|
||||||
length: 64
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: {{ .Values.service.port }}
|
|
||||||
targetPort: http
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
- port: {{ .Values.service.tcpPortMin }}
|
|
||||||
targetPort: tcp-tunnel-min
|
|
||||||
protocol: TCP
|
|
||||||
name: tcp-tunnel-min
|
|
||||||
- port: {{ .Values.service.tcpPortMax }}
|
|
||||||
targetPort: tcp-tunnel-max
|
|
||||||
protocol: TCP
|
|
||||||
name: tcp-tunnel-max
|
|
||||||
selector:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateway }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
image:
|
|
||||||
repository: ghcr.io/gouryella/drip
|
|
||||||
tag: latest@sha256:c986b7c3b6a818389e69b2510dd3562bfd77046b7bded9534c9c4b1ef78319de
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
subdomain: drip
|
|
||||||
|
|
||||||
service:
|
|
||||||
port: 443
|
|
||||||
tcpPortMin: 20000
|
|
||||||
tcpPortMax: 20100
|
|
||||||
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 1
|
|
||||||
memory: 512Mi
|
|
||||||
|
|
||||||
healthcheck:
|
|
||||||
test:
|
|
||||||
- wget
|
|
||||||
- --no-verbose
|
|
||||||
- --tries=1
|
|
||||||
- --spider
|
|
||||||
- http://localhost:443/health
|
|
||||||
interval: 30s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 3
|
|
||||||
startPeriod: 10s
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
version: 1.0.0
|
|
||||||
name: headscale
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
|
||||||
kind: OidcClient
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
environment: '{{ .Values.globals.environment }}'
|
|
||||||
redirectUris:
|
|
||||||
- path: /oidc/callback
|
|
||||||
subdomain: '{{ .Values.subdomain }}'
|
|
||||||
matchingMode: strict
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}-config-template'
|
|
||||||
data:
|
|
||||||
config.yaml.template: |
|
|
||||||
server_url: ${PUBLIC_URL}
|
|
||||||
listen_addr: 0.0.0.0:8080
|
|
||||||
metrics_listen_addr: 0.0.0.0:9090
|
|
||||||
grpc_listen_addr: 0.0.0.0:50443
|
|
||||||
|
|
||||||
private_key_path: /var/lib/headscale/private_key # Path inside the container
|
|
||||||
|
|
||||||
noise:
|
|
||||||
private_key_path: /var/lib/headscale/noise_private_key # Path inside the container
|
|
||||||
|
|
||||||
listen_routes: false
|
|
||||||
base_domain: "${PUBLIC_URL}" # For client routes and DNS push.
|
|
||||||
|
|
||||||
derp:
|
|
||||||
server:
|
|
||||||
enabled: false
|
|
||||||
region_id: 999
|
|
||||||
region_code: "headscale"
|
|
||||||
region_name: "Headscale Embedded DERP"
|
|
||||||
stun_listen_addr: "0.0.0.0:3478"
|
|
||||||
automatically_add_embedded_derp_region: true
|
|
||||||
urls:
|
|
||||||
- https://controlplane.tailscale.com/derpmap/default
|
|
||||||
auto_update_enabled: true
|
|
||||||
update_frequency: 24h
|
|
||||||
|
|
||||||
oidc:
|
|
||||||
enabled: true
|
|
||||||
only_start_if_oidc_is_available: true
|
|
||||||
issuer: "${OIDC_ISSUER_URL}"
|
|
||||||
client_id: "${OIDC_CLIENT_ID}"
|
|
||||||
client_secret: "${OIDC_CLIENT_SECRET}"
|
|
||||||
scopes: ["openid", "profile", "email"]
|
|
||||||
redirect_url: "${PUBLIC_URL}/oidc/callback"
|
|
||||||
pkce:
|
|
||||||
enabled: true
|
|
||||||
method: S256
|
|
||||||
|
|
||||||
|
|
||||||
# DNS configuration
|
|
||||||
dns:
|
|
||||||
magic_dns: false
|
|
||||||
override_local_dns: true # Push Headscale's DNS settings to clients
|
|
||||||
ttl: 60
|
|
||||||
nameservers:
|
|
||||||
global:
|
|
||||||
- 1.1.1.1 # Cloudflare DNS
|
|
||||||
#- 10.43.0.10 # Replace with your ClusterIP for kube-dns/CoreDNS
|
|
||||||
# Domains to search for (e.g., for Kubernetes services)
|
|
||||||
search_domains:
|
|
||||||
- svc.cluster.local
|
|
||||||
- cluster.local
|
|
||||||
|
|
||||||
auto_create_users: true
|
|
||||||
|
|
||||||
oidc_user_property: preferred_username # Or 'email' or 'sub'
|
|
||||||
|
|
||||||
prefixes:
|
|
||||||
v4: 10.20.20.0/24 # Example: A /24 subnet for your VPN clients
|
|
||||||
|
|
||||||
database:
|
|
||||||
type: sqlite
|
|
||||||
sqlite:
|
|
||||||
path: /var/lib/headscale/db.sqlite
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
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:
|
|
||||||
# To expose WireGuard UDP directly, we need a NodePort service.
|
|
||||||
# The Pod needs to be aware of the external port it's being exposed on.
|
|
||||||
# The easiest way to get WireGuard to listen on the correct port and make it
|
|
||||||
# externally accessible is to use `hostNetwork: true` for the UDP component,
|
|
||||||
# or by directly specifying the listen port in Headscale config if the NodePort is stable.
|
|
||||||
|
|
||||||
# OPTION 1: Best for simple homelab on bare metal where host network traffic isn't an issue
|
|
||||||
# hostNetwork: true # This makes the pod listen directly on the node's IPs
|
|
||||||
# dnsPolicy: ClusterFirstWithHostNet # Required if using hostNetwork
|
|
||||||
|
|
||||||
initContainers:
|
|
||||||
- name: generate-config
|
|
||||||
image: alpine/git # A small image with 'envsubst' available or easily installable
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ['sh', '-c']
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
# Install envsubst if it's not present (alpine/git may not have it by default)
|
|
||||||
apk update && apk add bash gettext
|
|
||||||
|
|
||||||
# Substitute environment variables into the template
|
|
||||||
# The vars are passed via `env` section below
|
|
||||||
envsubst < /config-template/config.yaml.template > /etc/headscale/config.yaml
|
|
||||||
|
|
||||||
mkdir -p /etc/headscale
|
|
||||||
# Optional: Verify the generated config
|
|
||||||
echo "--- Generated Headscale Configuration ---"
|
|
||||||
cat /etc/headscale/config.yaml
|
|
||||||
echo "---------------------------------------"
|
|
||||||
env:
|
|
||||||
# These are the variables that `envsubst` will look for and replace
|
|
||||||
- name: PUBLIC_URL
|
|
||||||
value: 'https://{{ .Values.subdomain }}.olsen.cloud'
|
|
||||||
- name: OIDC_ISSUER_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: '{{ .Release.Name }}-client'
|
|
||||||
key: configurationIssuer
|
|
||||||
- name: OIDC_CLIENT_ID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: '{{ .Release.Name }}-client'
|
|
||||||
key: clientId
|
|
||||||
- name: OIDC_CLIENT_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: '{{ .Release.Name }}-client'
|
|
||||||
key: clientSecret
|
|
||||||
# Add any other variables used in config.yaml.template here
|
|
||||||
volumeMounts:
|
|
||||||
- name: config-template
|
|
||||||
mountPath: /config-template # Mount the ConfigMap as a volume
|
|
||||||
readOnly: true
|
|
||||||
- name: headscale-config
|
|
||||||
mountPath: /etc/headscale # Destination for the generated config
|
|
||||||
|
|
||||||
containers:
|
|
||||||
- name: '{{ .Release.Name }}'
|
|
||||||
image: headscale/headscale:latest # Use the official image
|
|
||||||
command: ['headscale', 'serve']
|
|
||||||
ports:
|
|
||||||
- name: http-api
|
|
||||||
containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
- name: wireguard-udp
|
|
||||||
containerPort: 41641
|
|
||||||
protocol: UDP
|
|
||||||
volumeMounts:
|
|
||||||
- name: headscale-data
|
|
||||||
mountPath: /var/lib/headscale
|
|
||||||
- name: headscale-config
|
|
||||||
mountPath: /etc/headscale
|
|
||||||
volumes:
|
|
||||||
- name: config-template
|
|
||||||
configMap:
|
|
||||||
name: '{{ .Release.Name }}-config-template'
|
|
||||||
- name: headscale-config
|
|
||||||
emptyDir: {}
|
|
||||||
- name: headscale-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: '{{ .Release.Name }}-data'
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}-data'
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- 'ReadWriteOnce'
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: '1Gi'
|
|
||||||
storageClassName: '{{ .Values.globals.environment }}'
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
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 }}'
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}-headscale'
|
|
||||||
labels:
|
|
||||||
app: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
type: LoadBalancer
|
|
||||||
ports:
|
|
||||||
- port: 41641
|
|
||||||
targetPort: 41641
|
|
||||||
protocol: UDP
|
|
||||||
name: wireguard-udp
|
|
||||||
selector:
|
|
||||||
app: '{{ .Release.Name }}'
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateway }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
image:
|
|
||||||
repository: headscale/headscale
|
|
||||||
tag: latest@sha256:cd37b30018575fd62f18419138d4e526bcf894e1d4e1aa1b08699cec1891ac23
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
subdomain: headscale
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
version: 1.0.0
|
|
||||||
name: mindsdb
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
apiVersion: homelab.mortenolsen.pro/v1
|
|
||||||
kind: PostgresDatabase
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}'
|
|
||||||
spec:
|
|
||||||
environment: '{{ .Values.globals.environment }}'
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
replicas: 1
|
|
||||||
revisionHistoryLimit: 0
|
|
||||||
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: 47334
|
|
||||||
protocol: TCP
|
|
||||||
- name: mysql
|
|
||||||
containerPort: 47335
|
|
||||||
protocol: TCP
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
env:
|
|
||||||
- name: TZ
|
|
||||||
value: "{{ .Values.globals.timezone }}"
|
|
||||||
- name: MINDSDB_APIS
|
|
||||||
value: http,postgres
|
|
||||||
- name: MINDSDB_DB_CON
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: "{{ .Release.Name }}-pg-connection"
|
|
||||||
key: url
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: mdb_data:/root/mdb_storage mindsdb/mindsdb
|
|
||||||
name: data
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: "{{ .Release.Name }}-data"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-data"
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- "ReadWriteOnce"
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: "1Gi"
|
|
||||||
storageClassName: "{{ .Values.globals.environment }}"
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-http"
|
|
||||||
labels:
|
|
||||||
app: "{{ .Release.Name }}-http"
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 47334
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-mysql"
|
|
||||||
labels:
|
|
||||||
app: "{{ .Release.Name }}-mysql"
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 3306
|
|
||||||
targetPort: 47335
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: "{{ .Release.Name }}"
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-public"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateways.public }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-private"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateways.private }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
image:
|
|
||||||
repository: docker.io/mindsdb/mindsdb
|
|
||||||
tag: latest@sha256:ad8a8c79eb99e0454b14bdd8690204ba7e1314a3e2529fb5fa1c506ba0e7007f
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
subdomain: mindsdb
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
version: 1.0.0
|
|
||||||
name: pigeonpod
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}"
|
|
||||||
spec:
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
replicas: 1
|
|
||||||
revisionHistoryLimit: 0
|
|
||||||
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: 8080
|
|
||||||
protocol: TCP
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: http
|
|
||||||
env:
|
|
||||||
- name: TZ
|
|
||||||
value: "{{ .Values.globals.timezone }}"
|
|
||||||
- name: PIGEON_BASE_URL
|
|
||||||
value: "https://{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- name: PIGEON_AUDIO_FILE_PATH
|
|
||||||
value: /youtube
|
|
||||||
- name: SPRING_DATASOURCE_URL
|
|
||||||
value: jdbc:sqlite:/data/pigeon-pod.db
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /data
|
|
||||||
name: data
|
|
||||||
- mountPath: /media/youtube
|
|
||||||
name: youtube
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: "{{ .Release.Name }}-data"
|
|
||||||
- name: youtube
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: youtube
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: '{{ .Release.Name }}-data'
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- 'ReadWriteOnce'
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: '1Gi'
|
|
||||||
storageClassName: '{{ .Values.globals.environment }}'
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
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 }}"
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-public"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateways.public }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: networking.istio.io/v1
|
|
||||||
kind: VirtualService
|
|
||||||
metadata:
|
|
||||||
name: "{{ .Release.Name }}-private"
|
|
||||||
namespace: "{{ .Release.Namespace }}"
|
|
||||||
spec:
|
|
||||||
gateways:
|
|
||||||
- "{{ .Values.globals.istio.gateways.private }}"
|
|
||||||
- mesh
|
|
||||||
hosts:
|
|
||||||
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
|
|
||||||
- mesh
|
|
||||||
http:
|
|
||||||
- route:
|
|
||||||
- destination:
|
|
||||||
host: "{{ .Release.Name }}"
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
image:
|
|
||||||
repository: ghcr.io/aizhimou/pigeon-pod
|
|
||||||
tag: latest@sha256:e1031ccaa2c4f42918bb695fc38c91d3a65f525cd36396f8deea84220055ac75
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
subdomain: pigeonpod
|
|
||||||
Reference in New Issue
Block a user