Skip to content

Commit

Permalink
Fix - adding secret
Browse files Browse the repository at this point in the history
  • Loading branch information
mproffitt committed Apr 25, 2024
1 parent 52e22a2 commit 8f51e7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions localstack-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ name="localstack"
header "Installing localstack..."
{
kubectl create namespace localstack-system | print_logs $name
yq -ie 'del(.extraenvvars[] | select(.name == "LOCALSTACK_AUTH_TOKEN"))' localstack-values.yaml
yq -ie 'del(.extraEnvVars[] | select(.name == "LOCALSTACK_AUTH_TOKEN"))' localstack-values.yaml
yq -ie '.image.repository = "localstack/localstack"' localstack-values.yaml

if [ -n "$LOCALSTACK_AUTH_TOKEN" ]; then
Expand All @@ -273,7 +273,7 @@ header "Installing localstack..."

# Edit the values file to use the pro image and add the auth token
yq -ie '.image.repository = "localstack/localstack-pro"' localstack-values.yaml
yq -ie '.extraEnvVars += [{"name": "LOCALSTACK_AUTH_TOKEN", "valueFrom": {"secret": {"name": "localstack-auth-token", "key": "token"}}}]' localstack-values.yaml
yq -ie '.extraEnvVars += [{"name": "LOCALSTACK_AUTH_TOKEN", "valueFrom": {"secretKeyRef": {"name": "localstack-auth-token", "key": "token"}}}]' localstack-values.yaml
fi

# rebuild chart dependencies
Expand Down
7 changes: 6 additions & 1 deletion localstack-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ extraEnvVars:
value: debug
- name: LOCALSTACK_AUTH_TOKEN
valueFrom:
secret:
secretKeyRef:
name: localstack-auth-token
key: token
- name: LOCALSTACK_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: localstack-auth-token
key: token
debug: true
Expand Down

0 comments on commit 8f51e7b

Please sign in to comment.