Skip to content

Commit

Permalink
add PVCs for castopod
Browse files Browse the repository at this point in the history
  • Loading branch information
tonygilkerson committed Jan 14, 2024
1 parent 19e23d8 commit 214da52
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
10 changes: 9 additions & 1 deletion apps/castopod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To install or upgrade the mariadb charts, first edit the version number in `exte
make externalCharts chart=mariadb

# Deploy
helmfile -f env/weeble/helmfile.yaml -l app=castopod apply --skip-deps
helmfile -f env/weeble/helmfile.yaml -l app=castopod sync --skip-deps
```

## Castopod Setup
Expand All @@ -23,3 +23,11 @@ password: ****
```
Then you can go to `https://castopod.tonygilkerson.us/cp-admin`

## Storage

The two PVC created by this app are used for storing the castopod media and db stuff. If you want to delete then reinstall and still retain the data then you will need to edit the PVs and set the reclaim policy to `Retain`

```sh
kubectl patch pv <your-pv-name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
```
8 changes: 8 additions & 0 deletions apps/castopod/charts/castopod/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ spec:
labels:
app: castopod
spec:
volumes:
- name: media
persistentVolumeClaim:
claimName: castopod-media
containers:
- image: castopod/castopod:latest
name: castopod
volumeMounts:
- mountPath: /var/www/castopod/public/media
name: media
ports:
- containerPort: 8000
resources: {}
Expand Down Expand Up @@ -49,3 +56,4 @@ spec:
secretKeyRef:
name: castopod
key: cpPassword

23 changes: 23 additions & 0 deletions apps/castopod/charts/castopod/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: castopod-media
spec:
storageClassName: microk8s-hostpath
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: castopod-db
spec:
storageClassName: microk8s-hostpath
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
7 changes: 6 additions & 1 deletion apps/castopod/values/mariadb.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ initResources:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
memory: 128Mi

## Storage parameters
storage:
## Set persistentVolumenClaimName to reference an existing PVC
persistentVolumeClaimName: castopod-db

0 comments on commit 214da52

Please sign in to comment.