Skip to content

Commit

Permalink
feat(generated-service): add volume mount option
Browse files Browse the repository at this point in the history
  • Loading branch information
levivannoort committed Aug 12, 2024
1 parent eb266be commit a6a6f61
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion generated-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: generated-service
description: A Helm chart for the generated-service component of Amplication

type: application
version: 2.0.10
version: 2.0.11
appVersion: "0.0.0"

sources:
Expand Down
15 changes: 15 additions & 0 deletions generated-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.volumes }}
volumeMounts:
{{- range .Values.volumes }}
- name: {{ .name }}-volume
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}
{{- if .Values.volumes }}
volumes:
{{- range .Values.volumes }}
- name: {{ .name }}-volume
persistentVolumeClaim:
claimName: {{ .name }}-pvc
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
11 changes: 11 additions & 0 deletions generated-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ resources:
requests: {}
limits: {}

## @param volumes Reference for the volumes that are to be attaches to the deployment - check the deployment.yaml for the added suffix
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
## Example:
## volumes:
## - name: data-service-generator-main
## mountPath: /build-artifacts
## - name: data-service-generator-dsg
## mountPath: /dsg-jobs
##
volumes: []

## Horizontal Pod Autoscaling configuration
## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/
## @param autoscaling.enabled Enable auto scaling (fallback to replicaCount if equals false)
Expand Down

0 comments on commit a6a6f61

Please sign in to comment.