Skip to content

Commit

Permalink
chore: bump examples/* to apiVersion: skaffold/v3
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-prindle committed Oct 24, 2022
1 parent 6c50b2a commit 8afa9cf
Show file tree
Hide file tree
Showing 83 changed files with 1,338 additions and 170 deletions.
2 changes: 1 addition & 1 deletion examples/bazel/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand Down
4 changes: 1 addition & 3 deletions examples/buildpacks-java/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: skaffold-buildpacks
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
trustBuilder: true
env:
- GOOGLE_RUNTIME_VERSION=8
profiles:
Expand Down
6 changes: 2 additions & 4 deletions examples/buildpacks-node/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: skaffold-buildpacks-node
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
trustBuilder: true
buildpacks: {}
3 changes: 1 addition & 2 deletions examples/buildpacks-python/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: skaffold-buildpacks
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
trustBuilder: true
profiles:
- name: gcb
build:
Expand Down
4 changes: 1 addition & 3 deletions examples/buildpacks/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: skaffold-buildpacks
buildpacks:
builder: "gcr.io/buildpacks/builder:v1"
trustBuilder: true
env:
- GOPROXY={{.GOPROXY}}
profiles:
Expand Down
19 changes: 13 additions & 6 deletions examples/cross-platform-builds/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: skaffold-example
deploy:
kubectl:
manifests:
- k8s-*
context: .
docker:
dockerfile: Dockerfile
noCache: true
tagPolicy:
gitCommit: {}
local:
concurrency: 1
manifests:
rawYaml:
- k8s-*
profiles:
- name: cloudbuild
build:
googleCloudBuild: {}
googleCloudBuild: {}
3 changes: 2 additions & 1 deletion examples/custom-buildx/buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# (1) delete the buildx builder named `skaffold-builder`, and
# (2) update the corresponding node-affinities in k8s/pod.yaml.

# The platforms to build.
# The platforms to build. Default to linux/amd64.
$PLATFORMS=${PLATFORMS:=linux/amd64}

# `buildx` uses named _builder_ instances configured for specific platforms.
# This script creates a `skaffold-builder` as required.
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-buildx/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/GoogleContainerTools/skaffold/examples/custom-buildx

go 1.19
go 1.18
2 changes: 1 addition & 1 deletion examples/custom-buildx/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3alpha1
kind: Config
build:
platforms: ["linux/amd64", "linux/arm64"]
Expand Down
9 changes: 4 additions & 5 deletions examples/custom-tests/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand All @@ -15,7 +15,6 @@ test:
- command: echo Hello world!!
dependencies:
command: echo [\"main_test.go\"]
deploy:
kubectl:
manifests:
- k8s-*
manifests:
rawYaml:
- k8s-*
9 changes: 4 additions & 5 deletions examples/custom/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: ko://github.com/GoogleContainerTools/skaffold/examples/custom
- image: github.com/googlecontainertools/skaffold/examples/custom
custom:
buildCommand: ./build.sh
dependencies:
paths:
- "**/*.go"
- go.mod
- .ko.yaml
- "go.mod"
- "**.go"
tagPolicy:
sha256: {}
2 changes: 1 addition & 1 deletion examples/dev-journey-buildpacks/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand Down
1 change: 0 additions & 1 deletion examples/docker-deploy/bert/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM golang:1.18 as builder
WORKDIR /code
COPY test .
COPY main.go .
COPY go.mod .
# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
Expand Down
2 changes: 1 addition & 1 deletion examples/docker-deploy/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
local:
Expand Down
10 changes: 4 additions & 6 deletions examples/gcb-kaniko/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
googleCloudBuild:
# Change `k8s-skaffold` with your PROJECT_ID
projectId: k8s-skaffold
artifacts:
- image: skaffold-example
kaniko:
cache: {}
deploy:
kubectl:
manifests:
- k8s-*
manifests:
rawYaml:
- k8s-*
9 changes: 4 additions & 5 deletions examples/generate-pipeline/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: pipeline-example
deploy:
kubectl:
manifests:
- k8s-*
manifests:
rawYaml:
- k8s-*
10 changes: 6 additions & 4 deletions examples/getting-started-kustomize/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
metadata:
name: getting-started-kustomize
Expand All @@ -8,18 +8,20 @@ build:
context: app
docker:
dockerfile: Dockerfile
deploy:
manifests:
kustomize:
paths:
- overlays/dev
deploy:
kubectl: {}
profiles:
- name: prod
deploy:
manifests:
kustomize:
paths:
- overlays/prod
- name: staging
deploy:
manifests:
kustomize:
paths:
- overlays/staging
1 change: 0 additions & 1 deletion examples/getting-started/k8s-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: Pod
metadata:
name: getting-started
namespace: ""
spec:
containers:
- name: getting-started
Expand Down
9 changes: 4 additions & 5 deletions examples/getting-started/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: skaffold-example
deploy:
kubectl:
manifests:
- k8s-*
manifests:
rawYaml:
- k8s-pod.yaml
10 changes: 4 additions & 6 deletions examples/google-cloud-build/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
googleCloudBuild:
# Change `k8s-skaffold` with your PROJECT_ID
projectId: k8s-skaffold
artifacts:
- image: skaffold-example
deploy:
kubectl:
manifests:
- k8s-*
manifests:
rawYaml:
- k8s-*
5 changes: 0 additions & 5 deletions examples/helm-deployment-dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ This example follows the [helm](../helm-deployment) example, but with a local ch

The `skipBuildDependencies` option is used to skip the `helm dep build` command. This must be disabled for charts with local dependencies.

The image can be passed to the subchart using the standard Helm format of `subchart-name.value`.

```yaml
deploy:
helm:
Expand All @@ -16,9 +14,6 @@ deploy:
chartPath: skaffold-helm
namespace: skaffold
skipBuildDependencies: true # Skip helm dep build
artifactOverrides :
image: skaffold-helm
"subchart.image": skaffold-helm # Set image for subchart
valuesFiles:
- helm-values-file.yaml
```
6 changes: 1 addition & 5 deletions examples/helm-deployment-dependencies/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
tagPolicy:
Expand All @@ -14,10 +14,6 @@ deploy:
#valuesFiles:
#- helm-skaffold-values.yaml
skipBuildDependencies: true # Skip helm dep build
artifactOverrides:
image: skaffold-helm
skaffold-helm-subchart:
image: 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
Expand Down
4 changes: 2 additions & 2 deletions examples/helm-deployment/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
- image: skaffold-helm
deploy:
manifests:
helm:
releases:
- name: skaffold-helm
Expand Down
2 changes: 1 addition & 1 deletion examples/helm-remote-repo/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
deploy:
helm:
Expand Down
2 changes: 1 addition & 1 deletion examples/hot-reload/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion examples/jib-gradle/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion examples/jib-multimodule/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion examples/jib-sync/skaffold-gradle.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion examples/jib-sync/skaffold-maven.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion examples/jib/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand Down
9 changes: 4 additions & 5 deletions examples/kaniko/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: skaffold/v2beta29
apiVersion: skaffold/v3
kind: Config
build:
artifacts:
Expand All @@ -9,7 +9,6 @@ build:
pullSecretName: e2esecret-with-path
pullSecretPath: kaniko-secret.json
namespace: default
deploy:
kubectl:
manifests:
- k8s-*
manifests:
rawYaml:
- k8s-*
18 changes: 18 additions & 0 deletions examples/ko-sync-infer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### Example: inferred file sync using the ko builder

This example uses
[inferred file sync](https://skaffold.dev/docs/pipeline-stages/filesync/#inferred-sync-mode)
for static assets with the
[`ko` builder](https://skaffold.dev/docs/pipeline-stages/builders/ko/)
for a Go web app.

To observe the behavior of file sync, run this command:

```shell
skaffold dev
```

Try changing the HTML file in the `kodata` directory to see how Skaffold
syncs the file.

If change the the `main.go` file, Skaffold will rebuild and redeploy the image.
Loading

0 comments on commit 8afa9cf

Please sign in to comment.