-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that the exit code of 'odo dev' matches the error returned by th…
…e cleanup logic
- Loading branch information
Showing
3 changed files
with
105 additions
and
6 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...e/devfiles/nodejs/devfile-with-container-failing-to-terminate-before-cleanup-timeout.yaml
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
schemaVersion: 2.1.0 | ||
metadata: | ||
name: nodejs | ||
displayName: Node.js Runtime | ||
description: Node.js 16 application | ||
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg | ||
tags: | ||
- Node.js | ||
- Express | ||
- ubi8 | ||
projectType: Node.js | ||
language: JavaScript | ||
version: 2.1.1 | ||
starterProjects: | ||
- name: nodejs-starter | ||
git: | ||
remotes: | ||
origin: 'https://github.com/odo-devfiles/nodejs-ex.git' | ||
attributes: | ||
pod-overrides: | ||
spec: | ||
# This is purposely more than the cleanup timeout (currently set to 1 minute), so that the cleanup does not succeed when the dev session is stopped. | ||
terminationGracePeriodSeconds: 70 | ||
components: | ||
- name: runtime | ||
attributes: | ||
container-overrides: | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: [ "/bin/sh", "-c", "echo pre-stop running forever... && while true; do echo -n . ; sleep 2; done" ] | ||
container: | ||
image: registry.access.redhat.com/ubi8/nodejs-16:latest | ||
args: ['tail', '-f', '/dev/null'] | ||
memoryLimit: 1024Mi | ||
mountSources: true | ||
env: | ||
- name: DEBUG_PORT | ||
value: '5858' | ||
endpoints: | ||
- name: http-node | ||
targetPort: 3000 | ||
- exposure: none | ||
name: debug | ||
targetPort: 5858 |
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