homeserver initial commit

- ansible
- docker-compose
- Kubernetes_deployments
This commit is contained in:
2025-02-12 20:10:56 +02:00
commit e5e8aa6b87
70 changed files with 2860 additions and 0 deletions

View File

@ -0,0 +1,5 @@
apiVersion: v2
name: pocketbase
description: A Helm chart for deploying PocketBase
version: 0.1.0
appVersion: "latest"

View File

@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.deployment.name }}
namespace: {{ .Values.namespace }}
labels:
app: {{ .Values.deployment.labels.app }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Values.deployment.labels.app }}
template:
metadata:
labels:
app: {{ .Values.deployment.labels.app }}
spec:
containers:
- name: pocketbase
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
ports:
- containerPort: {{ .Values.deployment.containerPort }}
volumeMounts:
- name: {{ .Values.pvc.name }}
mountPath: {{ index .Values.deployment.volumeMounts 0 "mountPath" }}
volumes:
- name: {{ .Values.pvc.name }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.name }}

View File

@ -0,0 +1,32 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Values.ingress.name }}
namespace: {{ .Values.namespace }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
rules:
- host: {{ .Values.ingress.host }}
http:
paths:
- path: {{ .Values.ingress.path }}
pathType: {{ .Values.ingress.pathType }}
backend:
service:
name: {{ .Values.service.name }}
port:
number: {{ .Values.service.port }}
{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
{{- range .Values.ingress.tls.hosts }}
- "{{ . }}"
{{- end }}
secretName: {{ .Values.ingress.tls.secretName }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Values.persistence.name }}
namespace: {{ .Values.namespace }}
spec:
accessModes:
- {{ .Values.persistence.accessMode }}
resources:
requests:
storage: {{ .Values.persistence.size }}

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.service.name }}
namespace: {{ .Values.namespace }}
spec:
selector:
app: {{ .Values.deployment.labels.app }}
ports:
- protocol: TCP
port: {{ .Values.service.port }}
targetPort: {{ .Values.deployment.containerPort }}
type: {{ .Values.service.type }}

View File

@ -0,0 +1,43 @@
replicaCount: 1
namespace: pocketbase
deployment:
name: pocketbase
containerPort: 8090
labels:
app: pocketbase
volumeMounts:
- mountPath: /pb_data
image:
repository: ghcr.io/muchobien/pocketbase
tag: latest
pullPolicy: IfNotPresent
service:
name: pocketbase
type: ClusterIP
port: 80
ingress:
enabled: true
name: pocketbase-ingress
className: traefik
annotations: {}
host: pocketbase.example.com
path: /
pathType: Prefix
tls:
enabled: true
secretName: wildcard-cert-secret
hosts:
- "*.example.com"
persistence:
enabled: true
name: pocketbase-pvc
accessMode: ReadWriteOnce
size: 5Gi
pvc:
name: pocketbase-data