153 lines
3.7 KiB
YAML
153 lines
3.7 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: actualbudget-system
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: actualbudget
|
|
app.kubernetes.io/name: actualbudget
|
|
app.kubernetes.io/version: 26.1.0
|
|
name: actualbudget
|
|
namespace: actualbudget-system
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/instance: actualbudget
|
|
app.kubernetes.io/name: actualbudget
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: actualbudget
|
|
app.kubernetes.io/name: actualbudget
|
|
app.kubernetes.io/version: 26.1.0
|
|
spec:
|
|
containers:
|
|
- name: actualbudget
|
|
image: actualbudget/actual-server:26.1.0
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: TZ
|
|
value: Europe/Budapest
|
|
ports:
|
|
- containerPort: 5006
|
|
name: http
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
timeoutSeconds: 10
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: actualbudget-data
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: actualbudget
|
|
app.kubernetes.io/name: actualbudget
|
|
app.kubernetes.io/version: 26.1.0
|
|
name: actualbudget
|
|
namespace: actualbudget-system
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- name: http
|
|
port: 5006
|
|
protocol: TCP
|
|
targetPort: http
|
|
selector:
|
|
app.kubernetes.io/instance: actualbudget
|
|
app.kubernetes.io/name: actualbudget
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
external-dns.alpha.kubernetes.io/hostname: actualbudget.dooplex.hu,actualbudget.home
|
|
nginx.ingress.kubernetes.io/proxy-body-size: 50m
|
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
|
if ($geoip2_country_code != "HU") {
|
|
return 403 "Access restricted to Hungary";
|
|
}
|
|
labels:
|
|
app.kubernetes.io/instance: actualbudget
|
|
app.kubernetes.io/name: actualbudget
|
|
name: actualbudget
|
|
namespace: actualbudget-system
|
|
spec:
|
|
ingressClassName: nginx-internal
|
|
rules:
|
|
- host: actualbudget.dooplex.hu
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: actualbudget
|
|
port:
|
|
number: 5006
|
|
path: /
|
|
pathType: Prefix
|
|
- host: actualbudget.home
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: actualbudget
|
|
port:
|
|
number: 5006
|
|
path: /
|
|
pathType: Prefix
|
|
tls:
|
|
- hosts:
|
|
- actualbudget.dooplex.hu
|
|
secretName: actualbudget-tls
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/instance: actualbudget
|
|
app.kubernetes.io/name: actualbudget
|
|
name: actualbudget-data
|
|
namespace: actualbudget-system
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 5Gi
|
|
storageClassName: longhorn
|