Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions docs/pages/configuration/commands/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ Custom commands are being shared in the `commands` section of `devspace.yaml`:
images:
default:
image: john/backend

commands:
- name: debug-backend
command: "devspace dev --profile=debug-backend $@"
profiles:
- name: debug-backend
patches:
- op: replace
path: images.default.entrypoint
value: ["npm", "run", "debug"]
debug-backend: |-
devspace dev $@
```

:::note
Expand All @@ -31,15 +26,13 @@ Custom commands can be used for more than just running `devspace` commands, e.g.
The above example configuration would allow everyone to run the custom command `debug-backend` like this:
```bash
devspace run debug-backend
devspace run debug-backend --verbose-dependencies
devspace run debug-backend -- --verbose-dependencies -s
devspace run debug-backend -n my-namespace
```

And `devspace run` would execute the following commands internally:
```bash
devspace dev --profile=debug-backend
devspace dev --profile=debug-backend --verbose-dependencies
devspace dev --profile=debug-backend --verbose-dependencies -s
devspace dev
devspace dev -n my-namespace
```

:::note `--` End of Options Separator
Expand Down
18 changes: 6 additions & 12 deletions docs/pages/configuration/dependencies/git-repository.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,21 @@ import ConfigPartialDependencyExecution from '../_partials/v2beta1/dependencies/

```yaml
dependencies:
- name: api-server
source:
api-server:
git: https://github.com/my-api-server
branch: stable
dev:
sync: true
- name: auth-server
source:
auth-server:
git: https://github.com/my-auth-server
revision: c967392
profile: production
- name: database-server
source:
pipeline: dev
database-server:
git: https://github.com/my-database-server
tag: v3.0.1
subPath: /configuration
dev:
ports: true
dev:
terminal:
my-dev:
imageSelector: ghcr.io/org/project/image
terminal: {}
```

:::info Authentication
Expand Down
23 changes: 9 additions & 14 deletions docs/pages/configuration/dependencies/local-folder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,17 @@ import ConfigPartialDependencyExecution from '../_partials/v2beta1/dependencies/

```yaml
dependencies:
- name: component-1
source:
component-1:
# Expects a devspace.yaml at ./different/component-1/devspace.yaml
path: ./different/component-1
path: ./different/component-1
- name: component-2
source:
path: ./different/component-2
path: ./different/component-2
component-2:
# Direct path to other-devspace.yaml
path: ./different/component-1/other-devspace.yaml
deployments:
- name: use-dependency-image
- name: use-dependency-image
helm:
componentChart: true
values:
containers:
- image: ghcr.io/org/project/image
use-dependency-image:
helm:
values:
containers:
- image: ghcr.io/org/project/image
```

Expand Down
2 changes: 2 additions & 0 deletions docs/pages/configuration/dev/connections/restart-helper.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ To tell DevSpace to inject the restart helper into the container, set `inject: t
dev:
app:
imageSelector: ghcr.io/org/project/image
command: ["restart", "this", "command"]
args: ["with", "these", "args"]
restartHelper:
inject: true
```
Expand Down
21 changes: 12 additions & 9 deletions docs/pages/configuration/pullSecrets/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ Image Pull Secrets are defined in the `pullSecrets` section of the `devspace.yam
# If you don't want to specify the password and username directly in the config
# you can use variables, .env file or save the credentials in the local docker store
pullSecrets:
- registry: my-registry.com:5000
username: ${REGISTRY_USER}
password: ${REGISTRY_PASSWORD}
my-pullsecret:
registry: my-registry.com:5000
username: ${REGISTRY_USER}
password: ${REGISTRY_PASSWORD}
```

</TabItem>
Expand All @@ -40,19 +41,21 @@ pullSecrets:
# to get these from the local docker store. Make sure you
# are logged into the registry with `docker login my-registry.com:5000`
pullSecrets:
- registry: my-registry.com:5000
my-pullsecret:
registry: my-registry.com:5000
```

</TabItem>
<TabItem value="custom">

```yaml
pullSecrets:
- registry: my-registry.com:5000
secret: my-pull-secret-name
serviceAccounts:
- default
- my-other-service-account
my-pullsecret:
registry: my-registry.com:5000
secret: my-pull-secret-name
serviceAccounts:
- default
- my-other-service-account
```

</TabItem>
Expand Down
9 changes: 8 additions & 1 deletion pkg/devspace/services/podreplace/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,23 @@ func buildDeployment(ctx devspacecontext.Context, name string, target runtime.Ob
return nil, errors.Wrap(err, "hash config")
}

metaObject := target.(metav1.Object)
deployment := &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: target.(metav1.Object).GetNamespace(),
Namespace: metaObject.GetNamespace(),
Annotations: map[string]string{
DevPodConfigHashAnnotation: configHash,
},
Labels: map[string]string{},
},
}
for k, v := range metaObject.GetAnnotations() {
deployment.Annotations[k] = v
}
for k, v := range metaObject.GetLabels() {
deployment.Labels[k] = v
}

podTemplate := &corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Expand Down