Skip to content

Commit ca058ed

Browse files
authored
Merge pull request #2158 from FabianKramm/print-feat
refactor: add Match all to ssh config
2 parents 5cea9b6 + bfeba6e commit ca058ed

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

cmd/root.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ func NewRootCmd(f factory.Factory) *cobra.Command {
101101
},
102102
Long: `DevSpace accelerates developing, deploying and debugging applications with Docker and Kubernetes. Get started by running the init command in one of your projects:
103103
104-
devspace init`,
104+
devspace init
105+
# Develop an existing application
106+
devspace dev
107+
DEVSPACE_CONFIG=other-config.yaml devspace dev`,
105108
}
106109
}
107110

docs/pages/configuration/variables.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ DevSpace also reads environment variables from the `.env` file inside your proje
144144
- Variables defined in your `.env` file take precende over the default values defined for config variables (configured in the `vars` section of `devspace.yaml`).
145145
:::
146146

147+
## `$DEVSPACE_CONFIG` For Config Path
148+
You can tell DevSpace to load a different config via the `DEVSPACE_CONFIG` environment variable. You can specify this before actually executing DevSpace via:
149+
```bash
150+
DEVSPACE_CONFIG=my-other-devspace.yaml devspace dev
151+
```
147152

148153
## `$DEVSPACE_FLAGS` For Default Flags
149154
A common use case for the `.env` file is to set default flags for the `devspace` commands such as `devspace dev` or `devspace deploy`. You can define the following environment variables to set default flags:

pkg/devspace/services/ssh/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ func includeDevSpaceConfig(path string) (string, error) {
151151

152152
// add new section
153153
newLines = append(newLines, startMarker)
154+
newLines = append(newLines, "Match all")
154155
newLines = append(newLines, "Include devspace_config")
155156
newLines = append(newLines, "# DevSpace End")
156157
return strings.Join(newLines, "\n"), nil
@@ -193,6 +194,7 @@ func addHost(path, host, port string) (string, error) {
193194
newLines = append(newLines, startMarker)
194195
newLines = append(newLines, "Host "+host)
195196
newLines = append(newLines, " HostName localhost")
197+
newLines = append(newLines, " LogLevel error")
196198
newLines = append(newLines, " Port "+port)
197199
newLines = append(newLines, " IdentityFile "+DevSpaceSSHPrivateKeyFile)
198200
newLines = append(newLines, " StrictHostKeyChecking no")

0 commit comments

Comments
 (0)