Skip to content

Commit e065ac6

Browse files
authored
Merge branch 'master' into reset-on-deploy
2 parents 178b178 + 567a080 commit e065ac6

File tree

52 files changed

+1049
-178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1049
-178
lines changed

CHANGELOG.md

+82-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,89 @@
1+
# v0.39.0 Release - 09/26/2019
2+
3+
*Note*: This release comes with a new config version `v1beta15`.
4+
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.
5+
See [deprecation-policy.md](/deprecation-policy.md) for details on what beta means.
6+
The env vars `DIGEST`, `DIGEST_HEX` and `DIGEST_ALGO` now fail if found in `envTemplate` fields.
7+
8+
Highlights:
9+
10+
* We now include build args in the artifact cache hash generation [#2926](https://github.com/GoogleContainerTools/skaffold/pull/2926)
11+
* Skaffold now passes the `--set-files` argument to the helm CLI: you can define `helm.release.setFiles` in the skaffold.yaml
12+
* Skaffold now passes the `--build-args` arguments to kustomize: you can define `deploy.kustomize.buildArgs` in the skaffold.yaml
13+
14+
New Features:
15+
16+
* Optional pull secret for Kaniko [#2910](https://github.com/GoogleContainerTools/skaffold/pull/2910)
17+
* Add Jib-Gradle support for Kotlin buildscripts [#2914](https://github.com/GoogleContainerTools/skaffold/pull/2914)
18+
* Add graceful termination for custom builders [#2886](https://github.com/GoogleContainerTools/skaffold/pull/2886)
19+
* Add docs and tutorial for buildpacks [#2879](https://github.com/GoogleContainerTools/skaffold/pull/2879)
20+
* kustomize build args [#2871](https://github.com/GoogleContainerTools/skaffold/pull/2871)
21+
* Add `setFiles` to `HelmDeploy.HelmRelease` skaffold config which will be add `--set-files` argument to helm CLI [#2895](https://github.com/GoogleContainerTools/skaffold/pull/2895)
22+
23+
Bug Fixes:
24+
25+
* fix flake TestGetSetFileValues [#2936](https://github.com/GoogleContainerTools/skaffold/pull/2936)
26+
* Fix helm deployer with imageStrategy helm and fix test runner [#2887](https://github.com/GoogleContainerTools/skaffold/pull/2887)
27+
* Include build args in cache hash generation [#2926](https://github.com/GoogleContainerTools/skaffold/pull/2926)
28+
* Fix test flake TestPollResourceStatus [#2907](https://github.com/GoogleContainerTools/skaffold/pull/2907)
29+
* Fix build script for doc generation. [#2884](https://github.com/GoogleContainerTools/skaffold/pull/2884)
30+
31+
Updates & Refactors:
32+
33+
* Create new v1beta15 config [#2881](https://github.com/GoogleContainerTools/skaffold/pull/2881)
34+
* adding release comment management to all config.go [#2917](https://github.com/GoogleContainerTools/skaffold/pull/2917)
35+
* Change final status check error message to be more concise. [#2930](https://github.com/GoogleContainerTools/skaffold/pull/2930)
36+
* Add unimplemented 'skaffold render' command [#2942](https://github.com/GoogleContainerTools/skaffold/pull/2942)
37+
* Bump golangci-lint to v0.19.0 [#2927](https://github.com/GoogleContainerTools/skaffold/pull/2927)
38+
* Add pod resource with no status check implemented. [#2928](https://github.com/GoogleContainerTools/skaffold/pull/2928)
39+
* added support for interface type in schema check [#2924](https://github.com/GoogleContainerTools/skaffold/pull/2924)
40+
* add protos for status check [#2916](https://github.com/GoogleContainerTools/skaffold/pull/2916)
41+
* Refactor Deployment common functions in to a Base struct in prep to pod [#2905](https://github.com/GoogleContainerTools/skaffold/pull/2905)
42+
* Add missing T.Helper() in testutil.Check* as required [#2913](https://github.com/GoogleContainerTools/skaffold/pull/2913)
43+
* Removing testing version dependent skaffold config test in examples [#2890](https://github.com/GoogleContainerTools/skaffold/pull/2890)
44+
* rename hack/versions/cmd/new/new.go to hack/versions/cmd/new/version.go [#2882](https://github.com/GoogleContainerTools/skaffold/pull/2882)
45+
* [Refactor] Move pollDeploymentStatus to resource.Deployment.CheckStatus [#2896](https://github.com/GoogleContainerTools/skaffold/pull/2896)
46+
* init: Add default config name [#2668](https://github.com/GoogleContainerTools/skaffold/pull/2668)
47+
* Upgrade jib to 1.6.1 [#2891](https://github.com/GoogleContainerTools/skaffold/pull/2891)
48+
* Print deployment status after every 0.5 seconds. [#2866](https://github.com/GoogleContainerTools/skaffold/pull/2866)
49+
* Fail PR if it has a structural schema change in a released version [#2864](https://github.com/GoogleContainerTools/skaffold/pull/2864)
50+
51+
Docs:
52+
53+
* add better docs for recreate pods [#2937](https://github.com/GoogleContainerTools/skaffold/pull/2937)
54+
* added release comments manually [#2931](https://github.com/GoogleContainerTools/skaffold/pull/2931)
55+
* add github pull request template [#2894](https://github.com/GoogleContainerTools/skaffold/pull/2894)
56+
57+
58+
Huge thanks goes out to all of our contributors for this release:
59+
60+
- Aisuko
61+
- Andreas Sommer
62+
- Balint Pato
63+
- Brian de Alwis
64+
- Cedric Kring
65+
- Chanseok Oh
66+
- Cornelius Weig
67+
- David Gageot
68+
- Dominic Werner
69+
- Jack Davis
70+
- Marlon Gamez
71+
- Medya Gh
72+
- Michael Beaumont
73+
- Nick Kubala
74+
- Prashant Arya
75+
- Priya Wadhwa
76+
- Tad Cordle
77+
- Tejal Desai
78+
- Willy Aguirre
79+
80+
181
# v0.38.0 Release - 09/12/2019
282

383
*Note*: This release comes with a new config version `v1beta14`.
484
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.
5-
See [deprecation-policy.md](/deprecation-policy.md) for details on what beta means.
85+
See [deprecation-policy.md](/deprecation-policy.md) for details on what beta means.
86+
The env vars `DIGEST`, `DIGEST_HEX` and `DIGEST_ALGO` won't work anymore in envTemplates.
687

788
New Features:
889

DEVELOPMENT.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,24 @@ Once you've done this, clone your fork to your local machine:
6060

6161
Some changes to the skaffold code require a change to the skaffold config. These changes require a few extra steps:
6262

63-
* Check to see what the latest config version was at the time of the last release. The easiest way to do this is to view the skaffold source on github at the last released tag.
64-
65-
* Check the current config version in the code. This can be found in `pkg/skaffold/schema/latest/config.go`: look for something like
66-
67-
```golang
68-
const Version string = "skaffold/v1betaXX"
69-
```
70-
* If the config versions are different, do nothing. Somebody has already bumped the config version for this release cycle.
71-
72-
* **If the config versions are the same**:
73-
74-
* Run `./hack/new_version.sh` to freeze the current config version and cut a new version.
75-
63+
* Open the latest Config at [pkg/skaffold/schema/latest/config.go](https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/schema/latest/config.go#L23) and inspect the comment at [L13](https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/schema/latest/config.go#L23)
64+
* If the line mentions the config version is not released, proceed making your changes.
65+
```
66+
// This config version is not yet released, it is SAFE TO MODIFY the structs in this file.
67+
```
68+
69+
* **If the line mentions** the config version is released then,
70+
```
71+
// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file.
72+
```
73+
74+
* Run `./hack/new_version.sh` to create a new version.
75+
76+
* Run `make test` to verify changes.
77+
7678
* Commit these generated changes, and submit a PR.
7779

78-
Once you've done this, continue making your changes locally, including the new config change.
80+
Once you've done this, merge or rebase your development branch with config changes, including the new config change.
7981
**Any new config changes belong in pkg/skaffold/schema/latest/config.go. Do not edit the older config versions.**
8082
8183
* Be sure and update the documentation in `pkg/skaffold/schema/<previous_config_version>/upgrade.go` with any additions, removals, or updates you make to the config.

cmd/skaffold/app/cmd/cmd.go

+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ func NewSkaffoldCommand(out, err io.Writer) *cobra.Command {
136136
NewCmdBuild(),
137137
NewCmdDeploy(),
138138
NewCmdDelete(),
139+
NewCmdRender(),
139140
},
140141
},
141142
{

cmd/skaffold/app/cmd/flags.go

+8
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ var FlagRegistry = []Flag{
229229
FlagAddMethod: "BoolVar",
230230
DefinedOn: []string{"dev", "debug", "deploy", "run"},
231231
},
232+
{
233+
Name: "render-only",
234+
Usage: "Print rendered kubernetes manifests instead of deploying them",
235+
Value: &opts.RenderOnly,
236+
DefValue: false,
237+
FlagAddMethod: "BoolVar",
238+
DefinedOn: []string{"dev", "run"},
239+
},
232240
{
233241
Name: "config",
234242
Shorthand: "c",

cmd/skaffold/app/cmd/render.go

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
Copyright 2019 The Skaffold Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package cmd
18+
19+
import (
20+
"context"
21+
"io"
22+
"io/ioutil"
23+
24+
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner"
25+
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
26+
"github.com/pkg/errors"
27+
"github.com/spf13/cobra"
28+
"github.com/spf13/pflag"
29+
)
30+
31+
var (
32+
showBuild bool
33+
renderOutputPath string
34+
)
35+
36+
// NewCmdRender describes the CLI command to build artifacts render kubernetes manifests.
37+
func NewCmdRender() *cobra.Command {
38+
return NewCmd("render").
39+
WithDescription("Perform all image builds, and output rendered kubernetes manifests").
40+
WithCommonFlags().
41+
WithFlags(func(f *pflag.FlagSet) {
42+
f.BoolVar(&showBuild, "loud", false, "Show the build logs and output")
43+
f.StringVar(&renderOutputPath, "output", "", "file to write rendered manifests to")
44+
}).
45+
NoArgs(cancelWithCtrlC(context.Background(), doRender))
46+
}
47+
48+
func doRender(ctx context.Context, out io.Writer) error {
49+
buildOut := ioutil.Discard
50+
if showBuild {
51+
buildOut = out
52+
}
53+
54+
return withRunner(ctx, func(r runner.Runner, config *latest.SkaffoldConfig) error {
55+
bRes, err := r.BuildAndTest(ctx, buildOut, targetArtifacts(opts, config))
56+
57+
if err != nil {
58+
return errors.Wrap(err, "executing build")
59+
}
60+
61+
if err := r.Render(ctx, out, bRes, renderOutputPath); err != nil {
62+
return errors.Wrap(err, "rendering manifests")
63+
}
64+
return nil
65+
})
66+
}

deprecation-policy.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,4 @@ Commands and their flags are subject to the deprecation policy based on the foll
9494

9595

9696
03/15/2019: With release v0.25.0 we mark for deprecation the `flags` field in kaniko (`KanikoArtifact.AdditionalFlags`) , instead Kaniko's additional flags will now be represented as unique fields under `kaniko` per artifact (`KanikoArtifact` type).
97-
This flag will will be removed earliest 06/15/2019.
98-
99-
02/15/2019: With release v0.23.0 we mark for deprecation the following env variables in the `envTemplate` tagger:
100-
- `DIGEST`
101-
- `DIGEST_ALGO`
102-
- `DIGEST_HEX`
103-
Currently these variables resolve to `_DEPRECATED_<envvar>_`, and the new tagging mechanism adds a digest to the image name thus it shouldn't break existing configurations.
104-
This backward compatibility behavior will be removed earliest 05/14/2019.
97+
This flag will will be removed earliest 06/15/2019.

docs/content/en/docs/references/cli/_index.md

+37
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Pipeline building blocks for CI/CD:
1717
* [skaffold build](#skaffold-build) - to just build and tag your image(s)
1818
* [skaffold deploy](#skaffold-deploy) - to deploy the given image(s)
1919
* [skaffold delete](#skaffold-delete) - to cleanup the deployed artifacts
20+
* [skaffold render](#skaffold-render) - build and tag images, and output templated kubernetes manifests
2021

2122
Getting started with a new project:
2223

@@ -71,6 +72,7 @@ Pipeline building blocks for CI/CD:
7172
build Build the artifacts
7273
deploy Deploy pre-built artifacts
7374
delete Delete the deployed application
75+
render Perform all image builds, and output rendered kubernetes manifests
7476
7577
Getting started with a new project:
7678
init Generate configuration for deploying an application
@@ -446,6 +448,7 @@ Options:
446448
--no-prune-children=false: Skip removing layers reused by Skaffold
447449
--port-forward=false: Port-forward exposed container ports within pods
448450
-p, --profile=[]: Activate profiles by name
451+
--render-only=false: Print rendered kubernetes manifests instead of deploying them
449452
--rpc-http-port=50052: tcp port to expose event REST API over HTTP
450453
--rpc-port=50051: tcp port to expose event API
451454
--skip-tests=false: Whether to skip the tests after building
@@ -480,6 +483,7 @@ Env vars:
480483
* `SKAFFOLD_NO_PRUNE_CHILDREN` (same as `--no-prune-children`)
481484
* `SKAFFOLD_PORT_FORWARD` (same as `--port-forward`)
482485
* `SKAFFOLD_PROFILE` (same as `--profile`)
486+
* `SKAFFOLD_RENDER_ONLY` (same as `--render-only`)
483487
* `SKAFFOLD_RPC_HTTP_PORT` (same as `--rpc-http-port`)
484488
* `SKAFFOLD_RPC_PORT` (same as `--rpc-port`)
485489
* `SKAFFOLD_SKIP_TESTS` (same as `--skip-tests`)
@@ -580,6 +584,37 @@ The following options can be passed to any command:
580584
581585
```
582586

587+
### skaffold render
588+
589+
Perform all image builds, and output rendered kubernetes manifests
590+
591+
```
592+
593+
594+
Options:
595+
-d, --default-repo='': Default repository value (overrides global config)
596+
-f, --filename='skaffold.yaml': Filename or URL to the pipeline file
597+
--loud=false: Show the build logs and output
598+
-n, --namespace='': Run deployments in the specified namespace
599+
--output='': file to write rendered manifests to
600+
-p, --profile=[]: Activate profiles by name
601+
602+
Usage:
603+
skaffold render [options]
604+
605+
Use "skaffold options" for a list of global command-line options (applies to all commands).
606+
607+
608+
```
609+
Env vars:
610+
611+
* `SKAFFOLD_DEFAULT_REPO` (same as `--default-repo`)
612+
* `SKAFFOLD_FILENAME` (same as `--filename`)
613+
* `SKAFFOLD_LOUD` (same as `--loud`)
614+
* `SKAFFOLD_NAMESPACE` (same as `--namespace`)
615+
* `SKAFFOLD_OUTPUT` (same as `--output`)
616+
* `SKAFFOLD_PROFILE` (same as `--profile`)
617+
583618
### skaffold run
584619

585620
Run a pipeline
@@ -610,6 +645,7 @@ Options:
610645
--no-prune=false: Skip removing images and containers built by Skaffold
611646
--no-prune-children=false: Skip removing layers reused by Skaffold
612647
-p, --profile=[]: Activate profiles by name
648+
--render-only=false: Print rendered kubernetes manifests instead of deploying them
613649
--rpc-http-port=50052: tcp port to expose event REST API over HTTP
614650
--rpc-port=50051: tcp port to expose event API
615651
--skip-tests=false: Whether to skip the tests after building
@@ -641,6 +677,7 @@ Env vars:
641677
* `SKAFFOLD_NO_PRUNE` (same as `--no-prune`)
642678
* `SKAFFOLD_NO_PRUNE_CHILDREN` (same as `--no-prune-children`)
643679
* `SKAFFOLD_PROFILE` (same as `--profile`)
680+
* `SKAFFOLD_RENDER_ONLY` (same as `--render-only`)
644681
* `SKAFFOLD_RPC_HTTP_PORT` (same as `--rpc-http-port`)
645682
* `SKAFFOLD_RPC_PORT` (same as `--rpc-port`)
646683
* `SKAFFOLD_SKIP_TESTS` (same as `--skip-tests`)

docs/content/en/docs/references/cli/index_header

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Pipeline building blocks for CI/CD:
1717
* [skaffold build](#skaffold-build) - to just build and tag your image(s)
1818
* [skaffold deploy](#skaffold-deploy) - to deploy the given image(s)
1919
* [skaffold delete](#skaffold-delete) - to cleanup the deployed artifacts
20+
* [skaffold render](#skaffold-render) - build and tag images, and output templated kubernetes manifests
2021

2122
Getting started with a new project:
2223

examples/bazel/skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: skaffold/v1beta14
1+
apiVersion: skaffold/v1beta15
22
kind: Config
33
build:
44
artifacts:

0 commit comments

Comments
 (0)