Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template/*-rest-api: Clean up templated environment variables #1562

Merged
merged 1 commit into from
May 22, 2024
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: 11 additions & 0 deletions .changeset/violet-crabs-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'skuba': patch
---

template/\*-rest-api: Clean up templated environment variables

- `AWS_NODEJS_CONNECTION_REUSE_ENABLED` is no longer required with AWS SDK V3.

- The `env` boilerplate in Gantry values files was largely unnecessary and confusing.

Our templates prefer to declare configuration values directly in `src/config.ts`.
2 changes: 0 additions & 2 deletions template/express-rest-api/.gantry/dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
environment: dev
env:
SOME_ENVIRONMENT_VARIABLE: dev-value

maxInstanceCount: 1
minInstanceCount: 1
Expand Down
2 changes: 0 additions & 2 deletions template/express-rest-api/.gantry/prod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
environment: prod
env:
SOME_ENVIRONMENT_VARIABLE: prod-value

maxInstanceCount: 10
minInstanceCount: 3
7 changes: 0 additions & 7 deletions template/express-rest-api/gantry.apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,9 @@ owner: '{{values "owner"}}'
image: '{{values "image"}}'

env:
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1'

ENVIRONMENT: '{{values "environment"}}'
SERVICE: '{{values "service"}}'

{{range $key, $value := .Values.env}}
{{$key}}: {{$value}}
{{end}}

{{if .Values.cloudwatchDashboardDisabled}}
cloudwatchDashboardDisabled: {{values "cloudwatchDashboardDisabled"}}
{{end}}
Expand Down
2 changes: 0 additions & 2 deletions template/koa-rest-api/.gantry/dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
environment: dev
env:
SOME_ENVIRONMENT_VARIABLE: dev-value

maxInstanceCount: 1
minInstanceCount: 1
Expand Down
2 changes: 0 additions & 2 deletions template/koa-rest-api/.gantry/prod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
environment: prod
env:
SOME_ENVIRONMENT_VARIABLE: prod-value

maxInstanceCount: 10
minInstanceCount: 3
Expand Down
7 changes: 0 additions & 7 deletions template/koa-rest-api/gantry.apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ owner: '{{values "owner"}}'
image: '{{values "image"}}'

env:
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1'

ENVIRONMENT: '{{values "environment"}}'
OPENTELEMETRY_ENABLED: '{{.Values.openTelemetry.enabled | default false}}'
SERVICE: '{{values "service"}}'

{{range $key, $value := .Values.env}}
{{$key}}: {{$value}}
{{end}}

{{if .Values.cloudwatchDashboardDisabled}}
cloudwatchDashboardDisabled: {{values "cloudwatchDashboardDisabled"}}
{{end}}
Expand Down
Loading