diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 221d6ea..8b4379b 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -4,3 +4,7 @@ description: Development environment type: application version: 0.1.0 appVersion: "1.16.0" +dependencies: +- name: ingress-nginx + version: "4.8.3" + repository: "https://kubernetes.github.io/ingress-nginx" diff --git a/helm/templates/mongodb/deployment.yml b/helm/templates/mongodb/deployment.yml index 40e3908..66fc877 100644 --- a/helm/templates/mongodb/deployment.yml +++ b/helm/templates/mongodb/deployment.yml @@ -20,5 +20,11 @@ spec: cpu: {{ .Values.mongodb.resources.limits.cpu }} ports: - containerPort: {{ .Values.mongodb.port }} - + volumeMounts: + - mountPath: /data/db + name: {{ .Values.mongodb.label }} + volumes: + - name: {{ .Values.mongodb.label }} + persistentVolumeClaim: + claimName: {{ .Values.mongodb.label }} diff --git a/helm/templates/mongodb/persistent-volume-claim.yml b/helm/templates/mongodb/persistent-volume-claim.yml new file mode 100644 index 0000000..27dc4af --- /dev/null +++ b/helm/templates/mongodb/persistent-volume-claim.yml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Values.mongodb.label }} +spec: + resources: + requests: + storage: {{ .Values.mongodb.volume.capacity }} + volumeMode: Filesystem + accessModes: + - ReadWriteOnce \ No newline at end of file diff --git a/helm/templates/mongodb/persistent-volume.yml b/helm/templates/mongodb/persistent-volume.yml new file mode 100644 index 0000000..9c6212e --- /dev/null +++ b/helm/templates/mongodb/persistent-volume.yml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ .Values.mongodb.label }} +spec: + capacity: + storage: {{ .Values.mongodb.volume.capacity }} + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: /data/{{ .Values.mongodb.label }} + type: "" \ No newline at end of file diff --git a/helm/values.yaml b/helm/values.yaml index 7bc9e41..8b266bd 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -7,8 +7,10 @@ mongodb: tag: latest resources: limits: - memory: "128Mi" + memory: "512Mi" cpu: "500m" + volume: + capacity: 1000Mi kafka: label: kafka