forked from GoogleContainerTools/skaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
annotated-skaffold.yaml
207 lines (189 loc) · 8.66 KB
/
annotated-skaffold.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
apiVersion: skaffold/v1beta1
kind: Config
build:
# tagPolicy (beta) determines how Skaffold is going to tag your images.
# We provide a few strategies here, although you most likely won't need to care!
# The policy can `gitCommit` (beta), `sha256` (beta), `envTemplate` (beta) or `dateTime` (beta).
# If not specified, it defaults to `gitCommit: {}`.
tagPolicy:
# gitCommit tags the image with the git commit of your current repository.
gitCommit: {}
# sha256 tags the image with the checksum of the built image (image id).
# sha256: {}
# envTemplate tags the image with a configurable template string.
# The template must be in the golang text/template syntax: https://golang.org/pkg/text/template/
# The template is compiled and executed against the current environment,
# with those variables injected:
# IMAGE_NAME | Name of the image being built, as supplied in the artifacts section.
# DIGEST | Digest of the newly built image. For eg. `sha256:27ffc7f352665cc50ae3cbcc4b2725e36062f1b38c611b6f95d6df9a7510de23`.
# DIGEST_ALGO | Algorithm used by the digest: For eg. `sha256`.
# DIGEST_HEX | Digest of the newly built image. For eg. `27ffc7f352665cc50ae3cbcc4b2725e36062f1b38c611b6f95d6df9a7510de23`.
# Example
# envTemplate:
# template: "{{.RELEASE}}-{{.IMAGE_NAME}}"
# dateTime tags the image with the build timestamp.
# The format can be overridden with golang formats, see: https://golang.org/pkg/time/#Time.Format
# Default format is "2006-01-02_15-04-05.999_MST
# The timezone is by default the local timezone, this can be overridden, see https://golang.org/pkg/time/#Time.LoadLocation
# dateTime:
# format: "2006-01-02"
# timezone: "UTC"
# artifacts is a list of the actual images you're going to be building
# you can include as many as you want here.
artifacts:
# The name of the image to be built.
- image: gcr.io/k8s-skaffold/skaffold-example
# The path to your dockerfile context. Defaults to ".".
context: ../examples/getting-started
# Skaffold can sync local files with remote pods (alpha) instead
# of rebuilding the whole artifact's image. This is a mapping
# of local files to sync to remote folders.
# sync:
# '*.py': .
# Each artifact is of a given type among: `docker` (beta), `bazel` (beta), `jibMaven` (alpha) and `jibGradle` (alpha).
# If not specified, it defaults to `docker: {}`.
docker:
# Dockerfile's location relative to workspace. Defaults to "Dockerfile"
dockerfile: Dockerfile
# Key/value arguements passed to the docker build.
buildArgs:
key1: "value1"
key2: "value2"
# Images to consider as cache sources
cacheFrom:
- image1
- image2
# Dockerfile target name to build.
# target: stageName
# bazel requires bazel CLI to be installed and the artifacts sources to
# contain Bazel configuration files.
# bazel:
# target: //:skaffold_example.tar
# additional args to pass to `bazel build`
# args:
# - "arg1"
# - "arg2"
# jibMaven builds containers using the Jib plugin for Maven.
# jibMaven:
# module: modulename # selects which maven module to build, for a multimodule project
# profile: profilename # selects which maven profile to activate
# jibGradle builds containers using the Jib plugin for Gradle.
# jibGradle:
# project: projectname # selects which gradle project to build
# This next section is where you'll put your specific builder configuration.
# Valid builders are `local` (beta), `googleCloudBuild` (beta) and `kaniko` (beta).
# Defaults to `local: {}`
# Pushing the images can be skipped. If no value is specified, it'll default to
# `true` on minikube or Docker for Desktop, for even faster build and deploy cycles.
# `false` on other types of kubernetes clusters that require pushing the images.
# skaffold defers to your ~/.docker/config for authentication information.
# If you're using Google Container Registry, make sure that you have gcloud and
# docker-credentials-helper-gcr configured correctly.
#
# By default, the local builder connects to the Docker daemon with Go code to build
# images. If `useDockerCLI` is set, skaffold will simply shell out to the docker CLI.
# `useBuildkit` can also be set to activate the experimental BuildKit feature.
#
# local:
# false by default for local clusters, true for remote clusters
# push: false
# useDockerCLI: false
# useBuildkit: false
# Docker artifacts can be built on Google Cloud Build. The projectId then needs
# to be provided and the currently logged user should be given permissions to trigger
# new builds on Cloud Build.
# If the projectId is not provided, Skaffold will try to guess it from the image name.
# For eg. If the artifact image name is gcr.io/myproject/image, then Skaffold will use
# the `myproject` GCP project.
# All the other parameters are also optional. The default values are listed here:
# googleCloudBuild:
# projectId: YOUR_PROJECT
# diskSizeGb: 200
# machineType: "N1_HIGHCPU_8"|"N1_HIGHCPU_32"
# timeout: 10000s
# dockerImage: gcr.io/cloud-builders/docker
# Docker artifacts can be built on a Kubernetes cluster with Kaniko.
# Exactly one buildContext must be specified to use kaniko
# If localDir is specified, skaffold will mount sources directly via a emptyDir volume
# If gcsBucket is specified, skaffold will send sources to the GCS bucket provided
# Kaniko also needs access to a service account to push the final image.
# See https://github.com/GoogleContainerTools/kaniko#running-kaniko-in-a-kubernetes-cluster
# If cache is specified, kaniko will use a remote cache which will speed up builds.
# A cache repo can be specified to store cached layers, otherwise one will be inferred
# from the image name. See https://github.com/GoogleContainerTools/kaniko#caching
#
# kaniko:
# buildContext:
# gcsBucket: k8s-skaffold
# localDir: {}
# cache:
# repo: gcr.io/my-project/skaffold/cache
# pullSecret: /a/secret/path/serviceaccount.json
# pullSecretName: kaniko-secret
# namespace: default
# timeout: 20m
# image: defaults to the latest released version of `gcr.io/kaniko-project/executor`
# The deploy section has all the information needed to deploy. Along with build:
# it is a required section.
deploy:
# The type of the deployment method can be `kubectl` (beta), `helm` (beta) or `kustomize` (beta).
# The kubectl deployer uses a client side `kubectl apply` to apply the manifests to the cluster.
# You'll need a kubectl CLI version installed that's compatible with your cluster.
kubectl:
# manifests to deploy from files.
manifests:
- ../examples/getting-started/k8s-*
# kubectl can be passed additional option flags either on every command (Global),
# on creations (Apply) or deletions (Delete).
# flags:
# global: [""]
# apply: [""]
# delete: [""]
# manifests to deploy from remote cluster.
# The path to where these manifests live in remote kubernetes cluster.
# Example
# remoteManifests:
# - deployment/web-app1
# - namespace:deployment/web-app2
# kustomize:
# path: .
# kustomize deploys manifests with kubectl.
# kubectl can be passed additional option flags either on every command (Global),
# on creations (Apply) or deletions (Delete).
# flags:
# global: [""]
# apply: [""]
# delete: [""]
# helm:
# helm releases to deploy.
# releases:
# - name: skaffold-helm
# chartPath: skaffold-helm
# valuesFiles:
# - first-values-file.yaml
# - second-values-file.yaml
# values:
# image: skaffold-helm
# namespace: skaffold
# version: ""
# recreatePods: false
#
# # setValues get appended to the helm deploy with --set.
# setValues:
# key: "value"
#
# # packaged section allows to package chart setting specific version
# # and/or appVersion using "helm package" command.
# packaged:
# # version is passed to "helm package --version" flag.
# # Note that you can specify both static string or dynamic template.
# version: {{ .CHART_VERSION }}-dirty
# # appVersion is passed to "helm package --app-version" flag.
# # Note that you can specify both static string or dynamic template.
# appVersion: {{ .CHART_VERSION }}-dirty
# profiles (beta) section has all the profile information which can be used to override any build or deploy configuration
profiles:
- name: gcb
build:
googleCloudBuild:
projectId: k8s-skaffold