feat(plausible): basic setup
Some checks failed
Renovate / renovate (push) Has been cancelled

This commit is contained in:
Peter 2024-11-26 20:56:57 +01:00
parent d777e5e510
commit b009392183
Signed by: prskr
GPG key ID: F56BED6903BC5E37
8 changed files with 104 additions and 1 deletions

1
plausible/.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
config/*.env filter=age diff=age merge=age -text

Binary file not shown.

View file

@ -0,0 +1,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: plausible
images:
- name: plausible
newName: ghcr.io/plausible/community-edition
newTag: "v2.1.4"
resources:
- resources/namespace.yaml
- resources/postgres/db.yaml
- resources/postgres/user.yaml
secretGenerator:
- name: plausible-config
envs:
- "config/plausible.env"

View file

@ -1 +0,0 @@
ToLqfKE7y4wFvVbz

View file

@ -0,0 +1,59 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: plausible
spec:
selector:
matchLabels:
app.kubernetes.io/name: plausible
replicas: 2
template:
metadata:
labels:
app.kubernetes.io/name: plausible
spec:
containers:
- name: plausible
image: plausible
envFrom:
- secretRef:
name: plausible-config
ports:
- containerPort: 3000
protocol: TCP
name: web
volumeMounts:
- mountPath: /var/lib/plausible/tmp
name: temp
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
volumes:
- name: temp
emptyDir:
sizeLimit: 1500Mi
securityContext:
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true

View file

@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: plausible
labels:
prometheus: default

View file

@ -0,0 +1,8 @@
---
apiVersion: db.movetokube.com/v1alpha1
kind: Postgres
metadata:
name: plausible
spec:
database: plausible
dropOnDelete: false

View file

@ -0,0 +1,10 @@
---
apiVersion: db.movetokube.com/v1alpha1
kind: PostgresUser
metadata:
name: plausible
spec:
role: plausible
database: plausible
secretName: db-credentials
privileges: OWNER