Skip to content
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
6 changes: 6 additions & 0 deletions deploy/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ spec:
- name: ca-cert
mountPath: "/appsmith-stacks/ca-certs"
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
env:
{{- if .Values.HTTPContainerPort }}
- name: PORT
Expand Down Expand Up @@ -182,6 +185,9 @@ spec:
path: {{ $key }}.crt
{{- end }}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if not .Values.persistence.enabled }}
- name: data
emptyDir: {}
Expand Down
55 changes: 55 additions & 0 deletions deploy/helm/tests/extra_volumes_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
templates:
- deployment.yaml
tests:
- name: extra volumes should be mounted in deployment
set:
workload:
kind: Deployment
extraVolumes:
- name: extra-volume
emptyDir: {}
extraVolumeMounts:
- name: extra-volume
mountPath: /appsmith-extra
readOnly: true
asserts:
- equal:
path: kind
value: Deployment
- contains:
path: spec.template.spec.volumes
content:
name: extra-volume
emptyDir: {}
- contains:
path: spec.template.spec.containers[?(@.name == "appsmith")].volumeMounts
content:
name: extra-volume
mountPath: /appsmith-extra
readOnly: true
- name: extra volumes should be mounted in statefulset
set:
workload:
kind: StatefulSet
extraVolumes:
- name: extra-volume
emptyDir: {}
extraVolumeMounts:
- name: extra-volume
mountPath: /appsmith-extra
readOnly: true
asserts:
- equal:
path: kind
value: StatefulSet
- contains:
path: spec.template.spec.volumes
content:
name: extra-volume
emptyDir: {}
- contains:
path: spec.template.spec.containers[?(@.name == "appsmith")].volumeMounts
content:
name: extra-volume
mountPath: /appsmith-extra
readOnly: true
8 changes: 8 additions & 0 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

## @param extraVolumes Additional volumes to add to the pod
##
extraVolumes: []

## @param extraVolumeMounts Additional volume mounts to add to the appsmith container
##
extraVolumeMounts: []

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just validating my understanding here. Initially, these values are empty. For our case especially for prod they should be populated from the prod values.yaml in the cloud-deployment repo. Is that correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup you got it, the default is not set / empty but this allows it to be configurable.


service:
## @param service.type Kubernetes Service type
##
Expand Down