Giter Club home page Giter Club logo

helm-charts's Introduction

⚡ We are thrilled to announce the release of LocalStack 3.6

LocalStack - A fully functional local cloud stack

CircleCI Coverage Status PyPI Version Docker Pulls PyPi downloads Backers on Open Collective Sponsors on Open Collective PyPI License Code style: black Ruff Twitter

LocalStack is a cloud software development framework to develop and test your AWS applications locally.

OverviewInstallQuickstartRunUsageReleasesContributing
📖 Docs💻 Pro version☑️ LocalStack coverage


Overview

LocalStack is a cloud service emulator that runs in a single container on your laptop or in your CI environment. With LocalStack, you can run your AWS applications or Lambdas entirely on your local machine without connecting to a remote cloud provider! Whether you are testing complex CDK applications or Terraform configurations, or just beginning to learn about AWS services, LocalStack helps speed up and simplify your testing and development workflow.

LocalStack supports a growing number of AWS services, like AWS Lambda, S3, Dynamodb, Kinesis, SQS, SNS, and many more! The Pro version of LocalStack supports additional APIs and advanced features. You can find a comprehensive list of supported APIs on our ☑️ Feature Coverage page.

LocalStack also provides additional features to make your life as a cloud developer easier! Check out LocalStack's User Guides for more information.

Install

The quickest way get started with LocalStack is by using the LocalStack CLI. It enables you to start and manage the LocalStack Docker container directly through your command line. Ensure that your machine has a functional docker environment installed before proceeding.

Brew (macOS or Linux with Homebrew)

Install the LocalStack CLI through our official LocalStack Brew Tap:

brew install localstack/tap/localstack-cli

Binary download (MacOS, Linux, Windows)

If Brew is not installed on your machine, you can download the pre-built LocalStack CLI binary directly:

  • Visit localstack/localstack-cli and download the latest release for your platform.
  • Extract the downloaded archive to a directory included in your PATH variable:
    • For MacOS/Linux, use the command: sudo tar xvzf ~/Downloads/localstack-cli-*-darwin-*-onefile.tar.gz -C /usr/local/bin

PyPI (MacOS, Linux, Windows)

LocalStack is developed using Python. To install the LocalStack CLI using pip, run the following command:

python3 -m pip install localstack

The localstack-cli installation enables you to run the Docker image containing the LocalStack runtime. To interact with the local AWS services, you need to install the awslocal CLI separately. For installation guidelines, refer to the awslocal documentation.

Important: Do not use sudo or run as root user. LocalStack must be installed and started entirely under a local non-root user. If you have problems with permissions in macOS High Sierra, install with pip install --user localstack

Quickstart

Start LocalStack inside a Docker container by running:

 % localstack start -d

     __                     _______ __             __
    / /   ____  _________ _/ / ___// /_____ ______/ /__
   / /   / __ \/ ___/ __ `/ /\__ \/ __/ __ `/ ___/ //_/
  / /___/ /_/ / /__/ /_/ / /___/ / /_/ /_/ / /__/ ,<
 /_____/\____/\___/\__,_/_//____/\__/\__,_/\___/_/|_|

 💻 LocalStack CLI 3.6.0
 👤 Profile: default

[12:47:13] starting LocalStack in Docker mode 🐳                       localstack.py:494
           preparing environment                                       bootstrap.py:1240
           configuring container                                       bootstrap.py:1248
           starting container                                          bootstrap.py:1258
[12:47:15] detaching                                                   bootstrap.py:1262

You can query the status of respective services on LocalStack by running:

% localstack status services
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Service                  ┃ Status      ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ acm                      │ ✔ available │
│ apigateway               │ ✔ available │
│ cloudformation           │ ✔ available │
│ cloudwatch               │ ✔ available │
│ config                   │ ✔ available │
│ dynamodb                 │ ✔ available │
...

To use SQS, a fully managed distributed message queuing service, on LocalStack, run:

% awslocal sqs create-queue --queue-name sample-queue
{
    "QueueUrl": "http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/sample-queue"
}

Learn more about LocalStack AWS services and using them with LocalStack's awslocal CLI.

Running

You can run LocalStack through the following options:

Usage

To start using LocalStack, check out our documentation.

To use LocalStack with a graphical user interface, you can use the following UI clients:

Releases

Please refer to GitHub releases to see the complete list of changes for each release. For extended release notes, please refer to the LocalStack Discuss.

Contributing

If you are interested in contributing to LocalStack:

We are thankful for all the contributions and feedback we receive.

Get in touch

Get in touch with the LocalStack Team to report 🐞 issues, upvote 👍 feature requests, 🙋🏽 ask support questions, or 🗣️ discuss local cloud development:

Contributors

We are thankful to all the people who have contributed to this project.

Backers

We are also grateful to all our backers who have donated to the project. You can become a backer on Open Collective.

Sponsors

You can also support this project by becoming a sponsor on Open Collective. Your logo will show up here along with a link to your website.

License

Copyright (c) 2017-2024 LocalStack maintainers and contributors.

Copyright (c) 2016 Atlassian and others.

This version of LocalStack is released under the Apache License, Version 2.0 (see LICENSE). By downloading and using this software you agree to the End-User License Agreement (EULA).

helm-charts's People

Contributors

alexrashed avatar barrymars avatar bravecobra avatar cabeaulac avatar dependabot[bot] avatar dfangl avatar dittos avatar dntosas avatar jesusfcr avatar joebowbeer avatar josephglanville avatar kristapsstrals avatar laikan57 avatar macnev2013 avatar mforutan avatar miaucl avatar mproffitt avatar mttcnnff avatar nhomble avatar nivintw avatar pguglev avatar pstetsuk-exadel avatar simonrw avatar someshkoli avatar strrl avatar tomrusiecki avatar tsingla1998 avatar ttj4 avatar whummer avatar yahel2410 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

helm-charts's Issues

How to create localstack aws resources like a S3 bucket or SM secret?

I do something like this in docker compose if I want to create a s3 bucket during start up

version: '3.8'
services:
  localstack:
    image: localstack/localstack
    environment:
      - SERVICES=s3
    ports:
      - "4566:4566"
    volumes:
      - ./aws:/docker-entrypoint-initaws.d

and I have the following script in the aws local directory

#!/bin/bash
set -x
awslocal s3 mb s3://bucket
set +x

Can someone help me to achieve something similar using helm chart?

Unable to launch with default settings

Trying to launch the latest and several prior versions of the chart and getting the below:

2022-10-31T20:15:56.048 DEBUG --- [ MainThread] stevedore.extension : found extension EntryPoint(name='transfer:pro', value='localstack_ext.providers:transfer', group='localstack.aws.provider') 2022-10-31T20:15:56.048 DEBUG --- [ MainThread] stevedore.extension : found extension EntryPoint(name='xray:pro', value='localstack_ext.providers:xray', group='localstack.aws.provider') 2022-10-31T20:15:56.049 DEBUG --- [ MainThread] localstack.services.infra : [shutdown] Cleaning up resources ... 2022-10-31T20:15:56.050 DEBUG --- [ MainThread] localstack.utils.threads : [shutdown] Done cleaning up threads / processes / tasks 2022-10-31T20:15:56.050 DEBUG --- [ MainThread] localstack.utils.run : Executing command: rm -rf "/var/lib/localstack/tmp" 2022-10-31T20:15:56.058 DEBUG --- [ MainThread] localstack.services.infra : [shutdown] Force shutdown, not waiting for infrastructure to shut down Traceback (most recent call last): File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/opt/code/localstack/localstack/cli/main.py", line 10, in <module> main() File "/opt/code/localstack/localstack/cli/main.py", line 6, in main cli() File "/opt/code/localstack/localstack/cli/plugin.py", line 15, in __call__ self.group(*args, **kwargs) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/opt/code/localstack/localstack/utils/analytics/cli.py", line 66, in publisher_wrapper return fn(*args, **kwargs) File "/opt/code/localstack/localstack/cli/localstack.py", line 148, in cmd_start bootstrap.start_infra_locally() File "/opt/code/localstack/localstack/utils/bootstrap.py", line 260, in start_infra_locally return infra.start_infra() File "/opt/code/localstack/localstack/services/infra.py", line 435, in start_infra raise e File "/opt/code/localstack/localstack/services/infra.py", line 421, in start_infra thread = do_start_infra(asynchronous, apis, is_in_docker) File "/opt/code/localstack/localstack/services/infra.py", line 520, in do_start_infra thread = start_runtime_components() File "/opt/code/localstack/localstack/utils/bootstrap.py", line 77, in wrapped return f(*args, **kwargs) File "/opt/code/localstack/localstack/services/infra.py", line 512, in start_runtime_components raise TimeoutError( TimeoutError: gave up waiting for edge server on 0.0.0.0:4566 2022-10-31 20:15:57,369 INFO exited: infra (exit status 1; not expected)

These are the only parameters that have been set based on other reported issues:
set { name = "livenessProbe.periodSeconds" value = "65" } set { name = "debug" value = "true" }

startupScriptContent does not seem to run when installing helm chart

I'm trying to install Localstack along side a custom application using Helm. A part of my deployment is making sure an S3 bucket exists in LocalStack ahead of time. I thought startupScriptContent would have been the correct parameter to use but it seems as if that script is never executed. The bucket is not created, and I don't see any logs indicating the script encountered an error or even tried to run.

I don't think having the Localstack chart as a subchart would really effect this but I figured it's worth mentioning my setup.

Here is the directory structure.

charts/
    myapp.0.1.0.tgz
   localstack-0.6.5.tgz
Chart.yaml
values.yaml

The contents of Chart.yaml

apiVersion: v2
description: a custom app deployed alongside localstack
engine: gotpl
name: my-custom-app
version: 0.1.2
dependencies:
- name: my-custom-service
  alias: myapp
  version: 0.1.0
  repository: file://charts/myapp
- name: localstack
  alias: s3
  version: 0.6.5
  repository: https://localstack.github.io/helm-charts

The contents of my values.yaml file

localstack:
  startServices: s3
  enableStartupScripts: true
  startupScriptContent: |
    !#/bin/sh
    awslocal s3 mb s3://hl-modelscan

When I run helm install myapp . everything deploys w/o and error but the bucket is not there.

Here's a sample of the logs for the localstack pod just after deloyment.

LocalStack version: 3.0.1.dev
LocalStack build date: 2023-11-17
LocalStack build git hash: 32a7946f

2023-11-19T18:58:05.994  INFO --- [-functhread4] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2023-11-19T18:58:05.994  INFO --- [-functhread4] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2023-11-19T18:58:06.028  INFO --- [  MainThread] localstack.utils.bootstrap : Execution of "start_runtime_components" took 603.21ms
Ready.
2023-11-19T18:58:54.093  INFO --- [   asgi_gw_1] localstack.request.aws     : AWS s3.ListBuckets => 200

If there's any other information I need to provide please let me know and I'm happy to do so.

/docker-entrypoint-initaws.d scripts does not appear to be running

Im having a hard time trying to track down why the startup script content is not being executed on startup.

Im passing the following values to the helm chart install:

enableStartupScripts: true
startupScriptContent: |
  awslocal sqs create-queue --queue-name my-queue

From what i can tell, the config map is created:

# kubectl describe configmap myapp-localstack-init-scripts-config 
Name:         myapp-localstack-init-scripts-config
Namespace:    default
Labels:       app.kubernetes.io/instance=myapp-localstack
              app.kubernetes.io/managed-by=Helm
              app.kubernetes.io/name=localstack
              app.kubernetes.io/version=latest
              helm.sh/chart=localstack-0.5.5
Annotations:  meta.helm.sh/release-name: myapp-localstack
              meta.helm.sh/release-namespace: default

Data
====
myapp-localstack-init-scripts-config.sh:
----
awslocal sqs create-queue --queue-name my-queue


BinaryData
====

Events:  <none>

I even confirm the script is being mounted in the pod:

kubectl exec -it deployment/myapp-localstack -- bash

localstack@myapp-localstack-77486c75fc-cbn28:/opt/code/localstack$ cd /docker-entrypoint-initaws.d/
localstack@myapp-localstack-77486c75fc-cbn28:/docker-entrypoint-initaws.d$ ls -lah



total 12K
drwxrwxrwx 3 root root 4.0K Mar 28 00:43 .
drwxr-xr-x 1 root root 4.0K Mar 28 00:50 ..
drwxr-xr-x 2 root root 4.0K Mar 28 00:43 ..2023_03_28_00_43_55.1670092728
lrwxrwxrwx 1 root root   32 Mar 28 00:43 ..data -> ..2023_03_28_00_43_55.1670092728
lrwxrwxrwx 1 root root   56 Mar 28 00:43 myapp-localstack-init-scripts-config.sh -> ..data/myapp-localstack-init-scripts-config.


The script appears to be present and it seems to be detected to some degree as i get this warning:

============================================================================
  It seems you are using an init script in /docker-entrypoint-initaws.d.
  The INIT_SCRIPTS_PATH have been deprecated with v1.1.0 and will be removed in future releases
  of LocalStack. Please use /etc/localstack/init/ready.d instead.
  You can suppress this warning by setting LEGACY_INIT_DIR=1.

  See: https://github.com/localstack/localstack/issues/7257
============================================================================

Its just not executed on startup for some reason?

I have a another pod in the cluster that runs code that references the queue and its throwing "Queue doesnt exist" exception, when i run the awslocal create-queue command manually, it starts to work. Im unclear if im missing something or if this is a bug.

Using the latest version of these helm charts and 1.4 localstack.

Error in the generate template - ContainerPort

Type of request: This is a ...

[X] bug report
[ ] feature request

Detailed description

The generate yaml using helm template localstack/localstack has a error in Deployment.spec.template.spec.containers[0].ports[0]. In Port session, has a "container" token but suppose to be "containerPort".
...

Expected behavior

Helm package installed ..
...

Actual behavior

Helm release localstack not installed. Installing...
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(Deployment.spec.template.spec.containers[0].ports[0]): unknown field "container" in io.k8s.api.core.v1.ContainerPort, ValidationError(Deployment.spec.template.spec.containers[0].ports[0]): missing required field "containerPort" in io.k8s.api.core.v1.ContainerPort]

...

Steps to reproduce

helm repo add localstack https://localstack.github.io/helm-charts
helm repo update
skaffold run

Command used to start LocalStack

skaffold run
...

Helm Chart Version

NAME: localstack/localstack
CHART VERSION: 0.1.3
APP VERSION: latest (v0.12.7)

Helm chart failing when namespace is purely numeric

Hello folks. I stumbled upon a strange error when installing localstack via helm. Here is the error:
Error: unable to build kubernetes objects from release manifest: [unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Namespace: ReadString: expects " or n, but found 4, error found in #10 byte of ...|mespace":4444412}}|..., bigger context ...|0.4.1"},"name":"localstack-mod-test","namespace":4444412}}|..., unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Namespace: ReadString: expects " or n, but found 4, error found in #10 byte of ...|mespace":4444412},"s|..., bigger context ...|0.4.1"},"name":"localstack-mod-test","namespace":4444412},"spec":{"externalTrafficPolicy":null,"port|..., unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Namespace: ReadString: expects " or n, but found 4, error found in #10 byte of ...|mespace":4444412},"s|..., bigger context ...|0.4.1"},"name":"localstack-mod-test","namespace":4444412},"spec":{"replicas":1,"selector":{"matchLab|...]

The following modification at all places, where Namespace is referenced, seems to fix the issue:
{{ .Release.Namespace | quote }}

So, whenever we reference the Namespace, we use the "| quote" thing.
Would this be a good fix for the issue? Is there any other way to circumvent the problem?

Unable to bring up services when Local Stack API Key provided

It appears that after adding the Local Stack API Key, the container is trying to download some data from a CDN..this seems to fail in our environment as its trying to reach the CDN via IPv6 which isn't allowed/configured. I was looking for a way to add an extra volume mount to add a sysctl.conf update to disable ipv6. Looks like the Helm chart doesn't currently support this. I can of course fork and modify it (and will do so) but creating an issue for it in advance.

* Immediate connect fail for 2606:4700::6810:5714: Cannot assign requested address
*   Trying 2606:4700::6810:5814...
* TCP_NODELAY set
* Expire in 84742 ms for 3 (transfer 0x55fa852f10f0)
* Immediate connect fail for 2606:4700::6810:5814: Cannot assign requested address
*   Trying 2606:4700::6810:5914...
* TCP_NODELAY set
* Expire in 84742 ms for 3 (transfer 0x55fa852f10f0)
* Immediate connect fail for 2606:4700::6810:5914: Cannot assign requested address
*   Trying 2606:4700::6810:5514...
* TCP_NODELAY set
* Expire in 84742 ms for 3 (transfer 0x55fa852f10f0)
* Immediate connect fail for 2606:4700::6810:5514: Cannot assign requested address
*   Trying 2606:4700::6810:5614...
* TCP_NODELAY set
* Expire in 84742 ms for 3 (transfer 0x55fa852f10f0)
* Immediate connect fail for 2606:4700::6810:5614: Cannot assign requested address
*   Trying 2606:4700::6810:5714...
* TCP_NODELAY set
* Expire in 84742 ms for 3 (transfer 0x55fa852f10f0)
* Immediate connect fail for 2606:4700::6810:5714: Cannot assign requested address
*   Trying 2606:4700::6810:5814...
* TCP_NODELAY set
* Expire in 84742 ms for 3 (transfer 0x55fa852f10f0) 

Add namespace to resource metadata

It would be nice to have the namespace variable in all appropriate resources metadata, so that it is there when rendering out templates to disk for use by other tools

will submit a pull request for this shortly

Feature Request: Ability to reference a secret for localstack api key

The documentation states that in order to pass the LOCALSTACK_API_KEY environment variable to the deployment, it should be done with extraEnvVars e.g.

  - name: LOCALSTACK_API_KEY
    value: "<your api key>"

Preferably, we'd like to avoid committing the key to a values.yaml file because the value would be in plain text. Ideally, we'd like to be able to pull the value out of a Kubernetes secret that may be defined by a parent chart or perhaps by IaC.

For example,

envFromSecret:
     - name: LOCALSTACK_API_KEY
       secret: localstack-secrets
       key: apiKey

where localstack-secrets may be defined like:

apiVersion: v1
kind: Secret
type: Opaque
data:
  apiKey: hello!
metadata:
  name: localstack-secrets

0.4.2: Startup Script failing due to "Could not connect to the endpoint URL"

Helm Chart version 0.4.2

Startup Script was working last week - now suddenly is not.
Could be something silly I am doing.

Following along with this suggestion for S3 bucket creation

# awslocal s3 mb s3://testbucket

Deployed via binnacle as follows

    namespace: cogito
    release: localstack
    repo: localstack
    state: present
    version: 0.4.2
    values:
      enableStartupScripts: true
      startupScriptContent: "awslocal s3 mb s3://testbucket"
      resources:
        limits:
          memory: 128Mi
        requests:
          cpu: 100m
          memory: 128Mi
      services:
        localstack:
          image: localstack/localstack
          environment:
            - SERVICES=s3
          ports:
            - "4566:4566"
          volumes:
            - /docker-entrypoint-initaws.d

Logs

Waiting for all LocalStack services to be ready
2022-09-26 19:11:53,309 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2022-09-26 19:11:53,311 INFO supervisord started with pid 16
2022-09-26 19:11:54,313 INFO spawned: 'infra' with pid 21
2022-09-26 19:11:55,315 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

LocalStack version: 1.1.1.dev
LocalStack build date: 2022-09-26
LocalStack build git hash: 68c507ed

2022-09-26T19:11:57.986  INFO --- [  MainThread] localstack.utils.bootstrap : Execution of "prepare_installation" took 585.35ms
2022-09-26T19:11:58.996  WARN --- [  Thread-112] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2022-09-26T19:11:58.996  WARN --- [  Thread-112] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2022-09-26T19:11:58.998  INFO --- [  Thread-112] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2022-09-26T19:11:58.998  INFO --- [  Thread-112] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2022-09-26T19:11:59.052  INFO --- [  MainThread] localstack.utils.bootstrap : Execution of "start_runtime_components" took 1065.70ms
Ready.
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initaws.d/localstack-init-scripts-config.sh
2022-09-26 19:12:00,515 INFO exited: infra (terminated by SIGKILL; not expected)
2022-09-26 19:12:01,522 INFO spawned: 'infra' with pid 149
2022-09-26 19:12:02,525 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

LocalStack version: 1.1.1.dev
LocalStack build date: 2022-09-26
LocalStack build git hash: 68c507ed

2022-09-26 19:12:03,701 INFO exited: infra (terminated by SIGKILL; not expected)
2022-09-26 19:12:04,722 INFO spawned: 'infra' with pid 219
2022-09-26 19:12:05,725 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

LocalStack version: 1.1.1.dev
LocalStack build date: 2022-09-26
LocalStack build git hash: 68c507ed

2022-09-26 19:12:06,389 INFO exited: infra (terminated by SIGKILL; not expected)
make_bucket failed: s3://testbucket Could not connect to the endpoint URL: "http://localhost:4566/testbucket"
2022-09-26 19:12:07,390 INFO spawned: 'infra' with pid 302
2022-09-26 19:12:08,392 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

LocalStack version: 1.1.1.dev
LocalStack build date: 2022-09-26
LocalStack build git hash: 68c507ed

2022-09-26T19:12:09.416  WARN --- [  Thread-110] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2022-09-26T19:12:09.416  WARN --- [  Thread-110] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2022-09-26T19:12:09.419  INFO --- [  Thread-110] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2022-09-26T19:12:09.419  INFO --- [  Thread-110] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
Ready.
2022-09-26T19:13:04.771  INFO --- [  Thread-127] l.services.motoserver      : starting moto server on http://0.0.0.0:50151
2022-09-26T19:13:04.772  INFO --- [   asgi_gw_0] localstack.services.infra  : Starting mock S3 service on http port 4566 ...
2022-09-26T19:13:05.086  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS s3.PutObject => 404 (NoSuchBucket)

Service looks OK

$ kubectl get service | grep "NAME\|localstack"
NAME                             TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                               AGE
localstack                       NodePort       10.104.87.97     <none>        4566:31566/TCP,4571:31571/TCP         7m22s

Persistent volume mount directory needs to be updated for localstack v1.0.0

The localstack v1.0.0 release included a change to the directory where persistent data was stored from /tmp/localstack to /var/lib/localstack. However the deployment.yml was not updated to reflect this change:

Thus if the helm chart is used with localstack >= v1.0.0, the chart will fail deploy with the following error reported in the pod's logs:

ERROR
============================================================================
  It seems you are mounting the LocalStack volume into /tmp/localstack.
  This will break the LocalStack container! Please update your volume mount
  destination to /var/lib/localstack.
  You can suppress this error by setting LEGACY_DIRECTORIES=1.

  See: https://github.com/localstack/localstack/issues/6398
============================================================================

This can be tested by:

  • enabling persistence: --set persistence.enabled=true
  • to cause the error:
    • setting image.tag to latest or a version >= 1.0.0: `--set image.tag="1.2.0"
  • to deploy successfully:
    • setting image.tag to a a version < 1.0.0: --set image.tag="0.14.5"

If persistence is set to false (the default value), then any version of localstack will deploy successfully.

`startServices` values doc is not the same as the README one

The startServices at values file says,

Comma-separated list of AWS CLI service names which should be loaded right when starting LocalStack. Per default, all services are loaded and started on the first request for that service.

But on the README.md the line is,

Comma-separated list of AWS CLI service names which should be loaded right when starting LocalStack. If not set, each service is loaded and started on the first request for that service.

I think that README.md is more clear and should be used also in the values file.

enableStartupScripts not mounting /docker-entrypoint-initaws.d

When using enableStartupScripts, it's impossible to mount /docker-entrypoint-initaws.d due to the following line:

{{- if coalesce (and (.Values.mountDind.enabled) (.Values.mountDind.forceTLS)) .Values.persistence.enabled .Values.persistence.enabled }}

The conditional should be updated to account for enableStartupScripts independently from the other configuration options.

Ingress using the wrong api

I am trying to set up the localstack s3 service with an ingress. On a clean installation, I run into following problem:

(v0.2.3)

helm install localstack-test localstack-charts/localstack --set startServices=s3 --set ingress.enabled=true
>> Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "networking.k8s.io/v1beta1"

(v0.3.0)

helm install localstack-test localstack-charts/localstack --set startServices=s3 --set ingress.enabled=true
>> Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "networking.k8s.io/v1"

I have seen that @kristapsstrals on PR #26 update the ingress, but I tested it for both version v0.3.0 and v0.2.3 which failed.

BTW:

I am running on

kubectl version
>> Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.1", GitCommit:"632ed300f2c34f6d6d15ca4cef3d3c7073412212", GitTreeState:"clean", BuildDate:"2021-08-19T15:38:26Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"darwin/amd64"}
>> Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.1", GitCommit:"632ed300f2c34f6d6d15ca4cef3d3c7073412212", GitTreeState:"clean", BuildDate:"2021-08-19T15:39:34Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"linux/amd64"}

can't make this chart work off the shelve

Whatever I do I get this:

2022-09-13T10:32:50.898 DEBUG --- [  MainThread] plugin.manager             : plugin localstack.hooks.on_infra_start:register_state_serializer_handlers is disabled
2022-09-13T10:32:50.898 DEBUG --- [  MainThread] plugin.manager             : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.setup_pro_infra = <function setup_pro_infra at 0x7f028edb0f70>)
2022-09-13T10:32:50.898 DEBUG --- [  MainThread] plugin.manager             : plugin localstack.hooks.on_infra_start:setup_pro_infra is disabled
Error starting infrastructure: expected str, bytes or os.PathLike object, not NoneType Traceback (most recent call last):
  File "/opt/code/localstack/localstack/services/infra.py", line 417, in start_infra
    hooks.on_infra_start.run()
  File "/opt/code/localstack/localstack/runtime/hooks.py", line 64, in run_in_order
    fn_plugin(*args, **kwargs)
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/plugin/core.py", line 183, in __call__
    return self.fn(*args, **kwargs)
  File "/opt/code/localstack/localstack/runtime/init.py", line 197, in _run_init_scripts_on_start
    _run_and_log(Stage.START)
  File "/opt/code/localstack/localstack/runtime/init.py", line 214, in _run_and_log
    scripts = init_script_manager().run_stage(stage)
  File "/opt/code/localstack/localstack/runtime/init.py", line 124, in run_stage
    scripts = self.scripts.get(stage, [])
  File "/usr/local/lib/python3.10/functools.py", line 981, in __get__
    val = self.func(instance)
  File "/opt/code/localstack/localstack/runtime/init.py", line 106, in scripts
    return self._find_scripts()
  File "/opt/code/localstack/localstack/runtime/init.py", line 161, in _find_scripts
    stage_path = os.path.join(self.script_root, stage_dir)
  File "/usr/local/lib/python3.10/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Any hints/ ideas?

Context: Targeted platform is k3s on DDFM.

Not a python guy but it looks like this tries to open a non-existent file? Guessing from this link: https://bobbyhadz.com/blog/python-typeerror-expected-str-bytes-or-os-pathlike-object-not-nonetype#:~:text=The%20Python%20%22TypeError%3A%20expected%20str,from%20and%20correct%20the%20assignment.

Using localstack and bitnami/mysql together result in: Error with executing "common.labels.standard"

Hey Team,

So we recently ran into an issue described here bitnami/charts#18839 when using Local-Stack and Bitnami/MySQL together.. There was a change on my bitnami common side of things, which the latest Bitnami/MySQL chart is using), is causing this error when using these two charts together:

Our dependencies

dependencies
  - name: localstack
    repository: "https://helm.localstack.cloud"
    version: '^0.5.5'
    condition: localstack.local
  - name: mysql
    repository: "https://charts.bitnami.com/bitnami"
    version: '^9'
    condition: mysql.local

Chart.lock for our localstack chart we're using

dependencies:
- name: common
  repository: https://charts.bitnami.com/bitnami
  version: 1.11.1
digest: sha256:71cf772fb66d7745ae66be9b49f8364a4f90897a0f694f11ed503088b6833e9a
generated: "2023-02-28T07:32:33.021936568Z"

Chart.lock for the Bitnami/MySQL

dependencies:
- name: common
  repository: oci://registry-1.docker.io/bitnamicharts
  version: 2.9.0
digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9
generated: "2023-08-22T14:23:05.454524+02:00"

Error Summary:

helm | Error: template: notification/charts/mysql/templates/primary/svc.yaml:11:14: executing "notification/charts/mysql/templates/primary/svc.yaml" at <include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $)>: error calling include: template: notification/charts/localstack/charts/common/templates/_labels.tpl:6:27: executing "common.labels.standard" at <include "common.names.name" .>: error calling include: template: notification/charts/localstack/charts/common/templates/_names.tpl:6:18: executing "common.names.name" at <.Chart.Name>: nil pointer evaluating interface {}.Name
helm | helm.go:84: [debug] template: notification/charts/mysql/templates/primary/svc.yaml:11:14: executing "notification/charts/mysql/templates/primary/svc.yaml" at <include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $)>: error calling include: template: notification/charts/localstack/charts/common/templates/_labels.tpl:6:27: executing "common.labels.standard" at <include "common.names.name" .>: error calling include: template: notification/charts/localstack/charts/common/templates/_names.tpl:6:18: executing "common.names.name" at <.Chart.Name>: nil pointer evaluating interface {}.Name

The theory is that Local-Stack may need to be updated to a more recent (or at least compatible) version of Bitnami/Common. I did try the latest Local-Stack release 0.6.2 which is on 2.2 Bitnami/Common but the same issue persisted.

Pinning the Bitnami/MySQL chart to the previous version temporarily works around it.

Thanks,
Mike

Add the ability to deploy extra objects

.Values.enableStartupScripts allows to mount ConfigMap to /docker-entrypoint-initaws.d, but there is no way to create this ConfigMap. To resolve this problem I suggest to add the ability to deploy extra objects like it done for almost all Bitnami charts

Release 0.6.3 no longer works with Helm 3.5.4

Thanks for your work on this project! Unfortunately it appears 0.6.3 no longer works with older versions of Helm, specifically 3.5.4. Installing the chart causes the following parse error.

Error: parse error at (localstack/charts/common/templates/_labels.tpl:14): unclosed action

The error does not occur on 0.6.2.

The documentation says LocalStack requires 3.2.0+. If this was an intentional change, you'll likely want to fix it. Otherwise, please update the documentation accordingly.

If you have difficult reproducing the problem or need additional information about my environment, please let me know. Thanks!

Exposing port 53 as localstack is also a DNS server

When running in K8S, we need to be able to use LocalStack DNS server capability (Transparent Endpoint Injection).
The helm chart does not allow to bind that port which makes this immposible to use this feature in K8S

Cannot deploy localstack-0.3.3

The commits from PR #33 seem to have broken the localstack Helm chart. I'm no longer able to deploy it.

Steps to reproduce:

helm repo add localstack-repo https://helm.localstack.cloud
helm upgrade --kube-context kind --namespace localstack --install --wait localstack localstack-repo/localstack

Error received in output:

Release "localstack" does not exist. Installing it now.
Error: template: localstack/templates/tests/test-connection.yaml:20:63: executing "localstack/templates/tests/test-connection.yaml" at <$.Values.startServices>: invalid value; expected string

Using DATA_DIR on charts locally with k3d

Every time my localstack pod crashes i'm loosing all secrets created before.
I would like to use my own local directory as DATA_DIR for persistency.
Seems like that use-case is working on docker-compose, but couldn't find it in helm chart.
Seems like in helm charts there is a need for PVC setup, which i dont have since running on macos k3d.

Is there a way to get persistency for my use case? if not, how do one use init-scripts to create same secrets on each restart of the pod?

Timing out when localstack is starting

When localstack is starting up in my microk8s cluster it is not able to successfully start up. It's trying to download/install some things but it only has 30 seconds to do it. This usually fails and it gets into a loop of just constantly doing this over and over again.

Two questions I have:

  1. Could we expose a variable for the helm-chart to increase the timeout so it has the time to download and install all of the extra stuff?
  2. Is the downloading/installing a bug with starting up localstack, meaning it's not supposed to be downloading all this extra stuff?

This was working before and I think this might benefit anyone else who can't get localstack started in a local k8s.

Waiting for all LocalStack services to be ready
2022-09-26 22:11:48,852 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2022-09-26 22:11:48,853 INFO supervisord started with pid 15
2022-09-26 22:11:49,865 INFO spawned: 'infra' with pid 20
SERVICES variable is ignored if EAGER_SERVICE_LOADING=0.

LocalStack version: 1.1.1.dev
LocalStack build date: 2022-09-14
LocalStack build git hash: 1cf9fd4a

2022-09-26T22:11:50.773 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='_patch_botocore_json_parser', value='localstack.aws.client:_patch_botocore_json_parser', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.774 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='_run_init_scripts_on_start', value='localstack.runtime.init:_run_init_scripts_on_start', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.775 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='register_partition_adjusting_proxy_listener', value='localstack.plugins:register_partition_adjusting_proxy_listener', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.775 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='add_aws_request_logger', value='localstack_ext.analytics.plugins:add_aws_request_logger', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.775 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='add_custom_edge_routes', value='localstack_ext.plugins:add_custom_edge_routes', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.777 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='add_iam_enforcement_listener', value='localstack_ext.services.iam.plugins:add_iam_enforcement_listener', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.777 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='add_legacy_iam_enforcement_listener', value='localstack_ext.services.iam.plugins:add_legacy_iam_enforcement_listener', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.777 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='extensions_on_infra_start', value='localstack_ext.extensions.plugins:extensions_on_infra_start', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.778 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='init_stackinfo_handler', value='localstack_ext.services.internal.stackinfo.plugins:init_stackinfo_handler', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.778 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='patch_account_id_resolver', value='localstack_ext.plugins:patch_account_id_resolver', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.778 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='patch_get_account_id_from_access_key_id', value='localstack_ext.plugins:patch_get_account_id_from_access_key_id', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.778 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='register_pods_api', value='localstack_ext.persistence.plugins:register_pods_api', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.778 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='register_state_serializer_handlers', value='localstack_ext.persistence.plugins:register_state_serializer_handlers', group='localstack.hooks.on_infra_start')
2022-09-26T22:11:50.778 DEBUG --- [  MainThread] stevedore.extension        : found extension EntryPoint(name='setup_pro_infra', value='localstack_ext.plugins:setup_pro_infra', group='localstack.hooks.on_infra_start')

...

2022-09-26T22:11:50.779 DEBUG --- [  MainThread] plugin.manager             : plugin localstack.hooks.on_infra_start:setup_pro_infra is disabled
2022-09-26T22:11:50.779 DEBUG --- [  MainThread] localstack.runtime.init    : Init scripts discovered: {BOOT: [], START: [], READY: [], SHUTDOWN: []}
2022-09-26T22:11:50.806  INFO --- [d-2 (worker)] l.services.install         : Downloading and installing local Installing lambda runtime server. This may take some time.
2022-09-26T22:11:50.811  INFO --- [-23 (worker)] l.services.install         : Downloading and installing local KMS server. This may take some time.
2022-09-26T22:11:50.815 DEBUG --- [-17 (worker)] localstack.packages.core   : Starting installation of dynamodb-local...
2022-09-26T22:11:50.816 DEBUG --- [-17 (worker)] localstack.utils.run       : Executing command: ['unzip', '-o', '-q', '/tmp/localstack.ddb.zip']
2022-09-26T22:11:50.817 DEBUG --- [-15 (worker)] l.services.install         : getting kinesis-mock for linux aarch64
2022-09-26T22:11:51.195 DEBUG --- [-17 (worker)] localstack.utils.run       : Executing command: ['zip', '-u', 'DynamoDBLocal.jar', 'log4j2.xml']
2022-09-26 22:11:51,195 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Waiting for all LocalStack services to be ready
2022-09-26T22:11:56.058 DEBUG --- [d-3 (worker)] localstack.utils.http      : Starting download from https://raw.githubusercontent.com/LukeMizuhashi/cfn-response/master/index.js to /opt/code/localstack/.filesystem/usr/lib/localstack/lambda.cfn-response.js (878 bytes)
2022-09-26T22:11:56.060 DEBUG --- [d-3 (worker)] localstack.utils.http      : Done downloading https://raw.githubusercontent.com/LukeMizuhashi/cfn-response/master/index.js, response code 200, total bytes 1951
2022-09-26T22:11:56.157 DEBUG --- [d-2 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/lambda-runtime-init/releases/download/v0.1.1-pre/aws-lambda-rie-arm64 to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie (9236354 bytes)
2022-09-26T22:11:56.326  INFO --- [-15 (worker)] l.services.install         : downloading kinesis-mock binary from https://github.com/etspaceman/kinesis-mock/releases/download/0.2.5/kinesis-mock.jar
2022-09-26T22:11:56.511 DEBUG --- [d-2 (worker)] localstack.utils.http      : Written 1048576 bytes (total 1048576) to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie
2022-09-26T22:11:56.675 DEBUG --- [-17 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/388cd73f45bfd3bcf7ad40aa35499093061c7962/dynamodb-local-patch/target/ddb-local-loader-0.1.jar to /opt/code/localstack/.filesystem/var/lib/localstack/lib/dynamodb-local/latest/ddb-local-loader-0.1.jar (4226 bytes)
2022-09-26T22:11:56.677 DEBUG --- [-17 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/388cd73f45bfd3bcf7ad40aa35499093061c7962/dynamodb-local-patch/target/ddb-local-loader-0.1.jar, response code 200, total bytes 4226
2022-09-26T22:11:56.716 DEBUG --- [-23 (worker)] localstack.utils.http      : Starting download from https://s3-eu-west-2.amazonaws.com/local-kms/3/local-kms_linux-arm64.bin to /opt/code/localstack/.filesystem/usr/lib/localstack/kms/local-kms.linux-arm64.bin (14559534 bytes)
2022-09-26T22:11:56.796 DEBUG --- [d-2 (worker)] localstack.utils.http      : Written 1048576 bytes (total 2097152) to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie
2022-09-26T22:11:56.902 DEBUG --- [-17 (worker)] localstack.utils.http      : Starting download from https://repo1.maven.org/maven2/org/javassist/javassist/3.28.0-GA/javassist-3.28.0-GA.jar to /opt/code/localstack/.filesystem/var/lib/localstack/lib/dynamodb-local/latest/javassist.jar (851531 bytes)
2022-09-26T22:11:56.953 DEBUG --- [-15 (worker)] localstack.utils.http      : Starting download from https://github.com/etspaceman/kinesis-mock/releases/download/0.2.5/kinesis-mock.jar to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar (43288236 bytes)
2022-09-26T22:11:59.816 DEBUG --- [d-2 (worker)] localstack.utils.http      : Written 1048576 bytes (total 3145728) to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie
Waiting for all LocalStack services to be ready
2022-09-26T22:12:04.730 DEBUG --- [-17 (worker)] localstack.utils.http      : Done downloading https://repo1.maven.org/maven2/org/javassist/javassist/3.28.0-GA/javassist-3.28.0-GA.jar, response code 200, total bytes 851531
2022-09-26T22:12:05.381 DEBUG --- [-17 (worker)] localstack.utils.http      : Starting download from https://repo1.maven.org/maven2/org/slf4j/slf4j-ext/1.8.0-beta4/slf4j-ext-1.8.0-beta4.jar to /opt/code/localstack/.filesystem/var/lib/localstack/lib/dynamodb-local/latest/DynamoDBLocal_lib/slf4j-ext-1.8.0-beta4.jar (38652 bytes)
2022-09-26T22:12:05.550 DEBUG --- [-17 (worker)] localstack.utils.http      : Done downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-ext/1.8.0-beta4/slf4j-ext-1.8.0-beta4.jar, response code 200, total bytes 38652
2022-09-26T22:12:05.551 DEBUG --- [-17 (worker)] localstack.utils.run       : Executing command: ['unzip', '-o', '/opt/code/localstack/.filesystem/var/lib/localstack/lib/dynamodb-local/latest/DynamoDBLocal.jar', 'META-INF/MANIFEST.MF']
2022-09-26T22:12:05.553 DEBUG --- [-17 (worker)] localstack.utils.run       : Executing command: ['zip', 'DynamoDBLocal.jar', 'META-INF/MANIFEST.MF']
2022-09-26T22:12:05.580 DEBUG --- [-17 (worker)] localstack.packages.core   : Installation of dynamodb-local finished.
2022-09-26T22:12:06.855 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: rm -rf "/opt/code/localstack/.filesystem/usr/lib/localstack/home"
2022-09-26T22:12:06.968 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 1048576) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:07.049 DEBUG --- [d-2 (worker)] localstack.utils.http      : Written 1048576 bytes (total 4194304) to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie
2022-09-26T22:12:07.062 DEBUG --- [-23 (worker)] localstack.utils.http      : Written 1048576 bytes (total 1048576) to /opt/code/localstack/.filesystem/usr/lib/localstack/kms/local-kms.linux-arm64.bin
2022-09-26T22:12:07.447 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/com/amazonaws/stepfunctions/local/runtime/Config.class to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/com/amazonaws/stepfunctions/local/runtime/Config.class (16268 bytes)
2022-09-26T22:12:07.455 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/com/amazonaws/stepfunctions/local/runtime/Config.class, response code 200, total bytes 16268
2022-09-26T22:12:07.456 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'com/amazonaws/stepfunctions/local/runtime/Config.class']
2022-09-26T22:12:07.758 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/com/amazonaws/stepfunctions/local/runtime/executors/task/LambdaTaskStateExecutor.class to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/com/amazonaws/stepfunctions/local/runtime/executors/task/LambdaTaskStateExecutor.class (19963 bytes)
2022-09-26T22:12:07.769 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/com/amazonaws/stepfunctions/local/runtime/executors/task/LambdaTaskStateExecutor.class, response code 200, total bytes 19963
2022-09-26T22:12:07.771 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'com/amazonaws/stepfunctions/local/runtime/executors/task/LambdaTaskStateExecutor.class']
2022-09-26T22:12:07.966 DEBUG --- [d-2 (worker)] localstack.utils.http      : Written 1048576 bytes (total 5242880) to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie
2022-09-26T22:12:08.027 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 2097152) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:08.269 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/cloud/localstack/RegionAspect.class to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/cloud/localstack/RegionAspect.class (10777 bytes)
2022-09-26T22:12:08.275 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/cloud/localstack/RegionAspect.class, response code 200, total bytes 10777
2022-09-26T22:12:08.276 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'cloud/localstack/RegionAspect.class']
2022-09-26T22:12:08.592 DEBUG --- [d-2 (worker)] localstack.utils.http      : Written 1048576 bytes (total 6291456) to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie
2022-09-26T22:12:08.696 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 3145728) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:08.727 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/cloud/localstack/StepFunctionsStarter.class to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/cloud/localstack/StepFunctionsStarter.class (1688 bytes)
2022-09-26T22:12:08.729 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/cloud/localstack/StepFunctionsStarter.class, response code 200, total bytes 1688
2022-09-26T22:12:08.731 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'cloud/localstack/StepFunctionsStarter.class']
2022-09-26T22:12:09.040 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/cloud/localstack/Async2ServiceApi.class to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/cloud/localstack/Async2ServiceApi.class (1118 bytes)
2022-09-26T22:12:09.043 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/cloud/localstack/Async2ServiceApi.class, response code 200, total bytes 1118
2022-09-26T22:12:09.045 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'cloud/localstack/Async2ServiceApi.class']
2022-09-26T22:12:09.154 DEBUG --- [d-2 (worker)] localstack.utils.http      : Written 1048576 bytes (total 7340032) to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie
2022-09-26T22:12:09.298 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 4194304) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:09.379 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/cloud/localstack/DescribeExecutionParsed.class to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/cloud/localstack/DescribeExecutionParsed.class (6409 bytes)
2022-09-26T22:12:09.383 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/cloud/localstack/DescribeExecutionParsed.class, response code 200, total bytes 6409
2022-09-26T22:12:09.384 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'cloud/localstack/DescribeExecutionParsed.class']
2022-09-26T22:12:09.715 DEBUG --- [d-2 (worker)] localstack.utils.http      : Written 1048576 bytes (total 8388608) to /opt/code/localstack/.filesystem/usr/lib/localstack/aws-lambda-rie
Waiting for all LocalStack services to be ready
2022-09-26T22:12:09.825 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/META-INF/aop.xml to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/META-INF/aop.xml (141 bytes)
2022-09-26T22:12:09.828 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/ac84739adc87ff4b5553478f6849134bcd259672/stepfunctions-local-patch/META-INF/aop.xml, response code 200, total bytes 234
2022-09-26T22:12:09.830 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'META-INF/aop.xml']
2022-09-26T22:12:09.836 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['unzip', '-o', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'META-INF/MANIFEST.MF']
2022-09-26T22:12:09.838 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', 'StepFunctionsLocal.jar', 'META-INF/MANIFEST.MF']
2022-09-26T22:12:09.845 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['unzip', '-o', '/opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/StepFunctionsLocal.jar', 'META-INF/MANIFEST.MF']
2022-09-26T22:12:09.847 DEBUG --- [-22 (worker)] localstack.utils.run       : Executing command: ['zip', 'StepFunctionsLocal.jar', 'META-INF/MANIFEST.MF']
2022-09-26T22:12:09.877 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 5242880) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:10.027 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://repo1.maven.org/maven2/org/aspectj/aspectjrt/1.9.7/aspectjrt-1.9.7.jar to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/aspectjrt-1.9.7.jar (122874 bytes)
2022-09-26T22:12:10.175 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://repo1.maven.org/maven2/org/aspectj/aspectjrt/1.9.7/aspectjrt-1.9.7.jar, response code 200, total bytes 122874
2022-09-26T22:12:10.305 DEBUG --- [d-2 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/lambda-runtime-init/releases/download/v0.1.1-pre/aws-lambda-rie-arm64, response code 200, total bytes 9236354
2022-09-26T22:12:10.352 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://repo1.maven.org/maven2/org/aspectj/aspectjweaver/1.9.7/aspectjweaver-1.9.7.jar to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/aspectjweaver-1.9.7.jar (2087074 bytes)
2022-09-26T22:12:10.517 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 6291456) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:10.688 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1048576 bytes (total 1048576) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/aspectjweaver-1.9.7.jar
2022-09-26T22:12:10.985 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1038498 bytes (total 2087074) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/aspectjweaver-1.9.7.jar
2022-09-26T22:12:10.989 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://repo1.maven.org/maven2/org/aspectj/aspectjweaver/1.9.7/aspectjweaver-1.9.7.jar, response code 200, total bytes 2087074
2022-09-26T22:12:11.556 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 7340032) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:11.691 DEBUG --- [-22 (worker)] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/a4adc8f4da9c7ec0d93b50ca5b73dd14df791c0e/stepfunctions-internal-awssdk/awssdk.zip to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip (8373983 bytes)
2022-09-26T22:12:12.086 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1048576 bytes (total 1048576) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip
2022-09-26T22:12:12.437 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1048576 bytes (total 2097152) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip
2022-09-26T22:12:12.666 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 8388608) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:12.792 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1048576 bytes (total 3145728) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip
2022-09-26T22:12:13.160 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1048576 bytes (total 4194304) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip
2022-09-26T22:12:13.539 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1048576 bytes (total 5242880) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip
2022-09-26T22:12:13.714 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 9437184) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:13.966 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1048576 bytes (total 6291456) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip
2022-09-26T22:12:14.407 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1048576 bytes (total 7340032) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip
2022-09-26T22:12:14.511 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 10485760) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:14.852 DEBUG --- [-22 (worker)] localstack.utils.http      : Written 1033951 bytes (total 8373983) to /opt/code/localstack/.filesystem/usr/lib/localstack/stepfunctions/localstack-internal-awssdk/awssdk.zip
2022-09-26T22:12:14.861 DEBUG --- [-22 (worker)] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/a4adc8f4da9c7ec0d93b50ca5b73dd14df791c0e/stepfunctions-internal-awssdk/awssdk.zip, response code 200, total bytes 8373983
2022-09-26T22:12:14.928 DEBUG --- [-23 (worker)] localstack.utils.http      : Written 1048576 bytes (total 2097152) to /opt/code/localstack/.filesystem/usr/lib/localstack/kms/local-kms.linux-arm64.bin
2022-09-26T22:12:15.162 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 11534336) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:15.680 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 12582912) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:16.121 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 13631488) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
2022-09-26T22:12:16.509 DEBUG --- [-15 (worker)] localstack.utils.http      : Written 1048576 bytes (total 14680064) to /opt/code/localstack/.filesystem/usr/lib/localstack/kinesis-mock/kinesis-mock.jar
Waiting for all LocalStack services to be ready
Sending -15 to supervisord
2022-09-26 22:12:16,863 WARN received SIGTERM indicating exit request
2022-09-26 22:12:16,863 INFO waiting for infra to die
2022-09-26 22:12:17,747 INFO stopped: infra (exit status 0)
Stream closed EOF for default/avail-localstack-69cc4f7575-bpvbj (localstack)

Feature request: Ability to specify ConfigMap instead of startupScriptContent for init scripts

There are some drawbacks to using the Value startupScriptContent as the initialization script. For example, if the localstack helm chart is a subchart, rendering startupScriptContent doesn't have access to Values or Files from the parent chart. In this case, it's necessary to mount the initialization script manually, for example:

localstack:
  enableStartupScripts: false  # We mount the startup script manually below
  volumeMounts:
    - name: localstack-init-scripts-config
      mountPath: /docker-entrypoint-initaws.d
  volumes:
    - name: localstack-init-scripts-config
      configMap:
        name: my-custom-localstack-init-scripts

It would be handy if we could mount a custom ConfigMap into localstack's /etc/localstack/init/ready.d directory. For example:

  enableStartupScripts: true
  startupScriptConfigMap: my-custom-localstack-init-scripts

would mount the given ConfigMap to the init script entry point.

Exception executing lambda (Go/NodeJS) in k8s

Using latest helm-chart 0.3.5

Installing into docker-desktop k8s with:
helm install localstack localstack/localstack -n test --set lambdaExecutor=docker --set persistence.enabled=true --set mountDind.enabled=true --set service.type=ClusterIP

Go lambda source:

package main

import (
	"context"

	"github.com/aws/aws-lambda-go/lambda"
)

func HandleRequest(ctx context.Context) (string, error) {
	return "Hello World!", nil
}

func main() {
	lambda.Start(HandleRequest)
}

Output from aws create-function:

{
    "FunctionName": "my-go-function",
    "FunctionArn": "arn:aws:lambda:us-east-2:000000000000:function:my-go-function",
    "Runtime": "go1.x",
    "Role": "arn:aws:iam::123456789012:role/lambda-ex",
    "Handler": "main",
    "CodeSize": 4446493,
    "Description": "",
    "Timeout": 3,
    "LastModified": "2021-10-30T17:30:17.417+0000",
    "CodeSha256": "gItxIu47nrPCl9GHFHe0kAIZDILW6GFc0I2G/2FWG4A=",
    "Version": "$LATEST",
    "VpcConfig": {},
    "TracingConfig": {
        "Mode": "PassThrough"
    },
    "RevisionId": "4e33a774-0e06-4381-a0ad-63e3eea450c0",
    "State": "Active",
    "LastUpdateStatus": "Successful",
    "PackageType": "Zip"
}

Output from aws invoke:

{
    "errorMessage": "Lambda process returned with error. Result: . Output:\n",
    "errorType": "InvocationException",
    "stackTrace": [
        "  File \"/opt/code/localstack/localstack/services/awslambda/lambda_api.py\", line 770, in run_lambda\n    lock_discriminator=lock_discriminator,\n",
        "  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 336, in execute\n    return do_execute()\n",
        "  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 326, in do_execute\n    return _run(func_arn=func_arn)\n",
        "  File \"/opt/code/localstack/localstack/utils/cloudwatch/cloudwatch_util.py\", line 157, in wrapped\n    raise e\n",
        "  File \"/opt/code/localstack/localstack/utils/cloudwatch/cloudwatch_util.py\", line 153, in wrapped\n    result = func(*args, **kwargs)\n",
        "  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 313, in _run\n    raise e\n",
        "  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 299, in _run\n    result = self._execute(func_arn, func_details, event, context, version)\n",
        "  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 587, in _execute\n    event=stdin, env_vars=environment, func_details=func_details\n",
        "  File \"/opt/code/localstack/localstack/services/awslambda/lambda_executors.py\", line 515, in run_lambda_executor\n    ) from error\n"
    ]
}

Console output from localstack:
test-localstack-54659d9ffb-bpwb8-1635615368241129000.log

Console output from dind:
test-localstack-54659d9ffb-bpwb8-1635615782580850000.log

Any idea what I might be doing wrong?

livenessProbe and readinessProbe helm template misconfigured

Currently, this block is set for both proves in the deployment template (deployment.yaml#L47-L56):

httpGet:
  path: /health
  port: {{ .Values.service.edgeService.name }}

Unfortunately the port value should be .Values.service.edgeService.targetPort, otherwise this will always fail since it'll be hitting localhost:[name of service]/health rather than the actual port (i.e. localhost:edge/health)

service.port is undefined

.Values.service.port is referenced in:

  • ingress.yaml
  • test-connection.yaml
  • NOTES.txt

But there is no mention of this in values.yaml and will be undefined by default.

Workaround (fix?) is to replace port by edgePort in these three instances.

Add the ability to set update strategy

By default update strategy is RollingUpdate. But it doesn't work when persistence is enabled and used a PV that cannot be mounted on multiple pods. To resolve this need to provide the ability to change it.

Persistence mount path incompatible with localstack v1.x

What I observed

As of localstack v1.x, the mount location for data directory has changed (see v1.0.0 release notes) from /tmp/localstack to /var/lib/localstack. As is, if you install this helm chart with persistence enabled, you'll get an warning

WARNING
============================================================================
  It seems you are mounting the LocalStack volume into /tmp/localstack.
  This will break the LocalStack container! Please update your volume mount
  destination to /var/lib/localstack. In the meantime, we have set
  LEGACY_DIRECTORIES=1, to make LocalStack behave as in <1.0.0, and which
  should prevent any serious issues, but will be removed soon!
  You can suppress this warning by setting LEGACY_DIRECTORIES=1

  See: https://github.com/localstack/localstack/issues/6398
============================================================================

and persistence will not work. Localstack still works otherwise, but recreating the pod you will lose your data.

Propose solution

  1. add a persistence.mountPath helm value, default to /var/lib/localstack (v0.x users could configure to use /tmp/localstack)
  2. Change persistence mount path to {{ .Values.persistence.mountPath }}
  3. Change DATA_DIR env var to {{ .Values.persistence.mountPath }}/data

Unable to run specific services in localstack

I'm trying to run a specific set of services in LocalStack using the startServices parameter in the values.yaml file. However, despite specifying a comma-separated list of services, I'm still able to see all services in the /health endpoint.

Here's what I've done so far:

  • Modified the startServices parameter in the values.yaml file to only include the services I want to run (e.g., startServices: "redis,rds,route53,sqs,sns,s3").
  • Restarted the LocalStack deployment.
  • Despite these steps, when I check the /health endpoint, I can still see all services listed.

image

And this is the configuration:

image

Can someone please help me troubleshoot this issue?

Thank you 😄

Remove the default ingress-class

By default the ingress class annotation is set:

ingress:
  enabled: false
  annotations:
    # Adjust the ingress class when not using nginx as incress controller
    kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"

This causes issues if you want to unset this value to use the default ingress class.

The only solution I could find was setting annotations to be equal to an empty string, because otherwise helm merges any object you pass in.

Localstack 2.0.2 not compatible with docker over tcp.

From what I can find in localstack documentation DOCKER_HOST is not longer a configuration option only DOCKER_SOCK is available which is problematic with running lambda's. Since localstack will not be able to communicate over tcp to the dind container.

https://docs.localstack.cloud/references/configuration/

Not sure if a shared /var/run volume would work.

Error I get when trying to apply a lambda with mountDind.enabled=true.

WARN --- [ asgi_gw_5] l.s.a.i.docker_runtime_exe : WARNING: Docker not available in the LocalStack container but required to run Lambda functions. Please add the Docker volume mount "/var/run/docker.sock:/var/run/docker.sock" to your LocalStack startup. https://docs.localstack.cloud/references/lambda-provider-v2/#docker-not-available

EDIT: Not knowledgable of the localstack sourcecode. But to me it looks like DOCKER_HOST is always overwritten by the unix socket. https://github.com/localstack/localstack/blob/c70ce03c176d33885a674263bc77dc4dfa48c7f7/localstack/utils/bootstrap.py#L531

So I do not see how this env variable could achive anything?

Chart.yaml file is missing

Hey, when I create this chat (via terraform) it is complaining about Chart.yaml:

Terraform will perform the following actions:

  # helm_release.localstack will be created
  + resource "helm_release" "localstack" {
      + atomic                     = false
      + chart                      = "localstack"
      + cleanup_on_fail            = false
      + create_namespace           = false
      + dependency_update          = false
      + disable_crd_hooks          = false
      + disable_openapi_validation = false
      + disable_webhooks           = false
      + force_update               = false
      + id                         = (known after apply)
      + lint                       = false
      + manifest                   = (known after apply)
      + max_history                = 0
      + metadata                   = (known after apply)
      + name                       = "localstack"
      + namespace                  = "localstack"
      + recreate_pods              = false
      + render_subchart_notes      = true
      + replace                    = false
      + repository                 = "https://localstack.github.io/helm-charts"
      + reset_values               = false
      + reuse_values               = false
      + skip_crds                  = false
      + status                     = "deployed"
      + timeout                    = 300
      + values                     = [
          + <<-EOT
                image:
                  tag: 0.13.1
                
                extraEnvVars:
                  - name: SERVICES
                    value: "s3,secretsmanager"
                  - name: EAGER_SERVICE_LOADING
                    value: "1"
            EOT,
        ]
      + verify                     = false
      + version                    = "0.3.7"
      + wait                       = true
      + wait_for_jobs              = false
    }

Plan: 1 to add, 0 to change, 0 to destroy.
helm_release.localstack: Creating...
╷
│ Error: Chart.yaml file is missing
│ 
│   with helm_release.localstack,
│   on localstack.tf line 7, in resource "helm_release" "localstack":
│    7: resource "helm_release" "localstack" {
│ 
╵

I can't see any changes in the repo. A few days ago everything worked fine.

Lambda not mounted in DinD container

Running kubernetes on Docker Desktop for Windows
Installed helm chart
helm install localstack -n localstack--create-namespace localstack-charts/localstack -f ./values.localstack.yaml
override file:

debug: true
image:
  tag: "0.12.15"
lambdaExecutor: "docker-reuse"
mountDind:
  enabled: true
service:
  type: ClusterIP
ingress:
  enabled: true
  hosts:
    - host: localstack.localcluster
      paths:
        - /

Everything starts up normally, I can deploy my netcoreapp3.1 function with an API gateway. Looking into the pod, I can also see the zipfile created at the
However, when I execute the function, I get an exception that the deps.json is missing.

Could not find the required '<Project>.deps.json'. This file should be present at the root of the deployment package.: LambdaException

On further investigation, creating the container from the localstack pod with the same volume mount for zip file (-v "/tmp/localstack/zipfile.2579021a":/var/task) and checking inside the container, no files are actually mounted from the main localstack pod.

Looks like this could be related to the docker socket maybe not being mounted from the host system?

Tested this outside of kubernetes with docker-compose and by directly mounting the docker host in localstack and that worked.

version: "3.0"

services:
  localstack-profile: #this is the name of the service.  Note: it is ALSO the name of a host created by Docker compose
    # image: localstack/localstack:0.12.11
    image: localstack/localstack:latest
    ports:
      - "4566:4566"
      # - "${PORT_WEB_UI-8080}:${PORT_WEB_UI-8080}"

    environment:
      - DEFAULT_REGION=us-east-1 # regions must match (e.g. in serverless.yml)
      - SERVICES=acm,apigateway
        ,cloudformation,cloudwatch,dynamodb
        ,dynamodbstreams,ec2,es,events
        ,firehose,iam,kinesis,kms,lambda,rds
        ,route53,s3,s3api,secretsmanager,ses,sns
        ,sqs,ssm,stepfunctions,sts
      - DEBUG="1"
      - DATA_DIR=/tmp/localstack/data # for use by
      - LAMBDA_EXECUTOR=docker-reuse
      - LAMBDA_REMOVE_CONTAINERS=1
      - LAMBDA_DOCKER_NETWORK=profile-network # using a specified network to allow lambda to reach LocalStack
      - DOCKER_HOST=unix:///var/run/docker.sock

    volumes:
      # - "${TMP_DIR:-/tmp/localstack}:${TMP_DIR:-/tmp/localstack}" # used for LocalStack internal data
      - "/var/run/docker.sock:/var/run/docker.sock"
    networks:
      - profile-network

volumes:
  localstack-vol:
 networks:
   profile-network:
     name: profile-network
     driver: bridge

(though this example does not use a separate Docker in Docker image...)

If I manually create a kubernetes deployment that mounts the docker socket from the host and also create a volume on the host with HostPath then I can get this to work somewhat, but that seems a bit hacky. And in that case I have issues with connecting to other services running in the kubernetes cluster with the <service>.<namespace> hostname (although I don't know if this would be resolved if the chart docker lambda deployment above worked, since I don't quite understand how the network is shared with the docker-in-docker container...)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{.Values.name}}
spec:
  replicas: 1
  selector:
    matchLabels:
      app: {{.Values.name}}
  template:
    metadata:
      labels:
        app: {{.Values.name}}
    spec:
      containers:
        - name: {{.Values.name}}
          image: {{.Values.image}}
           env:
             - name: DEFAULT_REGION
               value: "us-east-1"
             - name: SERVICES
               value: "acm,apigateway,cloudformation,cloudwatch,dynamodb,dynamodbstreams,ec2,es,events,firehose,iam,kinesis,kms,lambda,rds,route53,s3,s3api,secretsmanager,ses,sns,sqs,ssm,stepfunctions,sts"
             - name: DEBUG
               value: "1"
             - name: DATA_DIR
               value: "/tmp/localstack/data"
             - name: LAMBDA_EXECUTOR
               value: "docker-reuse"
             - name: LAMBDA_REMOVE_CONTAINERS
               value: "1"
             - name: DOCKER_HOST
               value: "unix:///var/run/docker.sock"
          volumeMounts:
            - name: docker-sock
              mountPath: "/var/run/"
            - name: datadir
              mountPath: "/tmp/localstack"
          securityContext:
            privileged: true
      volumes:
        - name: docker-sock
          hostPath:
            path: /var/run/
        - name: datadir
          hostPath:
            path: /tmp/localstack

So my question is, does anyone know how to resolve the volume mount issues for the lambda in docker in docker from localstack pod?

LocalStack Lambda function requires docker.sock but LocalStack is not compatible with docker over tcp

Currently Lambda functions execution requires docker.sock. We want to run tests for lambda functions in our CI but the host docker.sock is not available (security) to use.

We attempted to use the DIND container TCP docker host for the localstack container using the DOCKER_HOST environment variable on the localstack container. We created a deployment with DIND container and Localstack container and tired setting the DOCKER_HOST on the localstack container to tcp://localhost:2375 (per our manifest).

But, this environment variable is not respected because the variable is overwritten in localstack bootstrap.py as shown below.

https://github.com/localstack/localstack/blob/master/localstack/utils/bootstrap.py#L542

    # pass through environment variables defined in config
    for env_var in config.CONFIG_ENV_VARS:
        value = os.environ.get(env_var, None)
        if value is not None:
            container.env_vars[env_var] = value
    container.env_vars["DOCKER_HOST"] = f"unix://{config.DOCKER_SOCK}"

Expected behavior: If the DOCKER_HOST environment variable is passed into the localstack container, the container should switch to using docker over tcp.

Actual behavior: Localstack run fails with error WARNING: Docker not available in the LocalStack container but required to run Lambda functions because it is looking for the mounted docker.sock.

This is a blocker for us as we cannot run Lambda tests in our CI.

charts use deprecated endpoint for liveness and readiness probes

From the logs of the pod:

/health is deprecated (since 1.3.0) and will be removed in upcoming releases of LocalStack! Use /_localstack/health instead.

Submitting a PR momentarily to update it.

Note:
it's hard-coded atm; would maybe be better to have this be specifiable in the values.yaml file.
For now happy to just share the quick-patch upstream.

Calls to Step Functions return 500

Env: Docker for Desktop 3.0.3 on macOS 10.15.7

$ aws --endpoint-url http://localhost:4566 stepfunctions list-state-machines
An error occurred (500) when calling the ListStateMachines operation (reached max retries: 2):

Relevant log entry:
requests.exceptions.ConnectionError: MyHTTPConnectionPool(host='localstack-78c5774d85-gcrkn', port=8083): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7faaf9712730>: Failed to establish a new connection: [Errno 111] Connection refused'))

It appears the Step Functions proxy is trying to forward to port 8083, which is not the port the service is listening on.

How to set `LAMBDA_EXECUTOR=docker` for lambda ?

Environments:

$ sudo minikube version
minikube version: v1.19.0
$ helm version
version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"clean", GoVersion:"go1.15.11"}

Errors:

An error occurred (ResourceConflictException) when calling the CreateFunction operation: Function already exist: my-function
START 7105db6b-e134-4ab2-bf92-0fe3b33b6a3f: Lambda arn:aws:lambda:us-east-1:000000000000:function:my-function started via "local" executor ...
Unable to find executor for Lambda function "my-function". Note that Node.js, Golang, and .Net Core Lambdas currently require LAMBDA_EXECUTOR=docker Traceback (most recent call last):
  File "/opt/code/localstack/localstack/services/awslambda/lambda_executors.py", line 766, in do_execute
    result = lambda_function(event, context)
  File "/opt/code/localstack/localstack/services/awslambda/lambda_api.py", line 780, in generic_handler
    raise ClientError(('Unable to find executor for Lambda function "%s". Note that ' +
localstack.services.awslambda.lambda_api.ClientError: Unable to find executor for Lambda function "my-function". Note that Node.js, Golang, and .Net Core Lambdas currently require LAMBDA_EXECUTOR=docker

END RequestId: 7105db6b-e134-4ab2-bf92-0fe3b33b6a3f
REPORT RequestId: 7105db6b-e134-4ab2-bf92-0fe3b33b6a3f Duration: 0 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.