From 84b5fc5ab3cbcedb37a36888adf3c6a8141ba895 Mon Sep 17 00:00:00 2001 From: balopat Date: Thu, 23 May 2019 16:31:58 -0700 Subject: [PATCH] cut v0.30.0 --- CHANGELOG.md | 72 ++++ examples/bazel/skaffold.yaml | 2 +- examples/compose/Dockerfile | 4 +- examples/getting-started/Dockerfile | 4 +- examples/getting-started/skaffold.yaml | 2 +- examples/google-cloud-build/Dockerfile | 4 +- examples/helm-deployment/skaffold-int.yaml | 29 ++ examples/helm-deployment/skaffold.yaml | 2 +- examples/hot-reload/k8s/node.yaml | 29 ++ examples/hot-reload/k8s/python.yaml | 29 ++ examples/hot-reload/node/Dockerfile | 10 +- examples/hot-reload/node/k8s/pod.yaml | 10 - examples/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 | 4 +- examples/hot-reload/python/k8s/pod.yaml | 10 - examples/hot-reload/skaffold.yaml | 6 +- examples/jib-multimodule/pom.xml | 2 +- examples/jib-multimodule/skaffold.yaml | 2 +- examples/jib/pom.xml | 2 +- examples/jib/skaffold.yaml | 2 +- examples/kaniko-local/Dockerfile | 4 +- examples/kaniko-local/skaffold.yaml | 2 +- examples/kaniko/Dockerfile | 4 +- examples/kaniko/skaffold.yaml | 2 +- examples/kustomize/skaffold.yaml | 2 +- examples/microservices/leeroy-app/Dockerfile | 4 +- examples/microservices/leeroy-web/Dockerfile | 4 +- examples/microservices/skaffold.yaml | 2 +- examples/nodejs/backend/Dockerfile | 11 +- examples/nodejs/backend/k8s/pod.yaml | 10 - examples/nodejs/backend/package.json | 2 +- examples/nodejs/k8s/deployment.yaml | 29 ++ examples/nodejs/skaffold.yaml | 9 +- examples/react-reload/app/Dockerfile | 13 +- examples/react-reload/app/k8s/pod.yaml | 10 - examples/react-reload/k8s/deployment.yaml | 29 ++ examples/react-reload/skaffold.yaml | 13 +- examples/structure-tests/Dockerfile | 4 +- examples/structure-tests/skaffold.yaml | 2 +- .../Dockerfile | 4 +- .../skaffold.yaml | 2 +- 44 files changed, 639 insertions(+), 180 deletions(-) create mode 100644 examples/helm-deployment/skaffold-int.yaml create mode 100644 examples/hot-reload/k8s/node.yaml create mode 100644 examples/hot-reload/k8s/python.yaml delete mode 100644 examples/hot-reload/node/k8s/pod.yaml create mode 100644 examples/hot-reload/node/src/index.js delete mode 100644 examples/hot-reload/node/src/server.js delete mode 100644 examples/hot-reload/python/k8s/pod.yaml delete mode 100644 examples/nodejs/backend/k8s/pod.yaml create mode 100644 examples/nodejs/k8s/deployment.yaml delete mode 100644 examples/react-reload/app/k8s/pod.yaml create mode 100644 examples/react-reload/k8s/deployment.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index ab9de9c185b..a23428368f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,75 @@ +# v0.30.0 Release - 05/23/2019 + +*Note*: This release comes with a new config version `v1beta11`. + To upgrade your `skaffold.yaml`, use `skaffold fix`. If you don't upgrade, skaffold will auto-upgrade in memory as best it can, and print a warning message. + See [deprecation-policy.md](/deprecation-policy.md) for details on what beta means. + +New Features: + +* Add support for npm run-script-based launches for `skaffold debug` [#2141](https://github.com/GoogleContainerTools/skaffold/pull/2141) +* Support deploying remote helm charts [#2058](https://github.com/GoogleContainerTools/skaffold/pull/2058) +* Option to mount HostPath in each Kaniko Pod to be used as cache volume [#1690](https://github.com/GoogleContainerTools/skaffold/pull/1690) +* Additional git tagger variants (TreeSha, AbbrevTreeSha) [#1905](https://github.com/GoogleContainerTools/skaffold/pull/1905) +* Enable `skaffold debug` for kustomize [#2043](https://github.com/GoogleContainerTools/skaffold/pull/2043) +* :sparkles: Add option `--no-prune-children` [#2113](https://github.com/GoogleContainerTools/skaffold/pull/2113) +* Turn port forwarding off by default [#2115](https://github.com/GoogleContainerTools/skaffold/pull/2115) + +Bug Fixes: + +* Remove build dependency for helm deploy [#2121](https://github.com/GoogleContainerTools/skaffold/pull/2121) +* Check for env variables for root cmd persistent flags [#2143](https://github.com/GoogleContainerTools/skaffold/pull/2143) +* skaffold debug: log unsupported objects or versions [#2138](https://github.com/GoogleContainerTools/skaffold/pull/2138) +* Don't panic for nil pod watch object [#2112](https://github.com/GoogleContainerTools/skaffold/pull/2112) +* Fix bugs in custom builder [#2130](https://github.com/GoogleContainerTools/skaffold/pull/2130) + +Updates & refactoring: + +* Freeze v1beta10 config [#2109](https://github.com/GoogleContainerTools/skaffold/pull/2109) +* Add Annotations to command and flags per phase annotation. [#2022](https://github.com/GoogleContainerTools/skaffold/pull/2022) +* Add smoke test for `skaffold diagnose` [#2157](https://github.com/GoogleContainerTools/skaffold/pull/2157) +* More tests [#2128](https://github.com/GoogleContainerTools/skaffold/pull/2128) +* Refactor the runner [#2155](https://github.com/GoogleContainerTools/skaffold/pull/2155) +* Remove some old plugin related code from event handler [#2156](https://github.com/GoogleContainerTools/skaffold/pull/2156) +* Test helper to override value for tests [#2147](https://github.com/GoogleContainerTools/skaffold/pull/2147) +* Simpler Travis configuration [#2146](https://github.com/GoogleContainerTools/skaffold/pull/2146) +* Remove duplication around cobra code. [#2145](https://github.com/GoogleContainerTools/skaffold/pull/2145) +* Bring helm integration test back [#2140](https://github.com/GoogleContainerTools/skaffold/pull/2140) +* Use testutil.NewTempDir() instead [#2149](https://github.com/GoogleContainerTools/skaffold/pull/2149) +* Simpler code [#2148](https://github.com/GoogleContainerTools/skaffold/pull/2148) +* Use more recent Golang images [#2132](https://github.com/GoogleContainerTools/skaffold/pull/2132) +* Always use the same technique to cleanup global variables in tests. [#2135](https://github.com/GoogleContainerTools/skaffold/pull/2135) +* Update jib [#2133](https://github.com/GoogleContainerTools/skaffold/pull/2133) + +Docs updates: + +* Fix and improve sync samples [#2131](https://github.com/GoogleContainerTools/skaffold/pull/2131) +* docs: correct header name for jump. [#2079](https://github.com/GoogleContainerTools/skaffold/pull/2079) +* added the notice about skaffold deploy [#2107](https://github.com/GoogleContainerTools/skaffold/pull/2107) +* add explanation to cloud build section docs [#2104](https://github.com/GoogleContainerTools/skaffold/pull/2104) + +Design proposals: + + +* [Design Proposal] Event API v2 [#1949](https://github.com/GoogleContainerTools/skaffold/pull/1949) +* [Design Proposal] Setting proxy for Kaniko Pod [#2064](https://github.com/GoogleContainerTools/skaffold/pull/2064) + + +Huge thanks goes out to all of our contributors for this release: + +- Balint Pato +- Brian de Alwis +- Charles-Henri GUÉRIN +- Cornelius Weig +- David Gageot +- Iván Aponte +- Martin Hoefling +- Nick Kubala +- Persevere Von +- Prashant Arya +- Priya Wadhwa +- Taylor Barrella +- Tejal Desai + # v0.29.0 Release - 05/09/2019 *Note*: This release comes with a new config version `v1beta10`. diff --git a/examples/bazel/skaffold.yaml b/examples/bazel/skaffold.yaml index ab1f0a85340..4bb3583a67f 100644 --- a/examples/bazel/skaffold.yaml +++ b/examples/bazel/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: diff --git a/examples/compose/Dockerfile b/examples/compose/Dockerfile index 184d6cce3e3..ee19dcdf637 100644 --- a/examples/compose/Dockerfile +++ b/examples/compose/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY main.go . RUN go build -o /app main.go -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./app"] COPY --from=builder /app . diff --git a/examples/getting-started/Dockerfile b/examples/getting-started/Dockerfile index 184d6cce3e3..ee19dcdf637 100644 --- a/examples/getting-started/Dockerfile +++ b/examples/getting-started/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY main.go . RUN go build -o /app main.go -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./app"] COPY --from=builder /app . diff --git a/examples/getting-started/skaffold.yaml b/examples/getting-started/skaffold.yaml index 3eedc1153d0..43b0e59bdb5 100644 --- a/examples/getting-started/skaffold.yaml +++ b/examples/getting-started/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: diff --git a/examples/google-cloud-build/Dockerfile b/examples/google-cloud-build/Dockerfile index 184d6cce3e3..ee19dcdf637 100644 --- a/examples/google-cloud-build/Dockerfile +++ b/examples/google-cloud-build/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY main.go . RUN go build -o /app main.go -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./app"] COPY --from=builder /app . diff --git a/examples/helm-deployment/skaffold-int.yaml b/examples/helm-deployment/skaffold-int.yaml new file mode 100644 index 00000000000..c48da1c1480 --- /dev/null +++ b/examples/helm-deployment/skaffold-int.yaml @@ -0,0 +1,29 @@ +# This config should be used for running integration tests purpose only. +# Please use to skaffold.yaml to run this example +apiVersion: skaffold/v1beta10 +kind: Config +build: + tagPolicy: + sha256: {} + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-helm +deploy: + helm: + releases: + # seed test namespace in the release name. + - name: skaffold-helm-{{.TEST_NS}} + chartPath: skaffold-helm + #wait: true + #valuesFiles: + #- helm-skaffold-values.yaml + values: + image: gcr.io/k8s-skaffold/skaffold-helm + #recreatePods will pass --recreate-pods to helm upgrade + #recreatePods: true + #overrides builds an override values.yaml file to run with the helm deploy + #overrides: + # some: + # key: someValue + #setValues get appended to the helm deploy with --set. + #setValues: + #some.key: someValue diff --git a/examples/helm-deployment/skaffold.yaml b/examples/helm-deployment/skaffold.yaml index 62371e20026..a1476db3a73 100644 --- a/examples/helm-deployment/skaffold.yaml +++ b/examples/helm-deployment/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: tagPolicy: diff --git a/examples/hot-reload/k8s/node.yaml b/examples/hot-reload/k8s/node.yaml new file mode 100644 index 00000000000..94ba7d1d989 --- /dev/null +++ b/examples/hot-reload/k8s/node.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Service +metadata: + name: node +spec: + ports: + - port: 3000 + type: LoadBalancer + selector: + app: node +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: node +spec: + 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/examples/hot-reload/k8s/python.yaml b/examples/hot-reload/k8s/python.yaml new file mode 100644 index 00000000000..e4caeac0a0a --- /dev/null +++ b/examples/hot-reload/k8s/python.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Service +metadata: + name: python +spec: + ports: + - port: 5000 + type: LoadBalancer + selector: + app: python +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: python +spec: + selector: + matchLabels: + app: python + template: + metadata: + labels: + app: python + spec: + containers: + - name: python + image: gcr.io/k8s-skaffold/python-reload + ports: + - containerPort: 5000 diff --git a/examples/hot-reload/node/Dockerfile b/examples/hot-reload/node/Dockerfile index d3434e4ed8c..c30f08c7294 100644 --- a/examples/hot-reload/node/Dockerfile +++ b/examples/hot-reload/node/Dockerfile @@ -1,5 +1,9 @@ -FROM gcr.io/k8s-skaffold/nodemon +FROM node:10.15.3-alpine +WORKDIR /app EXPOSE 3000 -CMD ["nodemon","--legacy-watch", "server.js"] -COPY src ./ +CMD ["npm", "run", "dev"] + +COPY package* ./ +RUN npm install +COPY src . diff --git a/examples/hot-reload/node/k8s/pod.yaml b/examples/hot-reload/node/k8s/pod.yaml deleted file mode 100644 index 8fe53e3720e..00000000000 --- a/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/examples/hot-reload/node/package-lock.json b/examples/hot-reload/node/package-lock.json index 640b8eaf7a7..a3ae06edb4d 100644 --- a/examples/hot-reload/node/package-lock.json +++ b/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/examples/hot-reload/node/package.json b/examples/hot-reload/node/package.json index c5e128b7528..80ecc6e25dc 100644 --- a/examples/hot-reload/node/package.json +++ b/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 index.js" + }, + "dependencies": { + "express": "^4.16.4" }, - "dependencies": {}, "devDependencies": { "nodemon": "^1.18.4" } -} +} \ No newline at end of file diff --git a/examples/hot-reload/node/src/index.js b/examples/hot-reload/node/src/index.js new file mode 100644 index 00000000000..b41710e0c40 --- /dev/null +++ b/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/examples/hot-reload/node/src/server.js b/examples/hot-reload/node/src/server.js deleted file mode 100644 index 5115ab9cd63..00000000000 --- a/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/examples/hot-reload/python/Dockerfile b/examples/hot-reload/python/Dockerfile index 69130533813..ff42e63b79d 100644 --- a/examples/hot-reload/python/Dockerfile +++ b/examples/hot-reload/python/Dockerfile @@ -1,5 +1,5 @@ -FROM python:3.7-slim -CMD ["python", "-m", "flask", "run"] +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 diff --git a/examples/hot-reload/python/k8s/pod.yaml b/examples/hot-reload/python/k8s/pod.yaml deleted file mode 100644 index 54634a5c217..00000000000 --- a/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/examples/hot-reload/skaffold.yaml b/examples/hot-reload/skaffold.yaml index a50d3bae198..c2be4b1c964 100644 --- a/examples/hot-reload/skaffold.yaml +++ b/examples/hot-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: @@ -16,7 +16,3 @@ build: - src: 'src/**/*.py' dest: . strip: src/ -deploy: - kubectl: - manifests: - - "**/k8s" diff --git a/examples/jib-multimodule/pom.xml b/examples/jib-multimodule/pom.xml index cbf72e93f64..d742baf9787 100644 --- a/examples/jib-multimodule/pom.xml +++ b/examples/jib-multimodule/pom.xml @@ -38,7 +38,7 @@ com.google.cloud.tools jib-maven-plugin - 1.0.2 + 1.2.0 diff --git a/examples/jib-multimodule/skaffold.yaml b/examples/jib-multimodule/skaffold.yaml index bc693cf6470..ce52f3211f2 100644 --- a/examples/jib-multimodule/skaffold.yaml +++ b/examples/jib-multimodule/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: diff --git a/examples/jib/pom.xml b/examples/jib/pom.xml index fa3f3ae381f..cd1beba57ed 100644 --- a/examples/jib/pom.xml +++ b/examples/jib/pom.xml @@ -34,7 +34,7 @@ com.google.cloud.tools jib-maven-plugin - 1.0.2 + 1.2.0 diff --git a/examples/jib/skaffold.yaml b/examples/jib/skaffold.yaml index affe4a915c6..046bdf2078e 100644 --- a/examples/jib/skaffold.yaml +++ b/examples/jib/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: diff --git a/examples/kaniko-local/Dockerfile b/examples/kaniko-local/Dockerfile index 184d6cce3e3..ee19dcdf637 100644 --- a/examples/kaniko-local/Dockerfile +++ b/examples/kaniko-local/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY main.go . RUN go build -o /app main.go -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./app"] COPY --from=builder /app . diff --git a/examples/kaniko-local/skaffold.yaml b/examples/kaniko-local/skaffold.yaml index 8abe6cfc04b..e169c61ef4f 100644 --- a/examples/kaniko-local/skaffold.yaml +++ b/examples/kaniko-local/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: diff --git a/examples/kaniko/Dockerfile b/examples/kaniko/Dockerfile index 184d6cce3e3..ee19dcdf637 100644 --- a/examples/kaniko/Dockerfile +++ b/examples/kaniko/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY main.go . RUN go build -o /app main.go -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./app"] COPY --from=builder /app . diff --git a/examples/kaniko/skaffold.yaml b/examples/kaniko/skaffold.yaml index f7aee47420f..3f22f1e1046 100644 --- a/examples/kaniko/skaffold.yaml +++ b/examples/kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: diff --git a/examples/kustomize/skaffold.yaml b/examples/kustomize/skaffold.yaml index dc01c6930db..322aa09534a 100644 --- a/examples/kustomize/skaffold.yaml +++ b/examples/kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config deploy: kustomize: {} diff --git a/examples/microservices/leeroy-app/Dockerfile b/examples/microservices/leeroy-app/Dockerfile index 6c10e125d7a..d4cd7f85338 100644 --- a/examples/microservices/leeroy-app/Dockerfile +++ b/examples/microservices/leeroy-app/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY app.go . RUN go build -o /app . -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./app"] COPY --from=builder /app . diff --git a/examples/microservices/leeroy-web/Dockerfile b/examples/microservices/leeroy-web/Dockerfile index fba8dd8007b..a0b2c150952 100644 --- a/examples/microservices/leeroy-web/Dockerfile +++ b/examples/microservices/leeroy-web/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY web.go . RUN go build -o /web . -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./web"] COPY --from=builder /web . diff --git a/examples/microservices/skaffold.yaml b/examples/microservices/skaffold.yaml index 10a758fc9f5..64c096a8af0 100644 --- a/examples/microservices/skaffold.yaml +++ b/examples/microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: diff --git a/examples/nodejs/backend/Dockerfile b/examples/nodejs/backend/Dockerfile index 01ef927e8e4..63001ecbd1f 100644 --- a/examples/nodejs/backend/Dockerfile +++ b/examples/nodejs/backend/Dockerfile @@ -1,10 +1,9 @@ -FROM node:8.12.0-alpine +FROM node:10.15.3-alpine -ARG SCRIPT -ENV SCRIPT ${SCRIPT} -WORKDIR /opt/backend +WORKDIR /app EXPOSE 3000 -CMD ["npm", "run", ${SCRIPT}] +CMD ["npm", "run", "dev"] -COPY . . +COPY package* ./ RUN npm install +COPY . . diff --git a/examples/nodejs/backend/k8s/pod.yaml b/examples/nodejs/backend/k8s/pod.yaml deleted file mode 100644 index 8fe53e3720e..00000000000 --- a/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/examples/nodejs/backend/package.json b/examples/nodejs/backend/package.json index 86589a9cb09..66ddb0badf3 100644 --- a/examples/nodejs/backend/package.json +++ b/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/examples/nodejs/k8s/deployment.yaml b/examples/nodejs/k8s/deployment.yaml new file mode 100644 index 00000000000..94ba7d1d989 --- /dev/null +++ b/examples/nodejs/k8s/deployment.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Service +metadata: + name: node +spec: + ports: + - port: 3000 + type: LoadBalancer + selector: + app: node +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: node +spec: + 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/examples/nodejs/skaffold.yaml b/examples/nodejs/skaffold.yaml index 5b15608c1a3..46e5f678337 100644 --- a/examples/nodejs/skaffold.yaml +++ b/examples/nodejs/skaffold.yaml @@ -1,19 +1,12 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config 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 # with the container src folder - src: 'src/**/*.js' dest: . -deploy: - kubectl: - manifests: - - "backend/k8s/**" diff --git a/examples/react-reload/app/Dockerfile b/examples/react-reload/app/Dockerfile index a3bdaa36a67..16573f2e725 100644 --- a/examples/react-reload/app/Dockerfile +++ b/examples/react-reload/app/Dockerfile @@ -1,16 +1,9 @@ -FROM node:alpine +FROM node:10.15.3-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 . . diff --git a/examples/react-reload/app/k8s/pod.yaml b/examples/react-reload/app/k8s/pod.yaml deleted file mode 100644 index 51aa14b5c00..00000000000 --- a/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 diff --git a/examples/react-reload/k8s/deployment.yaml b/examples/react-reload/k8s/deployment.yaml new file mode 100644 index 00000000000..e4d64794813 --- /dev/null +++ b/examples/react-reload/k8s/deployment.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Service +metadata: + name: node +spec: + ports: + - port: 8080 + type: LoadBalancer + selector: + app: node +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: node +spec: + 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/examples/react-reload/skaffold.yaml b/examples/react-reload/skaffold.yaml index 2adfa800c88..83e561837b2 100644 --- a/examples/react-reload/skaffold.yaml +++ b/examples/react-reload/skaffold.yaml @@ -1,13 +1,12 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: - image: gcr.io/k8s-skaffold/react-reload context: app sync: - 'src/components/*': src/components/ - 'src/styles/*': src/styles/ -deploy: - kubectl: - manifests: - - 'app/k8s/**' + manual: + - src: 'src/components/*' + dest: . + - src: 'src/styles/*' + dest: . diff --git a/examples/structure-tests/Dockerfile b/examples/structure-tests/Dockerfile index 184d6cce3e3..ee19dcdf637 100644 --- a/examples/structure-tests/Dockerfile +++ b/examples/structure-tests/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY main.go . RUN go build -o /app main.go -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./app"] COPY --from=builder /app . diff --git a/examples/structure-tests/skaffold.yaml b/examples/structure-tests/skaffold.yaml index a6e566129ab..1935716fe7c 100644 --- a/examples/structure-tests/skaffold.yaml +++ b/examples/structure-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: diff --git a/examples/tagging-with-environment-variables/Dockerfile b/examples/tagging-with-environment-variables/Dockerfile index 184d6cce3e3..ee19dcdf637 100644 --- a/examples/tagging-with-environment-variables/Dockerfile +++ b/examples/tagging-with-environment-variables/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.10.1-alpine3.7 as builder +FROM golang:1.12.5-alpine3.9 as builder COPY main.go . RUN go build -o /app main.go -FROM alpine:3.7 +FROM alpine:3.9 CMD ["./app"] COPY --from=builder /app . diff --git a/examples/tagging-with-environment-variables/skaffold.yaml b/examples/tagging-with-environment-variables/skaffold.yaml index 23242d5b626..e706296b50c 100644 --- a/examples/tagging-with-environment-variables/skaffold.yaml +++ b/examples/tagging-with-environment-variables/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v1beta10 +apiVersion: skaffold/v1beta11 kind: Config build: artifacts: