Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add volume claim to mongodb deployment #4135

Merged
merged 1 commit into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker/kubernetes/kustomize/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- mongodb-volume.yaml
- mongodb-deployment.yaml
- mongodb-service.yaml
- api-deployment.yaml
Expand All @@ -18,6 +19,7 @@ resources:
- ws-service.yaml
- worker-deployment.yaml
- worker-service.yaml


# namespace
# Adds namespace to all resources.
Expand Down
7 changes: 7 additions & 0 deletions docker/kubernetes/kustomize/mongodb-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ spec:
name: mongodb
ports:
- containerPort: 27017
volumeMounts:
- name: "mongodb-persistent-storage"
mountPath: "/data/db"
volumes:
- name: "mongodb-persistent-storage"
persistentVolumeClaim:
claimName: "novu-mongodb-pvc"
12 changes: 12 additions & 0 deletions docker/kubernetes/kustomize/mongodb-volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: novu-mongodb-pvc
spec:
resources:
requests:
storage: 5Gi
volumeMode: Filesystem
storageClassName: local-storage
accessModes:
- ReadWriteOnce