Skip to content

Commit f3bb44b

Browse files
authored
update localstack helm chart to default to localstack-pro (#148)
1 parent fec9261 commit f3bb44b

8 files changed

Lines changed: 84 additions & 36 deletions

File tree

.github/workflows/chart-lint-test-release.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,18 @@ jobs:
5050
if: steps.list-changed.outputs.changed == 'true'
5151
uses: helm/kind-action@v1
5252

53+
- name: Create LocalStack auth token secret
54+
if: steps.list-changed.outputs.changed == 'true'
55+
# LocalStack requires an auth token for all installations
56+
# The LOCALSTACK_AUTH_TOKEN secret must be configured in the GitHub repository settings
57+
run: |
58+
kubectl create namespace testing
59+
kubectl create secret generic --namespace testing localstack-auth-token \
60+
--from-literal=auth-token="${{ secrets.LOCALSTACK_AUTH_TOKEN }}"
61+
5362
- name: Run chart-testing (install)
5463
if: steps.list-changed.outputs.changed == 'true'
55-
run: ct install --target-branch ${{ github.event.repository.default_branch }}
64+
run: ct install --target-branch ${{ github.event.repository.default_branch }} --namespace testing
5665

5766
release:
5867
runs-on: ubuntu-latest

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434

3535
[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.
3636

37-
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.
38-
37+
LocalStack for AWS supports a bunch of AWS services, like AWS Lambda, S3, Dynamodb, Kinesis, SQS, SNS, and **many** more!
3938
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.
4039

4140
## TL;DR

charts/localstack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ annotations:
22
category: Infrastructure
33
apiVersion: v2
44
appVersion: latest
5-
version: 0.6.27
5+
version: 0.7.0
66
name: localstack
77
description: LocalStack - a fully functional local AWS cloud stack
88
type: application

charts/localstack/README.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@ Helm Charts for LocalStack.
66

77
## TL;DR
88

9+
**Note:** LocalStack now requires an auth token for all installations.
10+
11+
Create a `values.yaml` file with your auth token:
12+
```yaml
13+
extraEnvVars:
14+
- name: LOCALSTACK_AUTH_TOKEN
15+
value: "<your auth token>"
16+
```
17+
18+
Then install the chart:
919
```bash
1020
$ helm repo add localstack-charts https://localstack.github.io/helm-charts
11-
$ helm install my-release localstack-charts/localstack
21+
$ helm install my-release localstack-charts/localstack -f values.yaml
1222
```
1323

24+
See the [Authentication](#authentication) section for alternative configuration methods for your auth token.
25+
1426
## Introduction
1527

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

2234
```bash
2335
$ helm repo add localstack-charts https://localstack.github.io/helm-charts
24-
$ helm install my-release localstack-charts/localstack
36+
$ helm install my-release localstack-charts/localstack -f values.yaml
2537
```
2638

39+
**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.
40+
2741
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.
2842

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

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

41-
## LocalStack Pro
42-
43-
You can use this chart with LocalStack Pro by:
44-
1. Changing the image to `localstack/localstack-pro`.
45-
2. Providing your Auth Token as an environment variable.
46-
_(API keys are deprecated by Localstack v3.0)_
47-
48-
You can set these values in a YAML file (in this example `pro-values.yaml`):
55+
## Authentication
56+
You can set the auth token in a YAML file (in this example `values.yaml`):
4957
```yaml
50-
image:
51-
repository: localstack/localstack-pro
52-
5358
extraEnvVars:
5459
- name: LOCALSTACK_AUTH_TOKEN
5560
value: "<your auth token>"
5661
```
5762
5863
If you have the LocalStack Auth Token in a secret, you can also reference it directly with `extraEnvVars`:
59-
```
64+
```yaml
6065
extraEnvVars:
6166
- name: LOCALSTACK_AUTH_TOKEN
6267
valueFrom:
6368
secretKeyRef:
6469
name: <name of the secret>
65-
key: <name of the key in the secret containing the API key>
70+
key: <name of the key in the secret containing the auth token>
6671
```
6772

68-
And you can use these values when installing the chart in your cluster:
73+
Then use these values when installing the chart in your cluster:
6974
```bash
7075
$ helm repo add localstack-charts https://localstack.github.io/helm-charts
71-
$ helm install my-release localstack-charts/localstack -f pro-values.yaml
76+
$ helm install my-release localstack-charts/localstack -f values.yaml
7277
```
7378

7479

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

181186
## Change Log
182187

188+
* v0.7.0: Prepare for image consolidation, default to localstack/localstack-pro
189+
* v0.6.0: Upgrade to LocalStack v2
190+
* v0.5.0: Add external service ports, additional configs, k8s lambda executor
183191
* v0.4.2: Remove default ingress annotation
184192
* v0.4.1: Add the ability to set service annotations
185193
* v0.4.0: Add the ability to set annotations on all objects globally and specifically add localstack-init-scripts-config.sh ConfigMap
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# CI test values for chart-testing
2+
# This file is automatically used by the chart-testing tool during CI runs
3+
4+
# Enable debug mode for better test output
5+
debug: true
6+
7+
# Set DNS policy to avoid circular DNS issues in test environments
8+
dnsPolicy: "Default"
9+
10+
# Configure LocalStack auth token from a Kubernetes secret
11+
# The secret is created by the GitHub workflow before running tests
12+
extraEnvVars:
13+
- name: LOCALSTACK_AUTH_TOKEN
14+
valueFrom:
15+
secretKeyRef:
16+
name: localstack-auth-token
17+
key: auth-token
18+
19+
# Enable startup scripts to test initialization
20+
enableStartupScripts: true
21+
startupScriptContent: |
22+
#!/bin/bash
23+
awslocal sqs create-queue --queue-name test-queue

charts/localstack/templates/NOTES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
IMPORTANT: LocalStack requires an auth token to be configured via extraEnvVars.
2+
Ensure you have set LOCALSTACK_AUTH_TOKEN in your values file or the deployment will not function properly.
3+
14
1. Get the application URL by running these commands:
25
{{- if .Values.ingress.enabled }}
36
{{- range $host := .Values.ingress.hosts }}

charts/localstack/test-values.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,21 @@ ingress:
3737
- path: /
3838
pathType: ImplementationSpecific
3939

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

44-
# set the API key from an already existing secret
45-
# extraEnvVars:
46-
# - name: LOCALSTACK_AUTH_TOKEN
47-
# valueFrom:
48-
# secretKeyRef:
49-
# name: <name of the secret containing the API key>
50-
# key: <name of the key in the secret containing the API key>
51-
52-
# or set the API key directly
49+
# Or set the auth token directly:
5350
# extraEnvVars:
5451
# - name: LOCALSTACK_AUTH_TOKEN
55-
# value: "<your api key>"
52+
# value: "<your auth token>"
5653

57-
# enable kubernetes lambda executor (only pro)
54+
# enable kubernetes lambda executor
5855
# lambda:
5956
# executor: "kubernetes"
6057

charts/localstack/values.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ updateStrategy:
1111
type: RollingUpdate
1212

1313
image:
14-
repository: localstack/localstack
14+
repository: localstack/localstack-pro
1515
tag: "latest"
1616
pullPolicy: IfNotPresent
1717

@@ -93,6 +93,15 @@ mountDind:
9393

9494
## All the parameters from the configuatioan can be added using extraEnvVars.
9595
## Ref. https://docs.localstack.cloud/references/configuration/
96+
##
97+
## REQUIRED: LocalStack requires an auth token for all installations.
98+
## You must configure LOCALSTACK_AUTH_TOKEN via extraEnvVars or a secret.
99+
## Example:
100+
## extraEnvVars:
101+
## - name: LOCALSTACK_AUTH_TOKEN
102+
## value: "<your auth token>"
103+
##
104+
## Additional configuration examples:
96105
## extraEnvVars:
97106
## - name: DEFAULT_REGION
98107
## value: "us-east-1"

0 commit comments

Comments
 (0)