diff --git a/app/server/chart/backend/templates/deployment.yaml b/app/server/chart/backend/templates/deployment.yaml index 7bede01c533b12d921a556971c2c3d6ab77805d9..c30a4ea0aacde65015b9224f7067bbf702d7ed84 100644 --- a/app/server/chart/backend/templates/deployment.yaml +++ b/app/server/chart/backend/templates/deployment.yaml @@ -34,28 +34,16 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - name: http - containerPort: {{ .Values.service.port }} + - name: primary + containerPort: {{ .Values.port }} protocol: TCP livenessProbe: httpGet: path: / - port: http + port: primary readinessProbe: httpGet: path: / - port: http + port: primary resources: {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/app/server/chart/backend/templates/persistent-volume.yaml b/app/server/chart/backend/templates/persistent-volume.yaml new file mode 100644 index 0000000000000000000000000000000000000000..01c69578962787fdc79da53bf01f577d1c057f9c --- /dev/null +++ b/app/server/chart/backend/templates/persistent-volume.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: 'pv-todos' +spec: + storageClass: {{ .Values.mongodb.persistence.storageClass }} + accessModes: + - ReadWriteOnce + capacity: + storage: 1Gi + hostPath: + path: '/data/{{ include "backend.fullname" . }}/' diff --git a/app/server/chart/backend/templates/pv-claim.yaml b/app/server/chart/backend/templates/pv-claim.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5cb616905780e9ae15d9baf162208e05bfdc59d9 --- /dev/null +++ b/app/server/chart/backend/templates/pv-claim.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: 'pvc-todos' +spec: + storageClass: {{ .Values.mongodb.persistence.storageClass }} + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi diff --git a/app/server/chart/backend/values.yaml b/app/server/chart/backend/values.yaml index 6f5ff4a4a8ef001f032c901039fc788d7603ed89..8b503d95df15c31c898851b6ff1f2b8872a68604 100644 --- a/app/server/chart/backend/values.yaml +++ b/app/server/chart/backend/values.yaml @@ -1,11 +1,11 @@ # Backend value definitions: -replicaCount: 1 - image: repository: backend #! change to container registry if possible pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "v0.0.2" +replicaCount: 1 +port: 3002 imagePullSecrets: [] nameOverride: "" @@ -65,23 +65,17 @@ autoscaling: targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 -nodeSelector: {} - -tolerations: [] - -affinity: {} - # Depedencies definition mongodb: fullnameOverride: 'mongodb' image: registry: 'docker.io' repository: 'bitnami/mongodb' - tag: '10.10.2' + tag: 'latest' service: port: 27017 # auth: # rootPassword: mongodb - # persistence: - # enabled: true - # existingClaim: 'pvc-db' + persistence: + enabled: true + existingClaim: 'pvc-todos'