You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cobraCmd.Flags().BoolVar(&cmd.flags.noSleep, "no-sleep", cmd.flags.noSleep, "Enable no-sleep (Override the containers.default.command and containers.default.args values with empty strings)")
Copy file name to clipboardExpand all lines: docs/docs/configuration/config.yaml.md
+57-18Lines changed: 57 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,15 @@ This is an example of a [.devspace/config.yaml](#)
7
7
# Devspace version, currently is always v1
8
8
version: v1
9
9
devSpace:
10
+
# terminal options for devspace up and devspace enter
11
+
terminal:
12
+
# the container name within the selected release pod to open a terminal connection to (is also a flag in `devspace up -c CONTAINER`)
13
+
containerName: default
14
+
# the command to execute within the container when using `devspace up` or `devspace enter`
15
+
command:
16
+
- sh
17
+
- -c
18
+
- bash
10
19
release:
11
20
# Name of helm release that is used for deploying
12
21
# the devspace chart (contents of /chart)
@@ -33,6 +42,8 @@ devSpace:
33
42
- resourceType: pod
34
43
labelSelector:
35
44
release: my-app
45
+
# The container within the pod to sync to
46
+
containerName: default
36
47
# Sync the complete local project path
37
48
localSubPath: ./
38
49
# Into the remote container path /app
@@ -49,7 +60,20 @@ images:
49
60
tag: 9u5ye0G
50
61
# Registry where the build image will be pushed to
51
62
registry: default
63
+
# Specifies where the docker context path is
64
+
contextPath: ./
65
+
# Specifies where the Dockerfile lies
66
+
dockerfilePath: ./Dockerfile
67
+
# Specifies how to build the image
52
68
build:
69
+
options:
70
+
# Used for multi-stage builds
71
+
target: development
72
+
# buildArgs passed to docker during build
73
+
buildArgs:
74
+
myarg1: myvalue1
75
+
# network mode (see [network](https://docs.docker.com/network/))
76
+
network: bridge
53
77
engine:
54
78
docker:
55
79
# Use docker for image building
@@ -103,7 +127,12 @@ A [.devspace/config.yaml](#) contains any public/shared configuration for runnin
103
127
**Note: You can easily re-configure your DevSpace by running `devspace init -r`.**
104
128
105
129
## devspace
106
-
Defines the DevSpace including everything related to portForwarding, sync, and the helm release config.
130
+
Defines the DevSpace including everything related to terminal, portForwarding, sync, and the helm release config.
131
+
132
+
### devspace.terminal
133
+
In this section options are defined, what should happen when devspace up or devspace enter connect to the release pod.
134
+
- `containerName`*string* the name of the container to connect to within the selected pod (default is the first defined container)
135
+
- `command` *string array* the default command that is executed when entering a pod with devspace up or devspace enter (default is: ["sh", "-c", "command -v bash >/dev/null 2>&1 && exec bash || exec sh"])
107
136
108
137
### devspace.release
109
138
Defines how the DevSpace is deployed to your cluster. See [Type: Release](#type-release) for details.
@@ -116,15 +145,16 @@ To access applications running inside a DevSpace, the DevSpace CLI allows to con
116
145
117
146
### devspace.portForwarding[].portMappings[]
118
147
PortMapping:
119
-
- `localPort`*string* on localhost
120
-
- `remotePort`*string* remote pod port
148
+
- `localPort`*string* the local port on the machine
149
+
- `remotePort`*string* the remote pod port
121
150
122
151
In the example above, you could open `localhost:8080` inside your browser to see the output of the application listening on port 80 within your DevSpace.
123
152
124
153
### devspace.sync
125
154
To comfortably sync code to a DevSpace, the DevSpace CLI allows to configure real-time code synchronizations. A sync config consists of the following:
126
155
- `resourceType`*string* kubernetes resource type that is selected (currently only `pod` is supported)
127
-
- `labelSelector`*map[string]string* usually the release/app name
156
+
- `labelSelector`*map[string]string* label selector to select the correct pod (usually the release/app name)
157
+
- `containerName` *string* the name of the container within the pod to sync to (default: the first specified container in the pod)
128
158
- `localSubPath` *string* relative path to the folder that should be synced (default: path to your local project root)
129
159
- `containerPath`*string* absolute path within the container
130
160
- `excludePaths`*string array* paths to exclude files/folders from sync in .gitignore syntax
@@ -138,20 +168,29 @@ This section of the config defines a map of images that can be used in the helm
138
168
139
169
### images[]
140
170
An image is defined by:
141
-
- `name`*string* of the image that is being pushed to the registry
142
-
- `tag`*string* stating the latest tag pushed to the registry (auto-generated)
143
-
- `registry`*string* referencing one of the keys defined in the `registries` map
171
+
- `name`*string* name of the image that is being pushed to the registry
172
+
- `tag`*string* tag indicates the latest tag pushed to the registry (auto-generated)
173
+
- `registry`*string* registry references one of the keys defined in the `registries` map
144
174
- `build`*BuildConfig* defines the build procedure for this image
145
175
146
176
### images[].build
147
177
BuildConfig:
148
-
- `engine`*Engine* The engine that should be used for building the image
178
+
- `dockerfilePath` *string* specifies the path where the dockerfile lies (default: ./Dockerfile)
179
+
- `contextPath` *string* specifies the context path for docker (default: ./)
180
+
- `engine`*Engine* the engine that should be used for building the image
181
+
- `options`*BuildOptions* additional options used for building the image
182
+
183
+
### images[].build.options
184
+
BuildOptions:
185
+
- `buildArgs`*map[string]string* key-value map used for specifying build arguments passed to docker
186
+
- `target`*string* the target used for multi-stage builds (see [multi-stage-build](https://docs.docker.com/develop/develop-images/multistage-build/))
187
+
- `network`*string* the network mode used for building the image (see [network](https://docs.docker.com/network/))
149
188
150
189
### images[].build.engine
151
190
Engine:
152
191
An image build is mainly defined by the build engine. There are 2 build engines currently supported (choose only one):
153
-
- `docker`*DockerConfig* uses the local Docker daemon or a Docker daemon running inside a Minikube cluster (if `preferMinikube` == true)
154
-
- `kaniko`*KanikoConfig* builds images in userspace within a build pod running inside the Kubernetes cluster
192
+
- `docker`*DockerConfig* use the local Docker daemon or a Docker daemon running inside a Minikube cluster (if `preferMinikube` == true)
193
+
- `kaniko`*KanikoConfig* build images in userspace within a build pod running inside the Kubernetes cluster
155
194
156
195
### images[].build.engine.docker
157
196
DockerConfig:
@@ -168,25 +207,25 @@ This section of the config defines a map of image registries. You can use any ex
168
207
169
208
### registries[]
170
209
ImageRegistry:
171
-
- `url` *string* of the registry (format: myregistry.com:port)
210
+
- `url` *string* the url of the registry (format: myregistry.com:port)
172
211
- `insecure`*bool* flag to allow pushing to registries without HTTPS
173
212
- `user`*RegistryUser* credentials for pushing to / pulling from the registry
174
213
175
214
### registries[].user
176
215
RegistryUser:
177
-
- `username`*string* that should be used for pushing and pulling from the registry
178
-
- `password`*string* that should be used for pushing and pulling from the registry
216
+
- `username`*string* the user that should be used for pushing and pulling from the registry
217
+
- `password`*string* the password should be used for pushing and pulling from the registry
179
218
180
219
## services
181
220
Defines cluster services that the DevSpace uses.
182
221
183
222
### services.internalRegistry
184
223
The `internalRegistry` is used to tell the DevSpace CLI to deploy a private registry inside the Kubernetes cluster:
185
-
- `release` *Release* for deploying the registry (see [Type: Release](#type-release))
224
+
- `release` *Release* release options for deploying the registry (see [Type: Release](#type-release))
186
225
187
226
### services.tiller
188
227
The `tiller` service is defined by:
189
-
- `release` *Release* definition for tiller (see [Type: Release](#type-release))
228
+
- `release` *Release* release definition for tiller (see [Type: Release](#type-release))
190
229
- `appNamespaces`*string array* defines a list of namespace that tiller may deploy applications to
191
230
192
231
## cluster
@@ -206,6 +245,6 @@ ClusterUser:
206
245
207
246
## Type: Release
208
247
A `release` is specified through:
209
-
- `name`*string* of the release
210
-
- `namespace`*string* to deploy the release to
211
-
- `values`*map[string] any* that are set during the deployment (contents of the values.yaml in helm)
248
+
- `name`*string* name of the release
249
+
- `namespace`*string* the namespace to deploy the release to
250
+
- `values`*map[string] any* override values that are set during the deployment (contents of the values.yaml in helm)
0 commit comments