Skip to content

Instantly share code, notes, and snippets.

@kowalski7cc
Created February 20, 2024 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kowalski7cc/7c4f11a45cd81b64a915f337b869d59f to your computer and use it in GitHub Desktop.
Save kowalski7cc/7c4f11a45cd81b64a915f337b869d59f to your computer and use it in GitHub Desktop.
Pretix K3S deployment
apiVersion: v1
kind: Namespace
metadata:
name: pretix
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: postgresql
namespace: pretix
spec:
chart: oci://registry-1.docker.io/bitnamicharts/postgresql
targetNamespace: pretix
valuesContent: |-
global:
postgresql:
auth:
username: pretix
password: pretix
database: pretix
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-pretix
namespace: pretix
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: redis
namespace: pretix
spec:
chart: oci://registry-1.docker.io/bitnamicharts/redis
targetNamespace: pretix
valuesContent: |-
auth:
enabled: false
sentinel: false
---
# deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: pretix
namespace: pretix
labels:
app: pretix
spec:
replicas: 1
selector:
matchLabels:
app: pretix
template:
metadata:
labels:
app: pretix
spec:
volumes:
- name: pretix-config
configMap:
name: pretix-config
- name: data-pretix
persistentVolumeClaim:
claimName: data-pretix
containers:
- name: pretix
image: pretix/standalone
ports:
- containerPort: 80
volumeMounts:
- name: pretix-config
mountPath: /etc/pretix/pretix.cfg
subPath: pretix.conf
- name: data-pretix
mountPath: /data
---
apiVersion: v1
kind: Service
metadata:
name: pretix
namespace: pretix
spec:
selector:
app: pretix
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pretix
namespace: pretix
annotations:
cert-manager.io/cluster-issuer: cloudflare-issuer
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
rules:
- host: pretix.kowalski7cc.xyz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: pretix
port:
number: 80
tls:
- hosts:
- pretix.kowalski7cc.xyz
secretName: pretix-tls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment