forked from GoogleContainerTools/skaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
annotated-skaffold.yaml
176 lines (159 loc) · 7.05 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
apiVersion: skaffold/v1alpha2
kind: Config
build:
# tagPolicy 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`, `sha256` or `envTemplate`.
# If not specified, it defaults to `gitCommit: {}`.
tagPolicy:
# Tag the image with the git commit of your current repository.
gitCommit: {}
# Tag the image with the checksum of the built image (image id).
# sha256: {}
# Tag 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}}"
# Tag 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.
- imageName: gcr.io/k8s-skaffold/skaffold-example
# The path to your dockerfile context. Defaults to ".".
workspace: ../examples/getting-started
# Each artifact is of a given type among: `docker` and `bazel`.
# If not specified, it defaults to `docker: {}`.
docker:
# Dockerfile's location relative to workspace. Defaults to "Dockerfile"
dockerfilePath: 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
# This next section is where you'll put your specific builder configuration.
# Valid builders are `local`, `googleCloudBuild` and `kaniko`.
# 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:
# skipPush: true
# 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.
# Sources will be sent to a GCS bucket whose name is 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
#
# kaniko:
# gcsBucket: k8s-skaffold
# pullSecret: /a/secret/path/serviceaccount.json
# namespace: default
# timeout: 20m
# 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` or `helm`.
# 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:
# kustomizePath: "kustomization.yaml"
# 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
# valuesFilePath: helm-skaffold-values.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 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