Skip to content

Commit

Permalink
support /docker-entrypoint-initaws.d mount point to run init shell sc…
Browse files Browse the repository at this point in the history
…ripts (#24)
  • Loading branch information
ttj4 authored Jun 29, 2021
1 parent 8aa3cde commit 8f7fc53
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/localstack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ annotations:
category: Infrastructure
apiVersion: v2
appVersion: latest
version: 0.2.0
version: 0.2.1
name: localstack
description: A fully functional local AWS cloud stack
type: application
Expand Down
1 change: 1 addition & 0 deletions charts/localstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The following table lists the configurable parameters of the Localstack chart an
| `lambdaExecutor` | Specify Method to use for executing Lambda functions (partially supported) | `docker` |
| `dataDir` | Specify directory for saving persistent data (Not supported yet) | `nil` (Localstack Default) |
| `extraEnvVars` | Extra environment variables to be set on Localstack primary containers | `nil` (Localstack Default) |
| `enableStartupScripts` | Mount `/docker-entrypoint-initaws.d` to run startup scripts with `{{ template "localstack.fullname" . }}-init-scripts-config` configMap | `nil` (Localstack Default) |

### Deployment parameters

Expand Down
10 changes: 10 additions & 0 deletions charts/localstack/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ spec:
- name: dind-tls
mountPath: /opt/docker/tls
{{- end }}
{{- if .Values.enableStartupScripts }}
volumeMounts:
- name: {{ template "localstack.fullname" . }}-init-scripts-config
mountPath: /docker-entrypoint-initaws.d
{{- end }}
env:
- name: DEBUG
value: {{ ternary "1" "0" .Values.debug | quote }}
Expand Down Expand Up @@ -134,3 +139,8 @@ spec:
emptyDir: {}
{{- end }}
{{- end }}
{{- if .Values.enableStartupScripts }}
- name: {{ template "localstack.fullname" . }}-init-scripts-config
configMap:

This comment has been minimized.

Copy link
@joebowbeer

joebowbeer Apr 27, 2023

Contributor
        configMap:
          defaultMode: 0755

@ttj4 @alexrashed Needs defaultMode: 0500 or defaultMode: 0755 for executable .sh files?

This comment has been minimized.

Copy link
@alexrashed

alexrashed Apr 27, 2023

Member

Hi @joebowbeer!
We already added this to the list of TODOs for the v2 PR following your comment two days ago (#81 (comment)).
If you feel this should be prioritized, please feel free to file a PR with your suggested (tested) changes.
Thanks!

This comment has been minimized.

Copy link
@joebowbeer

joebowbeer Apr 27, 2023

Contributor

@alexrashed Thanks for confirming!

name: {{ template "localstack.fullname" . }}-init-scripts-config
{{- end }}

0 comments on commit 8f7fc53

Please sign in to comment.