Hello, during starting localstack pod in helm I have some problems with add secrets to secret menager through init.sh script.
values.yaml:
image:
repository: localstack/localstack
tag: "2.3.2"
pullPolicy: IfNotPresent
enableInitFiles: true
init.sh
#!/bin/bash
alias awslocal="aws --endpoint-url http://host.docker.internal:4566 --profile localstack"
awslocal secretsmanager create-secret --name test-secret --secret-string '{ "user": "test", "password": "test" }'
init.sh is set as executable:
-rwxr-xr-x 1 macbus macbus 11645 Oct 4 12:07 init.sh*
Error from localstack logs:
Could not connect to the endpoint URL: "http://host.docker.internal:4566/"
2023-10-23T08:29:43.609 ERROR --- [ MainThread] localstack.runtime.init : Error while running script Script(path='/etc/localstack/init/ready.d/init.sh', stage=READY, state=ERROR)
Traceback (most recent call last):
File "/opt/code/localstack/localstack/runtime/init.py", line 136, in run_stage
runner.run(script.path)
File "/opt/code/localstack/localstack/runtime/init.py", line 71, in run
raise OSError("Script %s returned a non-zero exit code %s" % (path, exit_code))
OSError: Script /etc/localstack/init/ready.d/init.sh returned a non-zero exit code 255
What is interesting, when I change tag from 2.3.2 to latest (ver. 2.3.3.dev) script work correctly. I also checked versions 2.2.0, 2.3.0, but only 2.3.3.dev is working