Skip to content

Commit f8abe6b

Browse files
committed
docs: dependencies update
1 parent 9eb2c38 commit f8abe6b

1 file changed

Lines changed: 28 additions & 40 deletions

File tree

docs/pages/configuration/dependencies/README.mdx

Lines changed: 28 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,30 @@ Dependencies for DevSpace projects are defined within the `dependencies` section
2626

2727
```yaml
2828
dependencies:
29-
- name: api-server
30-
source:
29+
api-server:
3130
git: https://github.com/my-api-server
3231
branch: stable
33-
dev:
34-
ports: true
35-
- name: auth-server
36-
source:
32+
pipeline: dev
33+
auth-server:
3734
git: https://github.com/my-auth-server
3835
revision: c967392
39-
profile: production
40-
- name: database-server
41-
source:
36+
profile: production
37+
database-server:
4238
git: https://github.com/my-database-server
4339
tag: v3.0.1
4440
subPath: /configuration
45-
vars:
46-
- name: ROOT_PASSWORD
47-
value: ${ROOT_PASSWORD}
41+
vars:
42+
ROOT_PASSWORD: ${ROOT_PASSWORD}
4843
```
4944
5045
</TabItem>
5146
<TabItem value="path">
5247
5348
```yaml
5449
dependencies:
55-
- name: component-1
56-
source:
50+
component-1:
5751
path: ./component-1
58-
- name: component-2
59-
source:
52+
component-2:
6053
path: ./component-2
6154
```
6255
@@ -74,26 +67,23 @@ DevSpace is able to work with dependencies from the following sources:
7467
Dependencies will be executed in the order that they are specified under `dependencies` and always before image building and deployments defined in the top-level `devspace.yaml`. `dev` configuration that should be reused from a dependency will be executed alongside regular `dev` configuration specified in the top-level `devspace.yaml` after the DevSpace deployment pipeline ran through. Example:
7568
```yaml
7669
dependencies:
77-
- name: dep1
78-
source:
70+
dep1:
7971
path: dep1
80-
dev:
81-
sync: true
82-
- name: dep2
83-
source:
72+
pipeline: dev
73+
dep2:
8474
path: dep2
85-
dev:
86-
ports: true
75+
pipeline: dev
8776
images:
8877
image1:
8978
image: myimage/image
9079
deployments:
91-
- name: deployment1
92-
helm:
93-
...
80+
deployment1:
81+
helm:
82+
...
9483
dev:
95-
ports: ...
96-
sync: ...
84+
my-dev:
85+
ports: ...
86+
sync: ...
9787
```
9888

9989
### Explanation
@@ -111,14 +101,15 @@ In the above `devspace.yaml`, execution order would be as followed:
111101
You can reference dependencies images via `my-dependency.image` in the `./devspace.yaml`:
112102
```yaml
113103
dependencies:
114-
- name: dep1
115-
source:
104+
dep1:
116105
path: dep1
106+
117107
dev:
118-
# Will open a terminal to the pod with the
119-
# image from dep1
120-
terminal:
108+
my-dev:
121109
imageSelector: ${runtime.dependencies.dep1.images.image1}
110+
# Will open a terminal to the pod with the
111+
# image from dep1
112+
terminal: {}
122113
```
123114

124115
With `dep1/devspace.yaml`:
@@ -127,9 +118,8 @@ images:
127118
image1:
128119
image: myusername/devspace
129120
deployments:
130-
- name: quickstart
121+
quickstart:
131122
helm:
132-
componentChart: true
133123
values:
134124
containers:
135125
- image: myusername/devspace
@@ -140,13 +130,11 @@ deployments:
140130
It is also possible to reference a dependency's image with runtime variables in a deployment:
141131
```yaml
142132
dependencies:
143-
- name: dep1
144-
source:
133+
dep1:
145134
path: dep1
146135
deployments:
147-
- name: quickstart
136+
quickstart:
148137
helm:
149-
componentChart: true
150138
values:
151139
containers:
152140
- image: ${runtime.dependencies.dep1.image1.image}:${runtime.dependencies.dep1.image1.tag} # -> replaced with 'myusername/devspace:xxxx'

0 commit comments

Comments
 (0)