Skip to content

Commit

Permalink
Merge remote-tracking branch 'skaffold/main' into pkoutsovasilis/4870
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoutsovasilis committed Sep 19, 2024
2 parents 82e162d + da42594 commit a1bd236
Show file tree
Hide file tree
Showing 262 changed files with 9,732 additions and 377 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3.25.2
uses: github/codeql-action/init@v3.26.6
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -65,4 +65,4 @@ jobs:
make out/skaffold
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.25.2
uses: github/codeql-action/analyze@v3.26.6
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ jobs:

# Upload the results as artifacts (optional).
- name: "Upload artifact"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v3.1.0
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v3.1.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v3.25.2 # v1.0.26
uses: github/codeql-action/upload-sarif@v3.26.6 # v1.0.26
with:
sarif_file: results.sarif
103 changes: 103 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,106 @@
# v2.13.0 Release - 07/08/2024
**Linux amd64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.0/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**Linux arm64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.0/skaffold-linux-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**macOS amd64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.0/skaffold-darwin-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**macOS arm64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.0/skaffold-darwin-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**Windows**
https://storage.googleapis.com/skaffold/releases/v2.13.0/skaffold-windows-amd64.exe

**Docker image**
`gcr.io/k8s-skaffold/skaffold:v2.13.0`

Highlights:

New Features and Additions:
* feat: make ADC the default option for GCP authentication when using go-containerregistry [#9456](https://github.com/GoogleContainerTools/skaffold/pull/9456)
* feat: Optimized fs walker and util.IsEmptyDir [#9433](https://github.com/GoogleContainerTools/skaffold/pull/9433)

Fixes:
* fix: first and last image won't be detected as known image, do not add single quote to the jsonpath (#9448) [#9449](https://github.com/GoogleContainerTools/skaffold/pull/9449)
* fix(cmd): fixed err output for delete and deploy commands [#9437](https://github.com/GoogleContainerTools/skaffold/pull/9437)

Updates and Refactors:
* chore: upgrade-go-to-1.22.4 [#9454](https://github.com/GoogleContainerTools/skaffold/pull/9454)
* chore(logs): update log messages for better clarity [#9443](https://github.com/GoogleContainerTools/skaffold/pull/9443)

Huge thanks goes out to all of our contributors for this release:

- Renzo Rojas
- Roland Németh
- Suleiman Dibirov
- ericzzzzzzz

# v2.12.0 Release - 05/14/2024
**Linux amd64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.12.0/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**Linux arm64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.12.0/skaffold-linux-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**macOS amd64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.12.0/skaffold-darwin-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**macOS arm64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.12.0/skaffold-darwin-arm64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**Windows**
https://storage.googleapis.com/skaffold/releases/v2.12.0/skaffold-windows-amd64.exe

**Docker image**
`gcr.io/k8s-skaffold/skaffold:v2.12.0`

Note: This release comes with a new config version, `v4beta11`. To upgrade your skaffold.yaml, use `skaffold fix`. If you choose not to upgrade, skaffold will auto-upgrade as best as it can.

Highlights:

New Features and Additions:
* feat: add `--destination` flag for kaniko build [#9415](https://github.com/GoogleContainerTools/skaffold/pull/9415)
* feat(exec|verify): enabled "namespace" option for exec and verify commands [#9307](https://github.com/GoogleContainerTools/skaffold/pull/9307)
* feat: support templating in diagnose command [#9393](https://github.com/GoogleContainerTools/skaffold/pull/9393)
* feat(docker-network): docker.network now supports any value [#9390](https://github.com/GoogleContainerTools/skaffold/pull/9390)

Fixes:
* fix: TestGenerateMavenBuildArgs-host-platform [#9410](https://github.com/GoogleContainerTools/skaffold/pull/9410)
* fix(kaniko): delete kaniko pod on graceful shutdown [#9270](https://github.com/GoogleContainerTools/skaffold/pull/9270)
* fix(tar): data race fix [#9309](https://github.com/GoogleContainerTools/skaffold/pull/9309)
* fix: add --load flag for local buildkit [#9387](https://github.com/GoogleContainerTools/skaffold/pull/9387)

Updates and Refactors:
* chore: bump github/codeql-action from 3.25.1 to 3.25.2 [#9402](https://github.com/GoogleContainerTools/skaffold/pull/9402)
* chore: bump actions/upload-artifact from 4.3.2 to 4.3.3 [#9403](https://github.com/GoogleContainerTools/skaffold/pull/9403)
* chore: bump github.com/sigstore/cosign/v2 from 2.2.1 to 2.2.4 [#9385](https://github.com/GoogleContainerTools/skaffold/pull/9385)
* chore: bump flask from 3.0.2 to 3.0.3 in /integration/examples [#9381](https://github.com/GoogleContainerTools/skaffold/pull/9381)
* chore: bump flask from 3.0.2 to 3.0.3 in /examples [#9379](https://github.com/GoogleContainerTools/skaffold/pull/9379)
* chore: bump golang.org/x/net from 0.17.0 to 0.23.0 in /integration/examples/grpc-e2e-tests/cloud-spanner-bootstrap [#9396](https://github.com/GoogleContainerTools/skaffold/pull/9396)
* chore: bump golang.org/x/net from 0.17.0 to 0.23.0 in /examples/grpc-e2e-tests/service [#9397](https://github.com/GoogleContainerTools/skaffold/pull/9397)
* chore: bump golang.org/x/net from 0.22.0 to 0.23.0 in /hack/tools [#9399](https://github.com/GoogleContainerTools/skaffold/pull/9399)
* chore: bump golang.org/x/net from 0.22.0 to 0.23.0 [#9400](https://github.com/GoogleContainerTools/skaffold/pull/9400)
* chore: bump golang.org/x/net from 0.17.0 to 0.23.0 in /integration/examples/grpc-e2e-tests/service [#9398](https://github.com/GoogleContainerTools/skaffold/pull/9398)
* chore: bump golang.org/x/net from 0.17.0 to 0.23.0 in /examples/grpc-e2e-tests/cloud-spanner-bootstrap [#9395](https://github.com/GoogleContainerTools/skaffold/pull/9395)
* chore: bump actions/upload-artifact from 4.3.1 to 4.3.2 [#9394](https://github.com/GoogleContainerTools/skaffold/pull/9394)
* schema: v4beta11 [#9401](https://github.com/GoogleContainerTools/skaffold/pull/9401)
* chore: bump github/codeql-action from 3.24.9 to 3.25.1 [#9391](https://github.com/GoogleContainerTools/skaffold/pull/9391)

Docs, Test, and Release Updates:
* docs: add bazel cross-platform documentation [#9363](https://github.com/GoogleContainerTools/skaffold/pull/9363)

Huge thanks goes out to all of our contributors for this release:

- Aran Donohue
- Hedi Nasr
- Michael Kuc
- Suleiman Dibirov
- dependabot[bot]
- ericzzzzzzz

# v2.11.0 Release - 04/02/2024
**Linux amd64**
`curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.11.0/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin`
Expand Down
2 changes: 1 addition & 1 deletion cmd/skaffold/app/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func doDelete(ctx context.Context, out io.Writer) error {

manifestListByConfig, err := r.Render(ctx, io.Discard, bRes, false)
if err != nil {
return err
return fmt.Errorf("rendering manifests: %w", err)
}
return r.Cleanup(ctx, out, dryRun, manifestListByConfig, opts.Command)
})
Expand Down
3 changes: 2 additions & 1 deletion cmd/skaffold/app/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package cmd

import (
"context"
"fmt"
"io"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -54,7 +55,7 @@ func doDeploy(ctx context.Context, out io.Writer) error {
// Render
manifests, errR := r.Render(ctx, out, buildArtifacts, false)
if errR != nil {
return errR
return fmt.Errorf("rendering manifests: %w", errR)
}
return r.DeployAndLog(ctx, out, buildArtifacts, manifests)
})
Expand Down
10 changes: 10 additions & 0 deletions cmd/skaffold/app/cmd/diagnose.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/runner/runcontext"
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/latest"
schemaUtil "github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/util"
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/tags"
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/util"
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/version"
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/yaml"
Expand All @@ -38,6 +39,8 @@ import (
var (
yamlOnly bool
outputFile string

enableTemplating bool
// for testing
getRunContext = runcontext.GetRunContext
getCfgs = parser.GetAllConfigs
Expand All @@ -52,6 +55,7 @@ func NewCmdDiagnose() *cobra.Command {
WithCommonFlags().
WithFlags([]*Flag{
{Value: &yamlOnly, Name: "yaml-only", DefValue: false, Usage: "Only prints the effective skaffold.yaml configuration"},
{Value: &enableTemplating, Name: "enable-templating", DefValue: false, Usage: "Render supported templated fields with golang template engine"},
{Value: &outputFile, Name: "output", Shorthand: "o", DefValue: "", Usage: "File to write diagnose result"},
}).
NoArgs(doDiagnose)
Expand Down Expand Up @@ -82,10 +86,16 @@ func doDiagnose(ctx context.Context, out io.Writer) error {
for i := range configs {
configs[i].(*latest.SkaffoldConfig).Dependencies = nil
}
if enableTemplating {
if err := tags.ApplyTemplates(configs); err != nil {
return err
}
}
buf, err := yaml.MarshalWithSeparator(configs)
if err != nil {
return fmt.Errorf("marshalling configuration: %w", err)
}

out.Write(buf)

return nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/skaffold/app/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var flagRegistry = []Flag{
Value: &opts.Namespace,
DefValue: "",
FlagAddMethod: "StringVar",
DefinedOn: []string{"dev", "run", "debug", "deploy", "render", "build", "delete", "apply"},
DefinedOn: []string{"dev", "run", "debug", "deploy", "render", "build", "delete", "apply", "verify", "exec"},
},
{
Name: "default-repo",
Expand Down
2 changes: 1 addition & 1 deletion deploy/docs-v2/local-preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ for dir in $(find ${DOCS_DIR} -mindepth 1 -maxdepth 1 -type d | grep -v themes |
MOUNTS="${MOUNTS} -v $dir:/app/docs/$(basename $dir):ro"
done

docker build --platform linux/amd64 -t skaffold-docs-previewer --target runtime_deps deploy/webhook
docker build --platform linux/amd64 -t skaffold-docs-previewer --target runtime_deps deploy/webhook-v2
docker run --platform linux/amd64 --rm -ti -p 1313:1313 ${MOUNTS} skaffold-docs-previewer $@
2 changes: 1 addition & 1 deletion deploy/skaffold/Dockerfile.deps
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,5 @@ RUN apt-get update && apt-get install --no-install-recommends --no-install-sugge
jq \
apt-transport-https && \
rm -rf /var/lib/apt/lists/*
COPY --from=golang:1.22.1 /usr/local/go /usr/local/go
COPY --from=golang:1.22.4 /usr/local/go /usr/local/go
ENV PATH /usr/local/go/bin:/root/go/bin:$PATH
2 changes: 1 addition & 1 deletion deploy/skaffold/Dockerfile.deps.slim
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ RUN apt-get update && apt-get install --no-install-recommends --no-install-sugge
jq \
apt-transport-https && \
rm -rf /var/lib/apt/lists/*
COPY --from=golang:1.22.1 /usr/local/go /usr/local/go
COPY --from=golang:1.22.4 /usr/local/go /usr/local/go
ENV PATH /usr/local/go/bin:/root/go/bin:$PATH
2 changes: 1 addition & 1 deletion deploy/webhook-v2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ENV KUBECTL_URL https://storage.googleapis.com/kubernetes-release/release/${KUBE
RUN wget -O kubectl "${KUBECTL_URL}"
RUN chmod +x kubectl

FROM node:12.22.7-stretch as runtime_deps
FROM node:16-stretch as runtime_deps
ENV FIREBASE_TOOLS_VERSION 7.13.1
RUN npm install -g firebase-tools@${FIREBASE_TOOLS_VERSION} postcss postcss-cli
WORKDIR /app/docs
Expand Down
2 changes: 1 addition & 1 deletion deploy/webhook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ENV KUBECTL_URL https://storage.googleapis.com/kubernetes-release/release/${KUBE
RUN wget -O kubectl "${KUBECTL_URL}"
RUN chmod +x kubectl

FROM node:12.22.7-stretch as runtime_deps
FROM node:16-stretch as runtime_deps
ENV FIREBASE_TOOLS_VERSION 7.13.1
RUN npm install -g firebase-tools@${FIREBASE_TOOLS_VERSION} postcss postcss-cli
WORKDIR /app/docs
Expand Down
2 changes: 1 addition & 1 deletion docs-v2/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ weight = 1
copyright = "Skaffold Authors"
privacy_policy = "https://policies.google.com/privacy"
github_repo = "https://github.com/GoogleContainerTools/skaffold"
skaffold_version = "skaffold/v4beta11"
skaffold_version = "skaffold/v4beta12"

# Google Custom Search Engine ID. Remove or comment out to disable search.
# gcs_engine_id = "013756393218025596041:3nojel67sum"
Expand Down
8 changes: 7 additions & 1 deletion docs-v2/content/en/docs/references/cli/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@ Examples:
Options:
--assume-yes=false: If true, skaffold will skip yes/no confirmation from the user and default to yes
-c, --config='': File for global configurations (defaults to $HOME/.skaffold/config)
--enable-templating=false: Render supported templated fields with golang template engine
-f, --filename='skaffold.yaml': Path or URL to the Skaffold config file
-m, --module=[]: Filter Skaffold configs to only the provided named modules
-o, --output='': File to write diagnose result
Expand All @@ -924,6 +925,7 @@ Env vars:

* `SKAFFOLD_ASSUME_YES` (same as `--assume-yes`)
* `SKAFFOLD_CONFIG` (same as `--config`)
* `SKAFFOLD_ENABLE_TEMPLATING` (same as `--enable-templating`)
* `SKAFFOLD_FILENAME` (same as `--filename`)
* `SKAFFOLD_MODULE` (same as `--module`)
* `SKAFFOLD_OUTPUT` (same as `--output`)
Expand Down Expand Up @@ -970,6 +972,7 @@ The build result from a previous 'skaffold build --file-output' run can be used
--env-file='': File containing env var key-value pairs that will be set in all verify container envs
-f, --filename='skaffold.yaml': Path or URL to the Skaffold config file
-m, --module=[]: Filter Skaffold configs to only the provided named modules
-n, --namespace='': Runs deployments in the specified namespace. When used with 'render' command, renders manifests contain the namespace
--port-forward=off: Port-forward exposes service ports and container ports within pods and other resources (off, user, services, debug, pods)
-p, --profile=[]: Activate profiles by name (prefixed with `-` to disable a profile)
--profile-auto-activation=true: Set to false to disable profile auto activation
Expand All @@ -995,6 +998,7 @@ Env vars:
* `SKAFFOLD_ENV_FILE` (same as `--env-file`)
* `SKAFFOLD_FILENAME` (same as `--filename`)
* `SKAFFOLD_MODULE` (same as `--module`)
* `SKAFFOLD_NAMESPACE` (same as `--namespace`)
* `SKAFFOLD_PORT_FORWARD` (same as `--port-forward`)
* `SKAFFOLD_PROFILE` (same as `--profile`)
* `SKAFFOLD_PROFILE_AUTO_ACTIVATION` (same as `--profile-auto-activation`)
Expand Down Expand Up @@ -1032,7 +1036,7 @@ Options:
--overwrite=false: Overwrite original config with fixed config
--remote-cache-dir='': Specify the location of the remote cache (default $HOME/.skaffold/remote-cache)
--sync-remote-cache='missing': Controls how Skaffold manages the remote config cache (see `remote-cache-dir`). One of `always` (default), `missing`, or `never`. `always` syncs remote repositories to latest on access. `missing` only clones remote repositories if they do not exist locally. `never` means the user takes responsibility for updating remote repositories.
--version='skaffold/v4beta11': Target schema version to upgrade to
--version='skaffold/v4beta12': Target schema version to upgrade to
Usage:
skaffold fix [options]
Expand Down Expand Up @@ -1489,6 +1493,7 @@ The build result from a previous 'skaffold build --file-output' run can be used
--env-file='': File containing env var key-value pairs that will be set in all verify container envs
-f, --filename='skaffold.yaml': Path or URL to the Skaffold config file
-m, --module=[]: Filter Skaffold configs to only the provided named modules
-n, --namespace='': Runs deployments in the specified namespace. When used with 'render' command, renders manifests contain the namespace
--port-forward=off: Port-forward exposes service ports and container ports within pods and other resources (off, user, services, debug, pods)
-p, --profile=[]: Activate profiles by name (prefixed with `-` to disable a profile)
--profile-auto-activation=true: Set to false to disable profile auto activation
Expand All @@ -1515,6 +1520,7 @@ Env vars:
* `SKAFFOLD_ENV_FILE` (same as `--env-file`)
* `SKAFFOLD_FILENAME` (same as `--filename`)
* `SKAFFOLD_MODULE` (same as `--module`)
* `SKAFFOLD_NAMESPACE` (same as `--namespace`)
* `SKAFFOLD_PORT_FORWARD` (same as `--port-forward`)
* `SKAFFOLD_PROFILE` (same as `--profile`)
* `SKAFFOLD_PROFILE_AUTO_ACTIVATION` (same as `--profile-auto-activation`)
Expand Down
10 changes: 10 additions & 0 deletions docs-v2/content/en/schemas/v4beta11.json
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,15 @@
"description": "timeout for copying build contexts to a cluster. Defaults to 5 minutes (`5m`).",
"x-intellij-html-description": "timeout for copying build contexts to a cluster. Defaults to 5 minutes (<code>5m</code>)."
},
"destination": {
"items": {
"type": "string"
},
"type": "array",
"description": "additional tags to push.",
"x-intellij-html-description": "additional tags to push.",
"default": "[]"
},
"digestFile": {
"type": "string",
"description": "to specify a file in the container. This file will receive the digest of a built image. This can be used to automatically track the exact image built by kaniko.",
Expand Down Expand Up @@ -2888,6 +2897,7 @@
"target",
"initImage",
"image",
"destination",
"digestFile",
"imageFSExtractRetry",
"imageNameWithDigestFile",
Expand Down
Loading

0 comments on commit a1bd236

Please sign in to comment.