-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helm): store garden metadata in configmap instead of helm values (…
…#5827) * feat(helm): store garden metadata in configmap instead of helm values * chore: fix test and add undefined check * chore: use runtimeError
- Loading branch information
Showing
8 changed files
with
268 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
core/test/data/test-projects/helm-local-mode/backend-image/garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
kind: Module | ||
kind: Build | ||
description: Image for the backend service | ||
type: container | ||
name: backend-image |
66 changes: 30 additions & 36 deletions
66
core/test/data/test-projects/helm-local-mode/backend/garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,35 @@ | ||
kind: Module | ||
kind: Deploy | ||
name: backend | ||
description: Helm chart for the backend service | ||
type: helm | ||
dependencies: | ||
- build.backend-image | ||
spec: | ||
localMode: | ||
ports: | ||
- local: 8090 | ||
remote: 8080 | ||
# starts the local application | ||
command: [ ] | ||
target: | ||
kind: Deployment | ||
name: backend | ||
containerName: backend | ||
|
||
localMode: | ||
ports: | ||
- local: 8090 | ||
remote: 8080 | ||
# starts the local application | ||
command: [ ] | ||
target: | ||
kind: Deployment | ||
name: backend | ||
containerName: backend | ||
# this is here to test that local mode always take precedence over sync mode | ||
sync: | ||
paths: | ||
- target: | ||
kind: Deployment | ||
name: backend | ||
containerPath: /app | ||
mode: one-way | ||
|
||
# this is here to test that local mode always take precedence over sync mode | ||
sync: | ||
paths: | ||
- target: /app | ||
mode: one-way | ||
|
||
serviceResource: | ||
kind: Deployment | ||
containerModule: backend-image | ||
|
||
build: | ||
dependencies: [ "backend-image" ] | ||
|
||
values: | ||
image: | ||
repository: ${modules.backend-image.outputs.deployment-image-name} | ||
tag: ${modules.backend-image.version} | ||
ingress: | ||
enabled: true | ||
paths: [ "/hello-backend" ] | ||
hosts: [ "backend.${var.baseHostname}" ] | ||
|
||
tasks: | ||
- name: test | ||
command: [ "sh", "-c", "echo task output" ] | ||
values: | ||
image: | ||
repository: ${actions.build.backend-image.outputs.deployment-image-name} | ||
tag: ${actions.build.backend-image.version} | ||
ingress: | ||
enabled: true | ||
paths: [ "/hello-backend" ] | ||
hosts: [ "backend.${var.baseHostname}" ] |
58 changes: 34 additions & 24 deletions
58
core/test/data/test-projects/helm-local-mode/frontend/garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
kind: Module | ||
kind: Deploy | ||
name: frontend | ||
description: Frontend service container | ||
type: container | ||
services: | ||
- name: frontend | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
healthCheck: | ||
httpGet: | ||
path: /hello-frontend | ||
port: http | ||
ingresses: | ||
- path: /hello-frontend | ||
port: http | ||
- path: /call-backend | ||
port: http | ||
dependencies: | ||
- backend | ||
tests: | ||
- name: unit | ||
args: [npm, test] | ||
- name: integ | ||
args: [npm, run, integ] | ||
dependencies: | ||
- frontend | ||
dependencies: | ||
- deploy.backend | ||
spec: | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
healthCheck: | ||
httpGet: | ||
path: /hello-frontend | ||
port: http | ||
ingresses: | ||
- path: /hello-frontend | ||
port: http | ||
- path: /call-backend | ||
port: http | ||
--- | ||
kind: Test | ||
name: frontend-unit | ||
description: Frontend service unit tests | ||
type: container | ||
dependencies: | ||
- deploy.frontend | ||
spec: | ||
command: [npm, test] | ||
--- | ||
kind: Test | ||
name: frontend-integ | ||
description: Frontend service integ tests | ||
type: container | ||
dependencies: | ||
- deploy.frontend | ||
spec: | ||
command: [npm, run, integ] |
Oops, something went wrong.