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
11 changes: 10 additions & 1 deletion .github/workflows/chart-lint-test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,18 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1

- name: Create LocalStack auth token secret
if: steps.list-changed.outputs.changed == 'true'
# LocalStack requires an auth token for all installations
# The LOCALSTACK_AUTH_TOKEN secret must be configured in the GitHub repository settings
run: |
kubectl create namespace testing
kubectl create secret generic --namespace testing localstack-auth-token \
--from-literal=auth-token="${{ secrets.LOCALSTACK_AUTH_TOKEN }}"

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}
run: ct install --target-branch ${{ github.event.repository.default_branch }} --namespace testing

release:
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@

[LocalStack 💻](https://localstack.cloud) 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](https://localstack.cloud/pricing) supports additional APIs and advanced features. You can find a comprehensive list of supported APIs on our [☑️ Feature Coverage](https://docs.localstack.cloud/aws/feature-coverage/) page.

LocalStack for AWS supports a bunch of AWS services, like AWS Lambda, S3, Dynamodb, Kinesis, SQS, SNS, and **many** more!
LocalStack also provides additional features to make your life as a cloud developer easier! Check out LocalStack's [Cloud Developer Tools](https://docs.localstack.cloud/tools/) for more information.

## TL;DR
Expand Down
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.6.27
version: 0.7.0
name: localstack
description: LocalStack - a fully functional local AWS cloud stack
type: application
Expand Down
42 changes: 25 additions & 17 deletions charts/localstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@ Helm Charts for LocalStack.

## TL;DR

**Note:** LocalStack now requires an auth token for all installations.

Create a `values.yaml` file with your auth token:
```yaml
extraEnvVars:
- name: LOCALSTACK_AUTH_TOKEN
value: "<your auth token>"
```
Then install the chart:
```bash
$ helm repo add localstack-charts https://localstack.github.io/helm-charts
$ helm install my-release localstack-charts/localstack
$ helm install my-release localstack-charts/localstack -f values.yaml
```

See the [Authentication](#authentication) section for alternative configuration methods for your auth token.

## Introduction

LocalStack provides an easy-to-use test/mocking framework for developing Cloud applications.
Expand All @@ -21,9 +33,11 @@ To install the chart with the release name `my-release`:

```bash
$ helm repo add localstack-charts https://localstack.github.io/helm-charts
$ helm install my-release localstack-charts/localstack
$ helm install my-release localstack-charts/localstack -f values.yaml
```

**Important:** LocalStack requires an auth token for all installations. You must configure your auth token as described in the [Authentication](#authentication) section below before installing the chart.

These commands deploy LocalStack on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.

> **Tip**: List all releases using `helm list`
Expand All @@ -38,37 +52,28 @@ $ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

## LocalStack Pro

You can use this chart with LocalStack Pro by:
1. Changing the image to `localstack/localstack-pro`.
2. Providing your Auth Token as an environment variable.
_(API keys are deprecated by Localstack v3.0)_

You can set these values in a YAML file (in this example `pro-values.yaml`):
## Authentication
You can set the auth token in a YAML file (in this example `values.yaml`):
```yaml
image:
repository: localstack/localstack-pro

extraEnvVars:
- name: LOCALSTACK_AUTH_TOKEN
value: "<your auth token>"
```
If you have the LocalStack Auth Token in a secret, you can also reference it directly with `extraEnvVars`:
```
```yaml
extraEnvVars:
- name: LOCALSTACK_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: <name of the secret>
key: <name of the key in the secret containing the API key>
key: <name of the key in the secret containing the auth token>
```

And you can use these values when installing the chart in your cluster:
Then use these values when installing the chart in your cluster:
```bash
$ helm repo add localstack-charts https://localstack.github.io/helm-charts
$ helm install my-release localstack-charts/localstack -f pro-values.yaml
$ helm install my-release localstack-charts/localstack -f values.yaml
```


Expand Down Expand Up @@ -180,6 +185,9 @@ When raising a pull request with a fix or new feature, please make sure to:

## Change Log

* v0.7.0: Prepare for image consolidation, default to localstack/localstack-pro
* v0.6.0: Upgrade to LocalStack v2
* v0.5.0: Add external service ports, additional configs, k8s lambda executor
* v0.4.2: Remove default ingress annotation
* v0.4.1: Add the ability to set service annotations
* v0.4.0: Add the ability to set annotations on all objects globally and specifically add localstack-init-scripts-config.sh ConfigMap
Expand Down
23 changes: 23 additions & 0 deletions charts/localstack/ci/ci-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# CI test values for chart-testing
# This file is automatically used by the chart-testing tool during CI runs

# Enable debug mode for better test output
debug: true

# Set DNS policy to avoid circular DNS issues in test environments
dnsPolicy: "Default"

# Configure LocalStack auth token from a Kubernetes secret
# The secret is created by the GitHub workflow before running tests
extraEnvVars:
- name: LOCALSTACK_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: localstack-auth-token
key: auth-token

# Enable startup scripts to test initialization
enableStartupScripts: true
startupScriptContent: |
#!/bin/bash
awslocal sqs create-queue --queue-name test-queue
3 changes: 3 additions & 0 deletions charts/localstack/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
IMPORTANT: LocalStack requires an auth token to be configured via extraEnvVars.
Ensure you have set LOCALSTACK_AUTH_TOKEN in your values file or the deployment will not function properly.

1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
Expand Down
25 changes: 11 additions & 14 deletions charts/localstack/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,21 @@ ingress:
- path: /
pathType: ImplementationSpecific

# enable localstack pro (don't forget to set your API key)
# image:
# repository: localstack/localstack-pro
# REQUIRED: LocalStack requires an auth token for all installations.
# You can set the auth token from an already existing secret:
extraEnvVars:
- name: LOCALSTACK_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: localstack-auth-token
key: auth-token

# set the API key from an already existing secret
# extraEnvVars:
# - name: LOCALSTACK_AUTH_TOKEN
# valueFrom:
# secretKeyRef:
# name: <name of the secret containing the API key>
# key: <name of the key in the secret containing the API key>

# or set the API key directly
# Or set the auth token directly:
# extraEnvVars:
# - name: LOCALSTACK_AUTH_TOKEN
# value: "<your api key>"
# value: "<your auth token>"

# enable kubernetes lambda executor (only pro)
# enable kubernetes lambda executor
# lambda:
# executor: "kubernetes"

Expand Down
11 changes: 10 additions & 1 deletion charts/localstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ updateStrategy:
type: RollingUpdate

image:
repository: localstack/localstack
repository: localstack/localstack-pro
tag: "latest"
pullPolicy: IfNotPresent

Expand Down Expand Up @@ -93,6 +93,15 @@ mountDind:

## All the parameters from the configuatioan can be added using extraEnvVars.
## Ref. https://docs.localstack.cloud/references/configuration/
##
## REQUIRED: LocalStack requires an auth token for all installations.
## You must configure LOCALSTACK_AUTH_TOKEN via extraEnvVars or a secret.
## Example:
## extraEnvVars:
## - name: LOCALSTACK_AUTH_TOKEN
## value: "<your auth token>"
##
## Additional configuration examples:
## extraEnvVars:
## - name: DEFAULT_REGION
## value: "us-east-1"
Expand Down
Loading