Replace Planka with self-hosted WeKan

This commit is contained in:
funman300
2026-11-11 20:12:15 -07:00
parent 99fa25fbd4
commit 59ae43cc28
21 changed files with 146 additions and 263 deletions
+12
View File
@@ -0,0 +1,12 @@
# Retired Planka data
Planka has been replaced by WeKan. Before teardown, its database was checked and
contained no projects, boards, cards, or uploaded files—only the bootstrap user and
system records.
The old `planka-data` and `planka-postgres` PVCs are intentionally retained in the
`wedding-planner` namespace for rollback. They are not mounted by WeKan and are not
managed by an active Argo CD Application. The cluster's `local-path` StorageClass has
a `Delete` reclaim policy, so deleting either claim permanently removes its data.
After confirming WeKan is working and no rollback is needed, these claims can be
deleted manually.
+9
View File
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# These PVC definitions are intentionally not referenced by an Argo CD Application.
# They preserve the retired Planka volumes for rollback or later manual cleanup.
resources:
- namespace.yaml
- planka-data-pvc.yaml
- postgres-pvc.yaml
+13
View File
@@ -0,0 +1,13 @@
# Preserved from Planka. It contained no boards or uploaded files when retired.
# The local-path volume remains until this claim is explicitly deleted.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: planka-data
namespace: wedding-planner
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
@@ -1,4 +1,5 @@
# local-path has reclaimPolicy: Delete; deleting this PVC deletes the database.
# Preserved from Planka. The database contained only the initial admin account
# and no wedding boards/cards when the app was retired.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
-50
View File
@@ -1,50 +0,0 @@
# Wedding Planner
Private Planka Community `2.3.1` deployment for wedding planning.
## Access
- Web: `https://wedding.aleshym.co`
- Pi-hole local DNS: `wedding.aleshym.co A 10.10.0.100`
- Traefik IP allow-list: `10.10.40.0/24`; no public WAN route is intended.
The allow-list is enforced by Traefik in addition to keeping this host out of the
public catch-all route. Clients must reach Traefik with an address in the trusted
subnet. Do not publish a public DNS record for this hostname.
## Storage and database
- PostgreSQL 16, database `planka`, with its own 2Gi PVC.
- Attachments, avatars, and board backgrounds in `/app/data`, with a 10Gi PVC.
- Both PVCs use the cluster's `local-path` StorageClass (`Delete` reclaim policy).
Deleting either claim destroys its data; arrange backups before relying on this
for important wedding records.
- The app and database are single replicas. NetworkPolicies permit Traefik to reach
Planka and Planka to reach PostgreSQL; the database is not exposed through ingress.
## Credentials and bootstrap
The sealed secret contains the PostgreSQL password and Planka signing key. The initial
admin bootstrap settings have been removed after the account was created. Its random
password is stored in the local keyring; retrieve it with:
```bash
secret-tool lookup service planka server wedding.aleshym.co username weddingadmin
```
The initial account uses username `weddingadmin` and email
`wedding-admin@example.invalid`. On first sign-in, accept Planka's terms, then change
the initial password. Planka documents that keeping `DEFAULT_ADMIN_EMAIL` configured
prevents that account from being edited or deleted, so those bootstrap settings are
not retained in the deployment or sealed secret.
## GitOps
`argocd/planka.yaml` registers the application from `apps/planka` on `main`, with
automated sync and self-heal. The app uses an isolated `wedding-planner` namespace.
## References
- [Planka environment variables](https://docs.planka.cloud/docs/configuration/environment-variables)
- [Planka admin user bootstrap](https://docs.planka.cloud/docs/configuration/admin-user)
- [Planka backup guidance](https://docs.planka.cloud/docs/installation/docker/backup-and-restore)
-15
View File
@@ -1,15 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- planka-sealedsecret.yaml
- planka-data-pvc.yaml
- postgres-pvc.yaml
- postgres-deployment.yaml
- postgres-service.yaml
- planka-deployment.yaml
- planka-service.yaml
- planka-ingress.yaml
- lan-only.yaml
- network-policy.yaml
-42
View File
@@ -1,42 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: planka-ingress
namespace: wedding-planner
spec:
podSelector:
matchLabels:
app: planka
policyTypes:
- Ingress
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
app.kubernetes.io/name: traefik
ports:
- protocol: TCP
port: 1337
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: postgres-ingress
namespace: wedding-planner
spec:
podSelector:
matchLabels:
app: planka-postgres
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app: planka
ports:
- protocol: TCP
port: 5432
-15
View File
@@ -1,15 +0,0 @@
---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: planka-secret
namespace: wedding-planner
spec:
encryptedData:
DATABASE_URL: AgDifrETCfqn4aSeJl/5g2OHy+8a/pL+Jm39nU+290JY6jjAoPCLublRbDb6p4/oZZvqcbrE5nPrUjnMRPqz8PwPVppSdwf8u55mygrDF7MA6VuznJ4taw6VLhvTRf1Mck7RZxDsz35IFxq+7bnkvE6GlGFKjTnF0Bu7g6RpBUXTuPs0ifUN0I5SfxNu8B3Xb3C1KUPfN9ZAa9zWsnXwJfMWDfNxT1mnhIFiMYK4EiALiQ/Jo4sq628B0JEdkO686g0d/adL5vJeCmtpAxlrGIR0gaFeE1T+qhMHEwC8ZwzA/N5dRqEs5DTod9MMRWGk3VeQdF48MwVPvdtMvMksjfwaeF6VysaTGh6Rz19Ca6Sk1zWvUx03dAFtxWXRIt3ENI7YYa+5oq3o1QoP/fPSN/bN+GGK/0eyLYjrASF3+h5yXfUEdzUfLR83WumceA7Xw1G/krlTeithwfK6nZnK7F1LBZC5hLnR3w3fddP3DCD3n2fNgKDEhx2TsvFIc9iD8jnzHIXr7a4bCEoorMCyGJqt0exUlHIymoaGwGxpZWl3qRwCYBIB+wMtkT33l/eL/r84ewG5FIvex2MGqz82LMsf+dnaAx7smW9sdYaDHv0J7ZYP7TuV6szySyAcWaxXxq0/WPnjCbf+Ta6dXX66wybviw8mUSCy61kBCum0+snpLWfASzJ1T8FoLHA9ANfkO1AlVgI7QOzJRSfXgiJdcZS3ppVnL5BYZoLLXwb7VUMEkXNqdkil6CDNFRvBxlb4qofHkEQLdTFc4zbSz4ONw+5WV2K+kaUr2TLRsIO5eaOWD1BwoBx8BKvHGV7AogSqPaOUA9ZYSiUMGMmEQz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qjw9eC+TMN/wsx8xcN9aQu8twsVW+XV0huU4jpuhqkUenzCRPfl+WKqAn2tSGToF0NuFR8cTP1RNhTfWK+jWUGZ4Exr3hu/maFKkZmK6eBpr3tVDZELNZ/rfPkzxWWGqM7lTTpPqOxb6DoWwzKyXiA1i+0bwSbkXcWrVP5oVbLf9QVeWifP0JWjYRazXuOH69uX6TkRcc3b1/h1KvDjfl8IfCKei4BgDNdDbyb3KzbBPsE9pWtQL/uabicRZPcJiteXfxyYYmbqEyUKoapFapuMMuasHi62reBZBkbe7+96O+zxxleVeZtBT5DdR3q00sCJPmGuLrSMSQ5y0kySGmayqrJoxSvMFaLPaCOWzZjAVkuxLBaD1OWlzEHWLdY39cfxDHHggSj/BiyCM4m7RGLJu+Y5V2lb0o6WqPcc/m79qkvnB6DkXPl+KI2CRUOg9hymU/WiaOUFhnHstwVUOp5BHArFXALRtrbE8RWqHtdjoLxfQXU1gDmpfUaRtEqPrTS54jR3ON7y6PxVLIZ4XbjoNZfL4tXu/HL/iblUW9+3/KP9ovSM3WZYkLr/pxwRn+GYO3+rGVBFjHmBNoB3ltdKyteQUu71yJ0WiqNWkd5s4OGWA==
template:
metadata:
name: planka-secret
namespace: wedding-planner
-90
View File
@@ -1,90 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: planka-postgres
namespace: wedding-planner
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: planka-postgres
template:
metadata:
labels:
app: planka-postgres
spec:
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
containers:
- name: postgres
image: postgres:16-alpine
ports:
- name: postgres
containerPort: 5432
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
env:
- name: POSTGRES_DB
value: planka
- name: POSTGRES_USER
value: planka
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: planka-secret
key: POSTGRES_PASSWORD
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
volumeMounts:
- name: database
mountPath: /var/lib/postgresql/data
startupProbe:
exec:
command:
- pg_isready
- -U
- planka
- -d
- planka
failureThreshold: 30
periodSeconds: 5
readinessProbe:
exec:
command:
- pg_isready
- -U
- planka
- -d
- planka
periodSeconds: 10
livenessProbe:
exec:
command:
- pg_isready
- -U
- planka
- -d
- planka
periodSeconds: 20
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 1
memory: 1Gi
volumes:
- name: database
persistentVolumeClaim:
claimName: planka-postgres
-12
View File
@@ -1,12 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: planka-postgres
namespace: wedding-planner
spec:
selector:
app: planka-postgres
ports:
- name: postgres
port: 5432
targetPort: postgres
+36
View File
@@ -0,0 +1,36 @@
# Wedding Planner (WeKan)
WeKan `v13.06`, a free, MIT-licensed, self-hosted Trello-style board app.
## Access and privacy
- Web: `https://wedding.aleshym.co`
- Pi-hole local DNS: `wedding.aleshym.co A 10.10.0.100`
- Traefik IP allow-list: `10.10.40.0/24`; no public WAN route is intended.
The host should only exist in private DNS. The Traefik allow-list is an additional
boundary, and a NetworkPolicy permits ingress only from the Traefik pods.
## First account
On a fresh install, the first registered account becomes the administrator. Create
that account at the URL above, then use the Admin Panel to add your partner and
review whether public registration should remain enabled. No mail server is
configured, so account invitations/notifications that depend on email will not be
sent.
## Storage
WeKan uses its bundled FerretDB v1 with SQLite. Its database and uploads are stored
under `/data` on the `wekan-data` PVC (10Gi). The cluster's `local-path` StorageClass
has a `Delete` reclaim policy; deleting this PVC permanently deletes the WeKan data.
Keep independent backups for anything important.
The former Planka database was checked before replacement and contained no projects,
boards, cards, or uploaded files. Its two PVCs are retained separately for rollback;
see `apps/planka-archive/README.md`.
## GitOps
`argocd/wekan.yaml` registers the app from `apps/wekan` on `main`, with automated
sync and self-heal in the isolated `wedding-planner` namespace.
+11
View File
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- wekan-data-pvc.yaml
- wekan-deployment.yaml
- wekan-service.yaml
- wekan-ingress.yaml
- lan-only.yaml
- network-policy.yaml
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: wedding-planner
+22
View File
@@ -0,0 +1,22 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: wekan-ingress
namespace: wedding-planner
spec:
podSelector:
matchLabels:
app: wekan
policyTypes:
- Ingress
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
app.kubernetes.io/name: traefik
ports:
- protocol: TCP
port: 8080
@@ -1,9 +1,9 @@
# Planka stores avatars, backgrounds and task attachments under /app/data.
# local-path has reclaimPolicy: Delete; deleting this PVC deletes those files.
# Wekan stores its SQLite-backed database, attachments, and avatars under /data.
# local-path has reclaimPolicy: Delete; deleting this PVC deletes all Wekan data.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: planka-data
name: wekan-data
namespace: wedding-planner
spec:
accessModes:
@@ -1,63 +1,63 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: planka
name: wekan
namespace: wedding-planner
spec:
replicas: 1
# The attachment PVC is ReadWriteOnce; ensure upgrades never overlap pods.
# SQLite-backed FerretDB and uploads share one ReadWriteOnce claim.
strategy:
type: Recreate
selector:
matchLabels:
app: planka
app: wekan
template:
metadata:
labels:
app: planka
app: wekan
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
runAsUser: 999
runAsGroup: 999
fsGroup: 999
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
containers:
- name: planka
image: ghcr.io/plankanban/planka:2.3.1
- name: wekan
image: ghcr.io/wekan/wekan:v13.06
ports:
- name: http
containerPort: 1337
containerPort: 8080
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
env:
- name: BASE_URL
- name: ROOT_URL
value: https://wedding.aleshym.co
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: planka-secret
key: DATABASE_URL
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: planka-secret
key: SECRET_KEY
- name: TRUST_PROXY
- name: PORT
value: "8080"
- name: WEKAN_DB
value: ferretdb
- name: WRITABLE_PATH
value: /data
- name: WITH_API
value: "true"
- name: DDP_TRANSPORT
value: sockjs
- name: BROWSER_POLICY_ENABLED
value: "true"
volumeMounts:
- name: data
mountPath: /app/data
mountPath: /data
startupProbe:
httpGet:
path: /
port: http
failureThreshold: 60
failureThreshold: 90
periodSeconds: 10
timeoutSeconds: 5
readinessProbe:
@@ -74,12 +74,12 @@ spec:
timeoutSeconds: 5
resources:
requests:
cpu: 100m
memory: 256Mi
cpu: 200m
memory: 512Mi
limits:
cpu: 1
memory: 1Gi
volumes:
- name: data
persistentVolumeClaim:
claimName: planka-data
claimName: wekan-data
@@ -1,9 +1,8 @@
# Private wedding planner ingress. Pi-hole should resolve this host to 10.10.0.100;
# the LAN allow-list middleware also rejects clients outside 10.10.40.0/24.
# Private wedding planner ingress, restricted to the trusted LAN by middleware.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: planka
name: wekan
namespace: wedding-planner
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
@@ -19,7 +18,7 @@ spec:
pathType: Prefix
backend:
service:
name: planka
name: wekan
port:
name: http
tls:
@@ -1,11 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: planka
name: wekan
namespace: wedding-planner
spec:
selector:
app: planka
app: wekan
ports:
- name: http
port: 80
+2 -2
View File
@@ -1,14 +1,14 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: planka
name: wekan
namespace: argocd
spec:
project: default
source:
repoURL: https://git.aleshym.co/funman300/k3s-homelab.git
targetRevision: main
path: apps/planka
path: apps/wekan
destination:
server: https://kubernetes.default.svc
namespace: wedding-planner