diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aa2a9ea4ad..c9eeac6b807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,116 @@ +# v1.35.0 Release - 11/16/2021 +**Linux amd64** +`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.35.0/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin` + +**Linux arm64** +`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.35.0/skaffold-linux-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin` + +**macOS amd64** +`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.35.0/skaffold-darwin-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin` + +**macOS arm64** +`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.35.0/skaffold-darwin-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin` + +**Windows** +https://storage.googleapis.com/skaffold/releases/v1.35.0/skaffold-windows-amd64.exe + +**Docker image** +`gcr.io/k8s-skaffold/skaffold:v1.35.0` + +Note: This release comes with a new config version, `v2beta26`. To upgrade your skaffold.yaml, use `skaffold fix`. If you choose not to upgrade, skaffold will auto-upgrade as best as it can. + +Highlights: +* [alpha] Skaffold now natively supports `ko` builder for golang projects. Please try it out and let us [know](https://skaffold.dev/docs/pipeline-stages/builders/ko/) +* Skaffold now performs status-check for stateful sets [#6828](https://github.com/GoogleContainerTools/skaffold/pull/6828) + +New Features and Additions: +* feat: add lts image, cloud build triggers [#6844](https://github.com/GoogleContainerTools/skaffold/pull/6844) +* feat: introduce --output option for "fix" cmd [#6849](https://github.com/GoogleContainerTools/skaffold/pull/6849) +* feat: add pullParent support for docker builds [#6825](https://github.com/GoogleContainerTools/skaffold/pull/6825) +* feat: add k8s manifest support to skaffold lint and one sample rule [#6795](https://github.com/GoogleContainerTools/skaffold/pull/6795) +* feat: write skaffold logs from current run to file [#6803](https://github.com/GoogleContainerTools/skaffold/pull/6803) +* feat: add dockerfile support to skaffold lint and top 2 dockerfile rules [#6793](https://github.com/GoogleContainerTools/skaffold/pull/6793) +* feat: Enable ko builder (alpha) in schema [#6811](https://github.com/GoogleContainerTools/skaffold/pull/6811) +* feat(ko): Add ko builder to local artifact builder [#6785](https://github.com/GoogleContainerTools/skaffold/pull/6785) +* feat(ko): Enable the ko builder in the API [#6820](https://github.com/GoogleContainerTools/skaffold/pull/6820) +* feat: add support for Kaniko flag --cache-copy-layers [#6703](https://github.com/GoogleContainerTools/skaffold/pull/6703) +* feat: set kpt inventory configs for render and deploy [#6712](https://github.com/GoogleContainerTools/skaffold/pull/6712) +* feat: add dry run option to skaffold delete [#6655](https://github.com/GoogleContainerTools/skaffold/pull/6655) +* feat: status check for config-connector [#6766](https://github.com/GoogleContainerTools/skaffold/pull/6766) +* feat: enable render in `skaffold run` v2. [#6761](https://github.com/GoogleContainerTools/skaffold/pull/6761) +* feat: Add Labels to Metadata [#6782](https://github.com/GoogleContainerTools/skaffold/pull/6782) + + +Fixes: +* fix: interface conversion error for pod event [#6863](https://github.com/GoogleContainerTools/skaffold/pull/6863) +* fix: add diagnostic severity info to skaffold lint rules [#6862](https://github.com/GoogleContainerTools/skaffold/pull/6862) +* fix: Add skaffold internal error and return that instead of user cancelled [#6846](https://github.com/GoogleContainerTools/skaffold/pull/6846) +* fix: make kcc status-check less aggressive [#6841](https://github.com/GoogleContainerTools/skaffold/pull/6841) +* fix(log): Send Go std `log` to `logrus`, and output `ggcr` logs [#6815](https://github.com/GoogleContainerTools/skaffold/pull/6815) +* fix: fix nil pointer issue for skaff lint when encountering skaffold.yaml with no k8s manifests [#6832](https://github.com/GoogleContainerTools/skaffold/pull/6832) +* fix: fix multi-module issue for skaffold lint dockerfile support [#6831](https://github.com/GoogleContainerTools/skaffold/pull/6831) +* fix: `deploy --skip-render` not applying skaffold labels, causes status check to not work [#6838](https://github.com/GoogleContainerTools/skaffold/pull/6838) +* fix: update windows ci description to be correct [#6830](https://github.com/GoogleContainerTools/skaffold/pull/6830) +* fix: fix skaff lint field selector to work more broadly [#6834](https://github.com/GoogleContainerTools/skaffold/pull/6834) +* fix: Fix build pipeline to always build dependencies. [#6823](https://github.com/GoogleContainerTools/skaffold/pull/6823) +* fix(sync): more descriptive error for custom build inferred sync misconfiguration [#6778](https://github.com/GoogleContainerTools/skaffold/pull/6778) +* fix(ko): Fall back to build configs in `.ko.yaml` [#6821](https://github.com/GoogleContainerTools/skaffold/pull/6821) +* fix: propagate-profiles flag missing from `skaffold inspect` command [#6818](https://github.com/GoogleContainerTools/skaffold/pull/6818) +* fix: `skaffold inspect` commands should have non-zero exit-code on error [#6807](https://github.com/GoogleContainerTools/skaffold/pull/6807) +* fix(ko): Fix ko build config path matching [#6797](https://github.com/GoogleContainerTools/skaffold/pull/6797) +* fix(helm): handle templated namespaces consistently [#6767](https://github.com/GoogleContainerTools/skaffold/pull/6767) +* fix: Quotes in dockerfiles env vars break copy dependency checks [#6796](https://github.com/GoogleContainerTools/skaffold/pull/6796) +* fix(find-configs): log skaffold.yaml parsing errors at debug [#6748](https://github.com/GoogleContainerTools/skaffold/pull/6748) + +Updates and Refactors: +* refactor: group/alphabetize skaffold options [#6853](https://github.com/GoogleContainerTools/skaffold/pull/6853) +* chore: upgrade k3d to latest bugfix-version [#6781](https://github.com/GoogleContainerTools/skaffold/pull/6781) +* chore: make test env check output what was found [#6744](https://github.com/GoogleContainerTools/skaffold/pull/6744) +* chore(deps): bump puma from 4.3.8 to 4.3.9 in /examples/ruby/backend [#6771](https://github.com/GoogleContainerTools/skaffold/pull/6771) +* chore: add script to improve QOL when doing release [#6774](https://github.com/GoogleContainerTools/skaffold/pull/6774) +* chore(deps): update to kompose 1.26 [#6865](https://github.com/GoogleContainerTools/skaffold/pull/6865) +* refactor: organize event v2 functions [#6802](https://github.com/GoogleContainerTools/skaffold/pull/6802) + +Docs, Test, and Release Updates: +* docs: link to Cloud Code in github README [#6864](https://github.com/GoogleContainerTools/skaffold/pull/6864) +* docs(debug): Improve Go debugging documentation [#6852](https://github.com/GoogleContainerTools/skaffold/pull/6852) +* docs(ko): Improve ko docs for existing ko users [#6826](https://github.com/GoogleContainerTools/skaffold/pull/6826) +* docs: Move Docker deployer to beta [#6850](https://github.com/GoogleContainerTools/skaffold/pull/6850) +* doc: add scoop-extras installation details [#6847](https://github.com/GoogleContainerTools/skaffold/pull/6847) +* docs(ko): Shorter example values in config schema [#6837](https://github.com/GoogleContainerTools/skaffold/pull/6837) +* docs(ko): Update debug docs for ko images [#6833](https://github.com/GoogleContainerTools/skaffold/pull/6833) +* docs(ko): Templating in `flags` and `ldflags` [#6798](https://github.com/GoogleContainerTools/skaffold/pull/6798) +* docs(ko): Document the ko builder [#6792](https://github.com/GoogleContainerTools/skaffold/pull/6792) +* doc: add `minikube start` to the quickstart documentation [#6783](https://github.com/GoogleContainerTools/skaffold/pull/6783) +* docs: skaffold apply supports status check [#6779](https://github.com/GoogleContainerTools/skaffold/pull/6779) + ing static port usage for relevant deployed resources [#6776](https://github.com/GoogleContainerTools/skaffold/pull/6776) +* docs: add release stage plan to ko builder design doc [#6764](https://github.com/GoogleContainerTools/skaffold/pull/6764) +* docs: Clarify custom local dependencies example [#6827](https://github.com/GoogleContainerTools/skaffold/pull/6827) +* test(ko): Simple integration test for ko builder [#6788](https://github.com/GoogleContainerTools/skaffold/pull/6788) +* test: add integration test for config connector status check [#6839](https://github.com/GoogleContainerTools/skaffold/pull/6839) +* test: fix integration test for stateful-sets [#6829](https://github.com/GoogleContainerTools/skaffold/pull/6829) +* test: update modules testcases [#6813](https://github.com/GoogleContainerTools/skaffold/pull/6813) +* ci: add cancel-workflow-action functionality to all github workflows [#6755](https://github.com/GoogleContainerTools/skaffold/pull/6755) + + +Huge thanks goes out to all of our contributors for this release: + +- Aaron Prindle +- Ahmet Alp Balkan +- Brian de Alwis +- Conor A. Callahan +- Erik Godding Boye +- Gaurav +- Halvard Skogsrud +- Jeremy Lewi +- Marlon Gamez +- Max Brauer +- Nick Kubala +- Pablo Caderno +- Rouan van der Ende +- Tejal Desai +- jrcast + # v1.34.0 Release - 10/26/2021 **Linux** `curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.34.0/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin` diff --git a/examples/bazel/skaffold.yaml b/examples/bazel/skaffold.yaml index e6be943da94..26c46520bf4 100644 --- a/examples/bazel/skaffold.yaml +++ b/examples/bazel/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/buildpacks-java/skaffold.yaml b/examples/buildpacks-java/skaffold.yaml index 17871ca7146..44be6b9fe1b 100644 --- a/examples/buildpacks-java/skaffold.yaml +++ b/examples/buildpacks-java/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/buildpacks-node/skaffold.yaml b/examples/buildpacks-node/skaffold.yaml index 156a0631734..b29bd1ef422 100644 --- a/examples/buildpacks-node/skaffold.yaml +++ b/examples/buildpacks-node/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/buildpacks-python/skaffold.yaml b/examples/buildpacks-python/skaffold.yaml index 39cfeda85b3..c19195a7ef8 100644 --- a/examples/buildpacks-python/skaffold.yaml +++ b/examples/buildpacks-python/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/buildpacks/skaffold.yaml b/examples/buildpacks/skaffold.yaml index 6673d039cf7..6dcf471b752 100644 --- a/examples/buildpacks/skaffold.yaml +++ b/examples/buildpacks/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/custom-buildx/skaffold.yaml b/examples/custom-buildx/skaffold.yaml index 017b799e493..f5ebeff469b 100644 --- a/examples/custom-buildx/skaffold.yaml +++ b/examples/custom-buildx/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/custom-tests/skaffold.yaml b/examples/custom-tests/skaffold.yaml index 32c6f502634..06e48c43189 100644 --- a/examples/custom-tests/skaffold.yaml +++ b/examples/custom-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/custom/README.md b/examples/custom/README.md index 277c905c59b..bf6a01f44a8 100644 --- a/examples/custom/README.md +++ b/examples/custom/README.md @@ -1,5 +1,10 @@ ### Example: use the custom builder with ko +**Note:** Skaffold now includes a +[`ko` builder](https://skaffold.dev/docs/pipeline-stages/builders/ko/). +When you use the `ko` builder, you do not need to provide a custom build shell +script or install the `ko` binary. + [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/GoogleContainerTools/skaffold&cloudshell_open_in_editor=README.md&cloudshell_workspace=examples/custom) This example shows how the custom builder can be used to diff --git a/examples/custom/skaffold.yaml b/examples/custom/skaffold.yaml index 279eb2ace24..df2571e5fe0 100644 --- a/examples/custom/skaffold.yaml +++ b/examples/custom/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/dev-journey-buildpacks/skaffold.yaml b/examples/dev-journey-buildpacks/skaffold.yaml index c9dcd25ffbd..22e7ebde326 100644 --- a/examples/dev-journey-buildpacks/skaffold.yaml +++ b/examples/dev-journey-buildpacks/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/docker-deploy/skaffold.yaml b/examples/docker-deploy/skaffold.yaml index 15727e9323a..20926943e2e 100644 --- a/examples/docker-deploy/skaffold.yaml +++ b/examples/docker-deploy/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: local: diff --git a/examples/gcb-kaniko/skaffold.yaml b/examples/gcb-kaniko/skaffold.yaml index b30183aec99..c7881431783 100644 --- a/examples/gcb-kaniko/skaffold.yaml +++ b/examples/gcb-kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: googleCloudBuild: diff --git a/examples/generate-pipeline/skaffold.yaml b/examples/generate-pipeline/skaffold.yaml index d2c72dcb7e1..c9037817b49 100644 --- a/examples/generate-pipeline/skaffold.yaml +++ b/examples/generate-pipeline/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/getting-started-kustomize/skaffold.yaml b/examples/getting-started-kustomize/skaffold.yaml index c8f21bd9053..6b30b2c1432 100644 --- a/examples/getting-started-kustomize/skaffold.yaml +++ b/examples/getting-started-kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config metadata: name: getting-started-kustomize diff --git a/examples/getting-started/skaffold.yaml b/examples/getting-started/skaffold.yaml index 16b56d351b2..f803c1782a9 100644 --- a/examples/getting-started/skaffold.yaml +++ b/examples/getting-started/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/google-cloud-build/skaffold.yaml b/examples/google-cloud-build/skaffold.yaml index 6f0fe6f6c44..49f58397a88 100644 --- a/examples/google-cloud-build/skaffold.yaml +++ b/examples/google-cloud-build/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: googleCloudBuild: diff --git a/examples/helm-deployment-dependencies/skaffold.yaml b/examples/helm-deployment-dependencies/skaffold.yaml index a41c464bb31..cfe638d19b5 100644 --- a/examples/helm-deployment-dependencies/skaffold.yaml +++ b/examples/helm-deployment-dependencies/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: tagPolicy: diff --git a/examples/helm-deployment/skaffold.yaml b/examples/helm-deployment/skaffold.yaml index 3d8c4b9cd0f..84d5ce7931d 100644 --- a/examples/helm-deployment/skaffold.yaml +++ b/examples/helm-deployment/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/helm-remote-repo/skaffold.yaml b/examples/helm-remote-repo/skaffold.yaml index 1a604a0885f..c1f1db02084 100644 --- a/examples/helm-remote-repo/skaffold.yaml +++ b/examples/helm-remote-repo/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config deploy: helm: diff --git a/examples/hot-reload/skaffold.yaml b/examples/hot-reload/skaffold.yaml index 38e3e99706b..74da29890c9 100644 --- a/examples/hot-reload/skaffold.yaml +++ b/examples/hot-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/jib-gradle/skaffold.yaml b/examples/jib-gradle/skaffold.yaml index 4938c6cc8b7..8fe6d03fb47 100644 --- a/examples/jib-gradle/skaffold.yaml +++ b/examples/jib-gradle/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/jib-multimodule/skaffold.yaml b/examples/jib-multimodule/skaffold.yaml index 3f95af4ee17..a7512909dc1 100644 --- a/examples/jib-multimodule/skaffold.yaml +++ b/examples/jib-multimodule/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/jib-sync/skaffold-gradle.yaml b/examples/jib-sync/skaffold-gradle.yaml index 406721e84a2..81a501117de 100644 --- a/examples/jib-sync/skaffold-gradle.yaml +++ b/examples/jib-sync/skaffold-gradle.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/jib-sync/skaffold-maven.yaml b/examples/jib-sync/skaffold-maven.yaml index c4c85000dae..d5f435921cd 100644 --- a/examples/jib-sync/skaffold-maven.yaml +++ b/examples/jib-sync/skaffold-maven.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/jib/skaffold.yaml b/examples/jib/skaffold.yaml index 1bc3f93affb..cd3914d7113 100644 --- a/examples/jib/skaffold.yaml +++ b/examples/jib/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/kaniko/skaffold.yaml b/examples/kaniko/skaffold.yaml index c3f4c5546f8..6374a8a7670 100644 --- a/examples/kaniko/skaffold.yaml +++ b/examples/kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/ko/README.md b/examples/ko/README.md new file mode 100644 index 00000000000..66f49f96886 --- /dev/null +++ b/examples/ko/README.md @@ -0,0 +1,9 @@ +### Example: ko builder + +This example uses the +[`ko` builder](https://skaffold.dev/docs/pipeline-stages/builders/ko/) +to build a container image for a Go app. + +The included [Cloud Build](https://cloud.google.com/build/docs) configuration +file shows how users can set up a simple pipeline using `skaffold build` and +`skaffold deploy`, without having to create a custom builder image. diff --git a/examples/ko/cloudbuild.yaml b/examples/ko/cloudbuild.yaml new file mode 100644 index 00000000000..1a7bb21afd2 --- /dev/null +++ b/examples/ko/cloudbuild.yaml @@ -0,0 +1,63 @@ +# Copyright 2021 The Skaffold Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Demonstrate Skaffold build using ko builder and deploy to GKE. + +options: + dynamic_substitutions: true + env: + - 'KUBECONFIG=/workspace/.kubeconfig' + - 'SKAFFOLD_DEFAULT_REPO=$_IMAGE_REPO' + - 'SKAFFOLD_DETECT_MINIKUBE=false' + - 'SKAFFOLD_INTERACTIVE=false' + - 'SKAFFOLD_TIMESTAMPS=true' + - 'SKAFFOLD_UPDATE_CHECK=false' + - 'SKAFFOLD_VERBOSITY=info' + +steps: +- id: creds + name: $_GCLOUD_IMAGE + entrypoint: gcloud + args: + - container + - clusters + - get-credentials + - $_GKE_CLUSTER_NAME + - --project=$_GKE_CLUSTER_PROJECT_ID + - --zone=$_GKE_CLUSTER_ZONE + +- id: build + name: $_SKAFFOLD_IMAGE + entrypoint: skaffold + args: + - build + - --file-output=artifacts.json + +- id: deploy + name: $_SKAFFOLD_IMAGE + entrypoint: skaffold + args: + - deploy + - --build-artifacts=artifacts.json + - --status-check=true + +substitutions: + _GKE_CLUSTER_NAME: skaffold-ko + _GKE_CLUSTER_PROJECT_ID: $PROJECT_ID + _GKE_CLUSTER_ZONE: us-central1-f + _IMAGE_REPO: gcr.io/${PROJECT_ID} + _GCLOUD_IMAGE: gcr.io/k8s-skaffold/skaffold + _SKAFFOLD_IMAGE: gcr.io/k8s-skaffold/skaffold + +timeout: 1200s diff --git a/examples/ko/go.mod b/examples/ko/go.mod new file mode 100644 index 00000000000..ee3e5308467 --- /dev/null +++ b/examples/ko/go.mod @@ -0,0 +1,17 @@ +// Copyright 2021 The Skaffold Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module github.com/GoogleContainerTools/skaffold/examples/ko + +go 1.13 diff --git a/examples/ko/k8s/example.yaml b/examples/ko/k8s/example.yaml new file mode 100644 index 00000000000..cb8e2a68505 --- /dev/null +++ b/examples/ko/k8s/example.yaml @@ -0,0 +1,45 @@ +# Copyright 2021 The Skaffold Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: ko +spec: + ports: + - name: http + port: 80 + targetPort: 8080 + selector: + app: ko + type: ClusterIP +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ko +spec: + selector: + matchLabels: + app: ko + template: + metadata: + labels: + app: ko + spec: + containers: + - image: skaffold-ko + name: ko + ports: + - containerPort: 8080 diff --git a/examples/ko/main.go b/examples/ko/main.go new file mode 100644 index 00000000000..58e43e2bef1 --- /dev/null +++ b/examples/ko/main.go @@ -0,0 +1,33 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "fmt" + "log" + "net/http" +) + +func main() { + http.HandleFunc("/", hello) + log.Println("Listening on port 8080") + http.ListenAndServe(":8080", nil) +} + +func hello(w http.ResponseWriter, r *http.Request) { + fmt.Fprintln(w, "Hello, World!") +} diff --git a/examples/ko/skaffold.yaml b/examples/ko/skaffold.yaml new file mode 100644 index 00000000000..b200cd56844 --- /dev/null +++ b/examples/ko/skaffold.yaml @@ -0,0 +1,22 @@ +# Copyright 2021 The Skaffold Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: skaffold/v2beta26 +kind: Config +build: + artifacts: + - image: skaffold-ko + ko: + flags: + - -v diff --git a/examples/kustomize/skaffold-kustomize-args.yaml b/examples/kustomize/skaffold-kustomize-args.yaml index df5febe6398..957ef9dba2c 100644 --- a/examples/kustomize/skaffold-kustomize-args.yaml +++ b/examples/kustomize/skaffold-kustomize-args.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config deploy: kustomize: diff --git a/examples/kustomize/skaffold.yaml b/examples/kustomize/skaffold.yaml index 810b2b3d8bc..e8e1cc7b4a7 100644 --- a/examples/kustomize/skaffold.yaml +++ b/examples/kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config deploy: kustomize: {} diff --git a/examples/lifecycle-hooks/skaffold.yaml b/examples/lifecycle-hooks/skaffold.yaml index 59576d53da0..dc7299b9267 100644 --- a/examples/lifecycle-hooks/skaffold.yaml +++ b/examples/lifecycle-hooks/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/microservices/skaffold.yaml b/examples/microservices/skaffold.yaml index c3b3919973e..4747869bfb2 100644 --- a/examples/microservices/skaffold.yaml +++ b/examples/microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/multi-config-microservices/base/skaffold.yaml b/examples/multi-config-microservices/base/skaffold.yaml index bfb9009555b..2dde3ba6ed3 100644 --- a/examples/multi-config-microservices/base/skaffold.yaml +++ b/examples/multi-config-microservices/base/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/multi-config-microservices/leeroy-app/skaffold.yaml b/examples/multi-config-microservices/leeroy-app/skaffold.yaml index d29cbc4cfdb..caddc57d849 100644 --- a/examples/multi-config-microservices/leeroy-app/skaffold.yaml +++ b/examples/multi-config-microservices/leeroy-app/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config metadata: name: app-config diff --git a/examples/multi-config-microservices/leeroy-web/skaffold.yaml b/examples/multi-config-microservices/leeroy-web/skaffold.yaml index 8d659fa4c2c..4019450e5f5 100644 --- a/examples/multi-config-microservices/leeroy-web/skaffold.yaml +++ b/examples/multi-config-microservices/leeroy-web/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config metadata: name: web-config diff --git a/examples/multi-config-microservices/skaffold.yaml b/examples/multi-config-microservices/skaffold.yaml index 14cb3389dcb..31a4f6700df 100644 --- a/examples/multi-config-microservices/skaffold.yaml +++ b/examples/multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config requires: - path: ./leeroy-app diff --git a/examples/nodejs/skaffold.yaml b/examples/nodejs/skaffold.yaml index 8c9ddd17cfe..d0df8f282c3 100644 --- a/examples/nodejs/skaffold.yaml +++ b/examples/nodejs/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: diff --git a/examples/profile-patches/skaffold.yaml b/examples/profile-patches/skaffold.yaml index a5ecf66bea1..b140f221393 100644 --- a/examples/profile-patches/skaffold.yaml +++ b/examples/profile-patches/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: # only build and deploy "base-service" on main profile diff --git a/examples/profiles/skaffold.yaml b/examples/profiles/skaffold.yaml index 794a2e7236e..46ce3c3b41a 100644 --- a/examples/profiles/skaffold.yaml +++ b/examples/profiles/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: # only build and deploy "world-service" on main profile diff --git a/examples/react-reload-docker/skaffold.yaml b/examples/react-reload-docker/skaffold.yaml index 6dcf2183060..1881f8de468 100644 --- a/examples/react-reload-docker/skaffold.yaml +++ b/examples/react-reload-docker/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: local: diff --git a/examples/react-reload/skaffold.yaml b/examples/react-reload/skaffold.yaml index f3e3c1ff6f0..202520aaddd 100644 --- a/examples/react-reload/skaffold.yaml +++ b/examples/react-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/remote-multi-config-microservices/skaffold.yaml b/examples/remote-multi-config-microservices/skaffold.yaml index f07de9f2344..8afbf5efa8d 100644 --- a/examples/remote-multi-config-microservices/skaffold.yaml +++ b/examples/remote-multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config requires: - git: diff --git a/examples/ruby/skaffold.yaml b/examples/ruby/skaffold.yaml index 6db6498be8c..03eec480fd4 100644 --- a/examples/ruby/skaffold.yaml +++ b/examples/ruby/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/simple-artifact-dependency/skaffold.yaml b/examples/simple-artifact-dependency/skaffold.yaml index 21874887a4e..fb991547f39 100644 --- a/examples/simple-artifact-dependency/skaffold.yaml +++ b/examples/simple-artifact-dependency/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/structure-tests/skaffold.yaml b/examples/structure-tests/skaffold.yaml index 62786b556b8..d67ef4dd000 100644 --- a/examples/structure-tests/skaffold.yaml +++ b/examples/structure-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/tagging-with-environment-variables/skaffold.yaml b/examples/tagging-with-environment-variables/skaffold.yaml index 5d58e5dfe16..5b8f3c7e51a 100644 --- a/examples/tagging-with-environment-variables/skaffold.yaml +++ b/examples/tagging-with-environment-variables/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: artifacts: diff --git a/examples/templated-fields/skaffold.yaml b/examples/templated-fields/skaffold.yaml index f3245a435b4..d6597053cce 100644 --- a/examples/templated-fields/skaffold.yaml +++ b/examples/templated-fields/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config metadata: name: my-app diff --git a/examples/typescript/skaffold.yaml b/examples/typescript/skaffold.yaml index 841e5bece01..feee63bf913 100644 --- a/examples/typescript/skaffold.yaml +++ b/examples/typescript/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta25 +apiVersion: skaffold/v2beta26 kind: Config build: diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index cbe36cffdc1..ae0d176a9c0 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) -// This config version is not yet released, it is SAFE TO MODIFY the structs in this file. +// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file. const Version string = "skaffold/v2beta26" // NewSkaffoldConfig creates a SkaffoldConfig