From 1c4b17896b9e07c4885e9b1af92b283031bc9ad8 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:04:56 +0200 Subject: [PATCH 01/12] Convert the pod into a proper deployment Signed-off-by: David Gageot --- .../nodejs/backend/k8s/deployment.yaml | 31 +++++++++++++++++++ .../examples/nodejs/backend/k8s/pod.yaml | 10 ------ integration/run_test.go | 2 +- 3 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 integration/examples/nodejs/backend/k8s/deployment.yaml delete mode 100644 integration/examples/nodejs/backend/k8s/pod.yaml diff --git a/integration/examples/nodejs/backend/k8s/deployment.yaml b/integration/examples/nodejs/backend/k8s/deployment.yaml new file mode 100644 index 00000000000..7f879170c8b --- /dev/null +++ b/integration/examples/nodejs/backend/k8s/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + name: node +spec: + ports: + - port: 3000 + name: http + type: LoadBalancer + selector: + app: node +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: node +spec: + replicas: 1 + selector: + matchLabels: + app: node + template: + metadata: + labels: + app: node + spec: + containers: + - name: node + image: gcr.io/k8s-skaffold/node-example + ports: + - containerPort: 3000 diff --git a/integration/examples/nodejs/backend/k8s/pod.yaml b/integration/examples/nodejs/backend/k8s/pod.yaml deleted file mode 100644 index 8fe53e3720e..00000000000 --- a/integration/examples/nodejs/backend/k8s/pod.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: node -spec: - containers: - - name: node - image: gcr.io/k8s-skaffold/node-example - ports: - - containerPort: 3000 diff --git a/integration/run_test.go b/integration/run_test.go index 73ab8022e98..04dd2e2297f 100644 --- a/integration/run_test.go +++ b/integration/run_test.go @@ -46,7 +46,7 @@ func TestRun(t *testing.T) { description: "nodejs", dir: "examples/nodejs", env: []string{"SCRIPT=dev"}, - pods: []string{"node"}, + deployments: []string{"node"}, }, { description: "structure-tests", dir: "examples/structure-tests", From 422e8d85335e7c61ab3e84cbdb1b6793c0c1c431 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:14:50 +0200 Subject: [PATCH 02/12] Always run `dev` script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sample currently doesn’t work Signed-off-by: David Gageot --- integration/examples/nodejs/backend/Dockerfile | 4 +--- integration/examples/nodejs/skaffold.yaml | 3 --- integration/run_test.go | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/integration/examples/nodejs/backend/Dockerfile b/integration/examples/nodejs/backend/Dockerfile index 01ef927e8e4..9f679678e41 100644 --- a/integration/examples/nodejs/backend/Dockerfile +++ b/integration/examples/nodejs/backend/Dockerfile @@ -1,10 +1,8 @@ FROM node:8.12.0-alpine -ARG SCRIPT -ENV SCRIPT ${SCRIPT} WORKDIR /opt/backend EXPOSE 3000 -CMD ["npm", "run", ${SCRIPT}] +CMD ["npm", "run", "dev"] COPY . . RUN npm install diff --git a/integration/examples/nodejs/skaffold.yaml b/integration/examples/nodejs/skaffold.yaml index 5b15608c1a3..06a3e139aed 100644 --- a/integration/examples/nodejs/skaffold.yaml +++ b/integration/examples/nodejs/skaffold.yaml @@ -4,9 +4,6 @@ build: artifacts: - image: gcr.io/k8s-skaffold/node-example context: backend - docker: - buildArgs: - SCRIPT: "{{.SCRIPT}}" sync: manual: # Sync all the javascript files that are in the src folder diff --git a/integration/run_test.go b/integration/run_test.go index 04dd2e2297f..37980bf8bb3 100644 --- a/integration/run_test.go +++ b/integration/run_test.go @@ -45,7 +45,6 @@ func TestRun(t *testing.T) { }, { description: "nodejs", dir: "examples/nodejs", - env: []string{"SCRIPT=dev"}, deployments: []string{"node"}, }, { description: "structure-tests", From 7da7ce32166c94a03f1c90134f2cede4ffe9c80a Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:15:54 +0200 Subject: [PATCH 03/12] Improve caching Signed-off-by: David Gageot --- integration/examples/nodejs/backend/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/examples/nodejs/backend/Dockerfile b/integration/examples/nodejs/backend/Dockerfile index 9f679678e41..9d70d3d6e2d 100644 --- a/integration/examples/nodejs/backend/Dockerfile +++ b/integration/examples/nodejs/backend/Dockerfile @@ -4,5 +4,6 @@ WORKDIR /opt/backend EXPOSE 3000 CMD ["npm", "run", "dev"] -COPY . . +COPY package* ./ RUN npm install +COPY . . From 3418d1b9ba98953f1ace210dc0d5126fb627e886 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:20:16 +0200 Subject: [PATCH 04/12] Convert the pod into a proper deployment Signed-off-by: David Gageot --- .../react-reload/app/k8s/deployment.yaml | 31 +++++++++++++++++++ .../examples/react-reload/app/k8s/pod.yaml | 10 ------ 2 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 integration/examples/react-reload/app/k8s/deployment.yaml delete mode 100644 integration/examples/react-reload/app/k8s/pod.yaml diff --git a/integration/examples/react-reload/app/k8s/deployment.yaml b/integration/examples/react-reload/app/k8s/deployment.yaml new file mode 100644 index 00000000000..9631e2f3ca6 --- /dev/null +++ b/integration/examples/react-reload/app/k8s/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + name: node +spec: + ports: + - port: 8080 + name: http + type: LoadBalancer + selector: + app: node +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: node +spec: + replicas: 1 + selector: + matchLabels: + app: node + template: + metadata: + labels: + app: node + spec: + containers: + - name: react + image: gcr.io/k8s-skaffold/react-reload + ports: + - containerPort: 8080 diff --git a/integration/examples/react-reload/app/k8s/pod.yaml b/integration/examples/react-reload/app/k8s/pod.yaml deleted file mode 100644 index 51aa14b5c00..00000000000 --- a/integration/examples/react-reload/app/k8s/pod.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: react -spec: - containers: - - name: react - image: gcr.io/k8s-skaffold/react-reload - ports: - - containerPort: 8080 From 35ca1c48208d9520c02b863fec14e58314b85d1b Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:24:03 +0200 Subject: [PATCH 05/12] Simpler Dockerfile Signed-off-by: David Gageot --- integration/examples/react-reload/app/Dockerfile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/integration/examples/react-reload/app/Dockerfile b/integration/examples/react-reload/app/Dockerfile index a3bdaa36a67..a503e89dd61 100644 --- a/integration/examples/react-reload/app/Dockerfile +++ b/integration/examples/react-reload/app/Dockerfile @@ -1,16 +1,9 @@ -FROM node:alpine +FROM node:8.12.0-alpine WORKDIR /app -COPY package.json ./ -RUN ["npm", "install"] - -FROM node:alpine - -WORKDIR /app - -COPY --from=0 /app/node_modules node_modules - EXPOSE 8080 CMD ["npm", "run", "dev"] +COPY package* ./ +RUN npm install COPY . . From 7d76f6ae750beefc463577ab79b3de2b7988a72e Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:29:25 +0200 Subject: [PATCH 06/12] Use the new manual sync syntax Signed-off-by: David Gageot --- integration/examples/react-reload/skaffold.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/integration/examples/react-reload/skaffold.yaml b/integration/examples/react-reload/skaffold.yaml index 2adfa800c88..c058bc65cad 100644 --- a/integration/examples/react-reload/skaffold.yaml +++ b/integration/examples/react-reload/skaffold.yaml @@ -5,8 +5,11 @@ build: - image: gcr.io/k8s-skaffold/react-reload context: app sync: - 'src/components/*': src/components/ - 'src/styles/*': src/styles/ + manual: + - src: 'src/components/*' + dest: . + - src: 'src/styles/*' + dest: . deploy: kubectl: manifests: From 33a3aecce80f14a95682b8949a5c80259817972b Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:35:43 +0200 Subject: [PATCH 07/12] Convert the pods into proper deployments Signed-off-by: David Gageot --- .../examples/hot-reload/node/k8s/node.yaml | 31 +++++++++++++++++++ .../examples/hot-reload/node/k8s/pod.yaml | 10 ------ .../examples/hot-reload/python/k8s/pod.yaml | 10 ------ .../hot-reload/python/k8s/python.yaml | 31 +++++++++++++++++++ 4 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 integration/examples/hot-reload/node/k8s/node.yaml delete mode 100644 integration/examples/hot-reload/node/k8s/pod.yaml delete mode 100644 integration/examples/hot-reload/python/k8s/pod.yaml create mode 100644 integration/examples/hot-reload/python/k8s/python.yaml diff --git a/integration/examples/hot-reload/node/k8s/node.yaml b/integration/examples/hot-reload/node/k8s/node.yaml new file mode 100644 index 00000000000..7f879170c8b --- /dev/null +++ b/integration/examples/hot-reload/node/k8s/node.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + name: node +spec: + ports: + - port: 3000 + name: http + type: LoadBalancer + selector: + app: node +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: node +spec: + replicas: 1 + selector: + matchLabels: + app: node + template: + metadata: + labels: + app: node + spec: + containers: + - name: node + image: gcr.io/k8s-skaffold/node-example + ports: + - containerPort: 3000 diff --git a/integration/examples/hot-reload/node/k8s/pod.yaml b/integration/examples/hot-reload/node/k8s/pod.yaml deleted file mode 100644 index 8fe53e3720e..00000000000 --- a/integration/examples/hot-reload/node/k8s/pod.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: node -spec: - containers: - - name: node - image: gcr.io/k8s-skaffold/node-example - ports: - - containerPort: 3000 diff --git a/integration/examples/hot-reload/python/k8s/pod.yaml b/integration/examples/hot-reload/python/k8s/pod.yaml deleted file mode 100644 index 54634a5c217..00000000000 --- a/integration/examples/hot-reload/python/k8s/pod.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: python -spec: - containers: - - name: python - image: gcr.io/k8s-skaffold/python-reload - ports: - - containerPort: 5000 diff --git a/integration/examples/hot-reload/python/k8s/python.yaml b/integration/examples/hot-reload/python/k8s/python.yaml new file mode 100644 index 00000000000..0870a1d1e7c --- /dev/null +++ b/integration/examples/hot-reload/python/k8s/python.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + name: python +spec: + ports: + - port: 5000 + name: http + type: LoadBalancer + selector: + app: python +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: python +spec: + replicas: 1 + selector: + matchLabels: + app: python + template: + metadata: + labels: + app: python + spec: + containers: + - name: python + image: gcr.io/k8s-skaffold/python-reload + ports: + - containerPort: 5000 From 1d5762750c2513313aff620f9b0dacc462398fc7 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:48:39 +0200 Subject: [PATCH 08/12] Fix the hot reload sample Signed-off-by: David Gageot --- .../examples/hot-reload/node/Dockerfile | 10 +- .../hot-reload/node/package-lock.json | 401 +++++++++++++++--- .../examples/hot-reload/node/package.json | 10 +- .../examples/hot-reload/node/src/index.js | 7 + .../examples/hot-reload/node/src/server.js | 14 - .../examples/hot-reload/python/Dockerfile | 2 +- 6 files changed, 373 insertions(+), 71 deletions(-) create mode 100644 integration/examples/hot-reload/node/src/index.js delete mode 100644 integration/examples/hot-reload/node/src/server.js diff --git a/integration/examples/hot-reload/node/Dockerfile b/integration/examples/hot-reload/node/Dockerfile index d3434e4ed8c..7cd898acae0 100644 --- a/integration/examples/hot-reload/node/Dockerfile +++ b/integration/examples/hot-reload/node/Dockerfile @@ -1,5 +1,9 @@ -FROM gcr.io/k8s-skaffold/nodemon +FROM node:8.12.0-alpine +WORKDIR /opt/backend EXPOSE 3000 -CMD ["nodemon","--legacy-watch", "server.js"] -COPY src ./ +CMD ["npm", "run", "dev"] + +COPY package* ./ +RUN npm install +COPY src . diff --git a/integration/examples/hot-reload/node/package-lock.json b/integration/examples/hot-reload/node/package-lock.json index 640b8eaf7a7..a3ae06edb4d 100644 --- a/integration/examples/hot-reload/node/package-lock.json +++ b/integration/examples/hot-reload/node/package-lock.json @@ -1,5 +1,5 @@ { - "name": "node", + "name": "backend", "version": "1.0.0", "lockfileVersion": 1, "requires": true, @@ -10,6 +10,15 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "2.1.21", + "negotiator": "0.6.1" + } + }, "ansi-align": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", @@ -62,6 +71,11 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", @@ -153,6 +167,23 @@ "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", "dev": true }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "1.0.4", + "debug": "2.6.9", + "depd": "1.1.2", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "1.6.16" + } + }, "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", @@ -207,6 +238,11 @@ } } }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -354,6 +390,26 @@ "xdg-basedir": "3.0.0" } }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -393,20 +449,11 @@ "dev": true }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "ms": "2.1.1" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } + "ms": "2.0.0" } }, "decode-uri-component": { @@ -462,6 +509,16 @@ } } }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", @@ -477,12 +534,32 @@ "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, "execa": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", @@ -513,15 +590,6 @@ "to-regex": "3.0.2" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -542,6 +610,43 @@ } } }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "1.1.2", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "2.0.4", + "qs": "6.5.2", + "range-parser": "1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "1.4.0", + "type-is": "1.6.16", + "utils-merge": "1.0.1", + "vary": "1.1.2" + } + }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -651,12 +756,31 @@ } } }, + "finalhandler": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.4.0", + "unpipe": "1.0.0" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -666,6 +790,11 @@ "map-cache": "0.2.2" } }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, "fsevents": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", @@ -1300,6 +1429,25 @@ } } }, + "http-errors": { + "version": "1.6.3", + "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": "1.4.0" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": "2.1.2" + } + }, "ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", @@ -1321,8 +1469,7 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { "version": "1.3.5", @@ -1330,6 +1477,11 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -1603,6 +1755,21 @@ "object-visit": "1.0.1" } }, + "media-typer": { + "version": "0.3.0", + "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -1624,6 +1791,24 @@ "to-regex": "3.0.2" } }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" + }, + "mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "requires": { + "mime-db": "1.37.0" + } + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -1663,8 +1848,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { "version": "2.11.1", @@ -1692,6 +1876,11 @@ "to-regex": "3.0.2" } }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, "nodemon": { "version": "1.18.7", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.7.tgz", @@ -1708,6 +1897,23 @@ "touch": "3.1.0", "undefsafe": "2.0.2", "update-notifier": "2.5.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } } }, "nopt": { @@ -1786,6 +1992,14 @@ "isobject": "3.0.1" } }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -1804,6 +2018,11 @@ "semver": "5.6.0" } }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -1834,6 +2053,11 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -1858,6 +2082,15 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "requires": { + "forwarded": "0.1.2", + "ipaddr.js": "1.8.0" + } + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -1870,6 +2103,27 @@ "integrity": "sha512-vL6NLxNHzkNTjGJUpMm5PLC+94/0tTlC1vkP9bdU0pOHih+EujMjgMTwfZopZvHWRFbqJ5Y73OMoau50PewDDA==", "dev": true }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -1970,8 +2224,7 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", @@ -1982,6 +2235,11 @@ "ret": "0.1.15" } }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", @@ -1997,6 +2255,37 @@ "semver": "5.6.0" } }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "1.1.2", + "destroy": "1.0.4", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.3", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.4.0" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.16.2" + } + }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", @@ -2020,6 +2309,11 @@ } } }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -2057,15 +2351,6 @@ "use": "3.1.1" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -2212,6 +2497,11 @@ } } }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -2327,6 +2617,15 @@ "nopt": "1.0.10" } }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.21" + } + }, "undefsafe": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz", @@ -2334,17 +2633,6 @@ "dev": true, "requires": { "debug": "2.6.9" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } } }, "union-value": { @@ -2391,6 +2679,11 @@ "crypto-random-string": "1.0.0" } }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -2488,6 +2781,16 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/integration/examples/hot-reload/node/package.json b/integration/examples/hot-reload/node/package.json index c5e128b7528..86589a9cb09 100644 --- a/integration/examples/hot-reload/node/package.json +++ b/integration/examples/hot-reload/node/package.json @@ -1,13 +1,15 @@ { - "name": "node", + "name": "backend", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { - "dev": "nodemon server.js" + "dev": "nodemon src/index.js" + }, + "dependencies": { + "express": "^4.16.4" }, - "dependencies": {}, "devDependencies": { "nodemon": "^1.18.4" } -} +} \ No newline at end of file diff --git a/integration/examples/hot-reload/node/src/index.js b/integration/examples/hot-reload/node/src/index.js new file mode 100644 index 00000000000..b41710e0c40 --- /dev/null +++ b/integration/examples/hot-reload/node/src/index.js @@ -0,0 +1,7 @@ +const express = require('express') +const app = express() +const port = 3000 + +app.get('/', (req, res) => res.send('Hello World!')) + +app.listen(port, () => console.log(`Example app listening on port ${port}!`)) diff --git a/integration/examples/hot-reload/node/src/server.js b/integration/examples/hot-reload/node/src/server.js deleted file mode 100644 index 5115ab9cd63..00000000000 --- a/integration/examples/hot-reload/node/src/server.js +++ /dev/null @@ -1,14 +0,0 @@ -const http = require('http'); - -const hostname = '127.0.0.1'; -const port = 3000; - -const server = http.createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World from Node!\n'); -}); - -server.listen(port, hostname, () => { - console.log(`Node server running at http://${hostname}:${port}/`); -}); \ No newline at end of file diff --git a/integration/examples/hot-reload/python/Dockerfile b/integration/examples/hot-reload/python/Dockerfile index 69130533813..75961501307 100644 --- a/integration/examples/hot-reload/python/Dockerfile +++ b/integration/examples/hot-reload/python/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.7-slim -CMD ["python", "-m", "flask", "run"] +CMD ["python", "-m", "flask", "run", "--host=0.0.0.0"] ENV FLASK_DEBUG=1 ENV FLASK_APP=app.py From 0082bc2624624cbeb914aa08fe3e3e7dcbf639a8 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:52:09 +0200 Subject: [PATCH 09/12] Simplify k8s configuration Signed-off-by: David Gageot --- integration/examples/hot-reload/{node => }/k8s/node.yaml | 4 +--- integration/examples/hot-reload/{python => }/k8s/python.yaml | 4 +--- integration/examples/hot-reload/skaffold.yaml | 4 ---- integration/examples/nodejs/{backend => }/k8s/deployment.yaml | 4 +--- integration/examples/nodejs/skaffold.yaml | 4 ---- .../examples/react-reload/{app => }/k8s/deployment.yaml | 4 +--- integration/examples/react-reload/skaffold.yaml | 4 ---- 7 files changed, 4 insertions(+), 24 deletions(-) rename integration/examples/hot-reload/{node => }/k8s/node.yaml (89%) rename integration/examples/hot-reload/{python => }/k8s/python.yaml (90%) rename integration/examples/nodejs/{backend => }/k8s/deployment.yaml (89%) rename integration/examples/react-reload/{app => }/k8s/deployment.yaml (89%) diff --git a/integration/examples/hot-reload/node/k8s/node.yaml b/integration/examples/hot-reload/k8s/node.yaml similarity index 89% rename from integration/examples/hot-reload/node/k8s/node.yaml rename to integration/examples/hot-reload/k8s/node.yaml index 7f879170c8b..94ba7d1d989 100644 --- a/integration/examples/hot-reload/node/k8s/node.yaml +++ b/integration/examples/hot-reload/k8s/node.yaml @@ -4,8 +4,7 @@ metadata: name: node spec: ports: - - port: 3000 - name: http + - port: 3000 type: LoadBalancer selector: app: node @@ -15,7 +14,6 @@ kind: Deployment metadata: name: node spec: - replicas: 1 selector: matchLabels: app: node diff --git a/integration/examples/hot-reload/python/k8s/python.yaml b/integration/examples/hot-reload/k8s/python.yaml similarity index 90% rename from integration/examples/hot-reload/python/k8s/python.yaml rename to integration/examples/hot-reload/k8s/python.yaml index 0870a1d1e7c..e4caeac0a0a 100644 --- a/integration/examples/hot-reload/python/k8s/python.yaml +++ b/integration/examples/hot-reload/k8s/python.yaml @@ -4,8 +4,7 @@ metadata: name: python spec: ports: - - port: 5000 - name: http + - port: 5000 type: LoadBalancer selector: app: python @@ -15,7 +14,6 @@ kind: Deployment metadata: name: python spec: - replicas: 1 selector: matchLabels: app: python diff --git a/integration/examples/hot-reload/skaffold.yaml b/integration/examples/hot-reload/skaffold.yaml index a50d3bae198..4f0b69e1757 100644 --- a/integration/examples/hot-reload/skaffold.yaml +++ b/integration/examples/hot-reload/skaffold.yaml @@ -16,7 +16,3 @@ build: - src: 'src/**/*.py' dest: . strip: src/ -deploy: - kubectl: - manifests: - - "**/k8s" diff --git a/integration/examples/nodejs/backend/k8s/deployment.yaml b/integration/examples/nodejs/k8s/deployment.yaml similarity index 89% rename from integration/examples/nodejs/backend/k8s/deployment.yaml rename to integration/examples/nodejs/k8s/deployment.yaml index 7f879170c8b..94ba7d1d989 100644 --- a/integration/examples/nodejs/backend/k8s/deployment.yaml +++ b/integration/examples/nodejs/k8s/deployment.yaml @@ -4,8 +4,7 @@ metadata: name: node spec: ports: - - port: 3000 - name: http + - port: 3000 type: LoadBalancer selector: app: node @@ -15,7 +14,6 @@ kind: Deployment metadata: name: node spec: - replicas: 1 selector: matchLabels: app: node diff --git a/integration/examples/nodejs/skaffold.yaml b/integration/examples/nodejs/skaffold.yaml index 06a3e139aed..9bd09299d21 100644 --- a/integration/examples/nodejs/skaffold.yaml +++ b/integration/examples/nodejs/skaffold.yaml @@ -10,7 +10,3 @@ build: # with the container src folder - src: 'src/**/*.js' dest: . -deploy: - kubectl: - manifests: - - "backend/k8s/**" diff --git a/integration/examples/react-reload/app/k8s/deployment.yaml b/integration/examples/react-reload/k8s/deployment.yaml similarity index 89% rename from integration/examples/react-reload/app/k8s/deployment.yaml rename to integration/examples/react-reload/k8s/deployment.yaml index 9631e2f3ca6..e4d64794813 100644 --- a/integration/examples/react-reload/app/k8s/deployment.yaml +++ b/integration/examples/react-reload/k8s/deployment.yaml @@ -4,8 +4,7 @@ metadata: name: node spec: ports: - - port: 8080 - name: http + - port: 8080 type: LoadBalancer selector: app: node @@ -15,7 +14,6 @@ kind: Deployment metadata: name: node spec: - replicas: 1 selector: matchLabels: app: node diff --git a/integration/examples/react-reload/skaffold.yaml b/integration/examples/react-reload/skaffold.yaml index c058bc65cad..0242de9a407 100644 --- a/integration/examples/react-reload/skaffold.yaml +++ b/integration/examples/react-reload/skaffold.yaml @@ -10,7 +10,3 @@ build: dest: . - src: 'src/styles/*' dest: . -deploy: - kubectl: - manifests: - - 'app/k8s/**' From 940e3d8c5d731e7c091c1e2087f53c363f06dd7c Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:58:48 +0200 Subject: [PATCH 10/12] Use more recent nodejs image Signed-off-by: David Gageot --- integration/examples/hot-reload/node/Dockerfile | 4 ++-- integration/examples/hot-reload/node/package.json | 2 +- integration/examples/nodejs/backend/Dockerfile | 4 ++-- integration/examples/nodejs/backend/package.json | 2 +- integration/examples/react-reload/app/Dockerfile | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/integration/examples/hot-reload/node/Dockerfile b/integration/examples/hot-reload/node/Dockerfile index 7cd898acae0..c30f08c7294 100644 --- a/integration/examples/hot-reload/node/Dockerfile +++ b/integration/examples/hot-reload/node/Dockerfile @@ -1,6 +1,6 @@ -FROM node:8.12.0-alpine +FROM node:10.15.3-alpine -WORKDIR /opt/backend +WORKDIR /app EXPOSE 3000 CMD ["npm", "run", "dev"] diff --git a/integration/examples/hot-reload/node/package.json b/integration/examples/hot-reload/node/package.json index 86589a9cb09..66ddb0badf3 100644 --- a/integration/examples/hot-reload/node/package.json +++ b/integration/examples/hot-reload/node/package.json @@ -2,7 +2,7 @@ "name": "backend", "version": "1.0.0", "description": "", - "main": "index.js", + "main": "src/index.js", "scripts": { "dev": "nodemon src/index.js" }, diff --git a/integration/examples/nodejs/backend/Dockerfile b/integration/examples/nodejs/backend/Dockerfile index 9d70d3d6e2d..63001ecbd1f 100644 --- a/integration/examples/nodejs/backend/Dockerfile +++ b/integration/examples/nodejs/backend/Dockerfile @@ -1,6 +1,6 @@ -FROM node:8.12.0-alpine +FROM node:10.15.3-alpine -WORKDIR /opt/backend +WORKDIR /app EXPOSE 3000 CMD ["npm", "run", "dev"] diff --git a/integration/examples/nodejs/backend/package.json b/integration/examples/nodejs/backend/package.json index 86589a9cb09..66ddb0badf3 100644 --- a/integration/examples/nodejs/backend/package.json +++ b/integration/examples/nodejs/backend/package.json @@ -2,7 +2,7 @@ "name": "backend", "version": "1.0.0", "description": "", - "main": "index.js", + "main": "src/index.js", "scripts": { "dev": "nodemon src/index.js" }, diff --git a/integration/examples/react-reload/app/Dockerfile b/integration/examples/react-reload/app/Dockerfile index a503e89dd61..16573f2e725 100644 --- a/integration/examples/react-reload/app/Dockerfile +++ b/integration/examples/react-reload/app/Dockerfile @@ -1,4 +1,4 @@ -FROM node:8.12.0-alpine +FROM node:10.15.3-alpine WORKDIR /app EXPOSE 8080 From 7d628410d330a7805e0df187dcb388f08c2b0bcb Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 May 2019 11:59:59 +0200 Subject: [PATCH 11/12] Use smaller python base image Signed-off-by: David Gageot --- integration/examples/hot-reload/python/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/examples/hot-reload/python/Dockerfile b/integration/examples/hot-reload/python/Dockerfile index 75961501307..ff42e63b79d 100644 --- a/integration/examples/hot-reload/python/Dockerfile +++ b/integration/examples/hot-reload/python/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.7-slim +FROM python:3.7.3-alpine3.9 CMD ["python", "-m", "flask", "run", "--host=0.0.0.0"] ENV FLASK_DEBUG=1 ENV FLASK_APP=app.py From 56ed26cec8406e2d88e33d515f13110144bd25a3 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Fri, 17 May 2019 14:33:00 +0200 Subject: [PATCH 12/12] Fix package.json Signed-off-by: David Gageot --- integration/examples/hot-reload/node/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/examples/hot-reload/node/package.json b/integration/examples/hot-reload/node/package.json index 66ddb0badf3..80ecc6e25dc 100644 --- a/integration/examples/hot-reload/node/package.json +++ b/integration/examples/hot-reload/node/package.json @@ -2,9 +2,9 @@ "name": "backend", "version": "1.0.0", "description": "", - "main": "src/index.js", + "main": "index.js", "scripts": { - "dev": "nodemon src/index.js" + "dev": "nodemon index.js" }, "dependencies": { "express": "^4.16.4"