Initial commit
This commit is contained in:
13
gotify/gotify-pvc.yaml
Normal file
13
gotify/gotify-pvc.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: gotify-data-pvc
|
||||
namespace: gotify
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn-static
|
||||
volumeName: gotify-data
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
13
gotify/gotify-svc.yaml
Normal file
13
gotify/gotify-svc.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gotify
|
||||
namespace: gotify
|
||||
spec:
|
||||
selector:
|
||||
app: gotify
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
||||
63
gotify/gotify.yaml
Normal file
63
gotify/gotify.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: gotify
|
||||
namespace: gotify
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gotify
|
||||
serviceName: gotify
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gotify
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: gotify
|
||||
image: gotify/server:2.9.1
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
env:
|
||||
- name: GOTIFY_DEFAULTUSER_PASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gotify-secrets
|
||||
key: default_user_pass
|
||||
- name: GOTIFY_DATABASE_DIALECT
|
||||
value: postgres
|
||||
- name: DB_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gotify-secrets
|
||||
key: db_user
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gotify-secrets
|
||||
key: db_password
|
||||
- name: DB_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gotify-secrets
|
||||
key: db_name
|
||||
- name: GOTIFY_DATABASE_CONNECTION
|
||||
value: "host=gotify-postgresql port=5432 user=$(DB_USER) dbname=$(DB_NAME) password=$(DB_PASSWORD) sslmode=disable"
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /app/data
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: gotify-data-pvc
|
||||
51
gotify/httproute.yaml
Normal file
51
gotify/httproute.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: gotify-route
|
||||
namespace: gotify
|
||||
spec:
|
||||
parentRefs:
|
||||
- group: gateway.networking.k8s.io
|
||||
kind: Gateway
|
||||
name: gateway-internal
|
||||
namespace: envoy-gateway
|
||||
sectionName: gotify
|
||||
- group: gateway.networking.k8s.io
|
||||
kind: Gateway
|
||||
name: gateway-public
|
||||
namespace: envoy-gateway
|
||||
sectionName: gotify
|
||||
hostnames:
|
||||
- "gotify.jsme.be"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
filters:
|
||||
- type: RequestHeaderModifier
|
||||
requestHeaderModifier:
|
||||
set:
|
||||
- name: X-Forwarded-Host
|
||||
value: "gotify.jsme.be"
|
||||
- name: X-Forwarded-Proto
|
||||
value: https
|
||||
- type: ResponseHeaderModifier
|
||||
responseHeaderModifier:
|
||||
set:
|
||||
- name: Strict-Transport-Security
|
||||
value: "max-age=31536000; includeSubDomains"
|
||||
- name: X-Content-Type-Options
|
||||
value: nosniff
|
||||
- name: X-Frame-Options
|
||||
value: SAMEORIGIN
|
||||
- name: Referrer-Policy
|
||||
value: strict-origin-when-cross-origin
|
||||
- name: Permissions-Policy
|
||||
value: "camera=(), microphone=(), geolocation=(), payment=()"
|
||||
backendRefs:
|
||||
- name: gotify
|
||||
port: 80
|
||||
kind: Service
|
||||
group: ""
|
||||
weight: 1
|
||||
55
gotify/postgres/postgres-statefulset.yaml
Normal file
55
gotify/postgres/postgres-statefulset.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: gotify-postgresql
|
||||
namespace: gotify
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gotify-postgresql
|
||||
serviceName: gotify-postgresql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gotify-postgresql
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- name: gotify-postgresql
|
||||
image: postgres:18
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
volumeMounts:
|
||||
- name: gotify-postgresql-database
|
||||
mountPath: /var/lib/postgresql/pgdata
|
||||
env:
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/pgdata/data
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gotify-secrets
|
||||
key: db_password
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gotify-secrets
|
||||
key: db_user
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gotify-secrets
|
||||
key: db_name
|
||||
volumes:
|
||||
- name: gotify-postgresql-database
|
||||
persistentVolumeClaim:
|
||||
claimName: gotify-postgresql-pvc
|
||||
12
gotify/postgres/postgresql-pvc.yaml
Normal file
12
gotify/postgres/postgresql-pvc.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: gotify-postgresql-pvc
|
||||
namespace: gotify
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
14
gotify/postgres/postgresql-svc.yaml
Normal file
14
gotify/postgres/postgresql-svc.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gotify-postgresql
|
||||
namespace: gotify
|
||||
spec:
|
||||
selector:
|
||||
app: gotify-postgresql
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: gotify-postgresql-port
|
||||
protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
Reference in New Issue
Block a user