Skip to content

Commit f230439

Browse files
author
gentele
committed
update README
1 parent 637101c commit f230439

5 files changed

Lines changed: 153 additions & 138 deletions

File tree

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
![DevSpace Workflow](docs/website/static/img/header-readme.svg)
22

3-
# DevSpace CLI - Cloud-Native Development with Kubernetes
3+
# DevSpace - Cloud-Native Development with Kubernetes
44
[![Build Status](https://travis-ci.org/covexo/devspace.svg?branch=master)](https://travis-ci.org/covexo/devspace)
55
[![Go Report Card](https://goreportcard.com/badge/github.com/covexo/devspace)](https://goreportcard.com/report/github.com/covexo/devspace)
66
[![Join the community on Spectrum Chart](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/devspace)
77

8-
With the DevSpace CLI, developers can build cloud-native applications directly inside a Kubernetes cluster. It works with any self-hosted Kubernetes cluster (e.g. minikube or baremetal) as well as with managed Kubernetes clusters provided by cloud platforms, e.g. Google Kubernetes Engine.
8+
With a DevSpace, you can build, test and run code directly inside any Kubernetes cluster. You can run `devspace up` in any of your projects and the client-only DevSpace CLI will start a DevSpace within your Kubernetes cluster. Keep coding as usual and the DevSpace CLI will sync any code change directly into the containers of your DevSpace. No more waiting for re-building images, re-deploying containers and restarting applications on every source code change. Simply edit your code with any IDE and run your code instantly inside your DevSpace.
99

1010
## Why use a DevSpace?
11-
Your DevSpace lets you build, test and run code directly inside a Kubernetes cluster and:
12-
- Allows you to access cluster-internal services and data with ease
13-
- Works perfectly with your favorite **hot reloading** tools (e.g. nodemon)
14-
- Lets you iterate quickly: no more re-building and pushing images on every change
15-
- Integrates into your existing workflow: **code with your favorite IDE** and desktop tools
16-
- Allows you to build, test and run code directly inside Kubernetes (via **real-time code synchronization**)
17-
- Supports efficient debugging through port forwarding and terminal proxying
18-
- Provides **automatic image building** without the need to install Docker
19-
- Lets you migrate to Docker & Kubernetes within minutes
20-
- Works with any Kubernetes cluster (e.g. minikube, self-hosted or cloud platform)
11+
Program inside any Kubernetes cluster (e.g. minikube, self-hosted or cloud platform) and:
12+
- iterate quickly: no more re-building and pushing images on every change
13+
- save time with **hot reloading** tools (e.g. nodemon)
14+
- keep your existing workflow: **code with your favorite IDE** and desktop tools
15+
- access cluster-internal services and data with ease
16+
- debug efficiently with port forwarding and terminal proxying
17+
- migrate to Docker & Kubernetes within minutes
18+
19+
## Demo
20+
coming soon
21+
22+
## Installation
23+
2124

2225
## Quickstart
2326
The DevSpace CLI allows you to create a DevSpace for any existing project with just a single command:
@@ -28,9 +31,6 @@ Take a look at the [Getting Started Guide](https://devspace.covexo.com/docs/gett
2831

2932
**Note:** Don't worry, with the cleanup command `devspace reset`, you can easily reset your project and go back to local development.
3033

31-
## Demo
32-
coming soon
33-
3434
## Documentation
3535
Here you can find some links to the most important pages of our documentation:
3636
- [Getting Started Guide](https://devspace.covexo.com/docs/getting-started/quickstart.html)

cmd/init.go

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ type InitCmd struct {
2626
chartGenerator *generator.ChartGenerator
2727
config *v1.Config
2828
overwriteConfig *v1.Config
29+
defaultImage *v1.ImageConfig
30+
defaultRegistry *v1.RegistryConfig
2931
}
3032

3133
// InitCmdFlags are the flags available for the init-command
@@ -117,12 +119,25 @@ func (cmd *InitCmd) Run(cobraCmd *cobra.Command, args []string) {
117119
Namespace: configutil.String("default"),
118120
},
119121
},
120-
Image: &v1.ImageConfig{
121-
Name: configutil.String("devspace"),
122+
Images: &map[string]*v1.ImageConfig{
123+
"default": &v1.ImageConfig{
124+
Name: configutil.String("devspace"),
125+
},
126+
},
127+
Registries: &map[string]*v1.RegistryConfig{
128+
"default": &v1.RegistryConfig{
129+
Auth: &v1.RegistryAuth{},
130+
},
122131
},
123132
})
124133
cmd.overwriteConfig = configutil.GetOverwriteConfig()
125134

135+
imageMap := *cmd.config.Images
136+
cmd.defaultImage, _ = imageMap["default"]
137+
138+
registryMap := *cmd.config.Registries
139+
cmd.defaultRegistry, _ = registryMap["default"]
140+
126141
cmd.initChartGenerator()
127142

128143
createChart := cmd.flags.overwrite
@@ -153,7 +168,7 @@ func (cmd *InitCmd) Run(cobraCmd *cobra.Command, args []string) {
153168
cmd.configureKubernetes()
154169
cmd.configureDevSpace()
155170

156-
cmd.config.Image.Name = cmd.config.DevSpace.Release.Name
171+
cmd.defaultImage.Name = cmd.config.DevSpace.Release.Name
157172

158173
cmd.configureTiller()
159174
cmd.configureRegistry()
@@ -373,7 +388,6 @@ func (cmd *InitCmd) configureKubernetes() {
373388
}
374389

375390
func (cmd *InitCmd) configureRegistry() {
376-
registryConfig := cmd.config.Image.Registry
377391
internalRegistryConfig := cmd.config.Services.InternalRegistry
378392

379393
enableAutomaticBuilds := stdinutil.GetFromStdin(&stdinutil.GetFromStdinParams{
@@ -386,8 +400,8 @@ func (cmd *InitCmd) configureRegistry() {
386400
internalRegistryKey := "internal registry"
387401
defaultRegistryValue := internalRegistryKey
388402

389-
if registryConfig.URL != nil {
390-
defaultRegistryValue = *registryConfig.URL
403+
if cmd.defaultRegistry.URL != nil {
404+
defaultRegistryValue = *cmd.defaultRegistry.URL
391405
}
392406
registryURL := stdinutil.GetFromStdin(&stdinutil.GetFromStdinParams{
393407
Question: "Which registry do you want to push to? (URL or 'internal registry')",
@@ -396,19 +410,27 @@ func (cmd *InitCmd) configureRegistry() {
396410
})
397411

398412
if *registryURL != internalRegistryKey {
399-
registryConfig.URL = registryURL
413+
cmd.defaultRegistry.URL = registryURL
400414
internalRegistryConfig = nil
401415
} else {
402-
registryConfig.URL = nil
403-
404416
if internalRegistryConfig.Release.Name == nil {
405417
internalRegistryConfig.Release.Name = configutil.String("devspace-registry")
406418
}
407419

408420
if internalRegistryConfig.Release.Namespace == nil {
409421
internalRegistryConfig.Release.Namespace = cmd.config.DevSpace.Release.Namespace
410422
}
411-
registryAuth := cmd.overwriteConfig.Image.Registry.Auth
423+
overwriteRegistryMap := *cmd.overwriteConfig.Registries
424+
425+
overwriteRegistryConfig, overwriteRegistryConfigFound := overwriteRegistryMap["default"]
426+
427+
if !overwriteRegistryConfigFound {
428+
overwriteRegistryConfig = &v1.RegistryConfig{
429+
Auth: &v1.RegistryAuth{},
430+
}
431+
overwriteRegistryMap["default"] = overwriteRegistryConfig
432+
}
433+
registryAuth := overwriteRegistryConfig.Auth
412434

413435
if registryAuth.Username == nil {
414436
randomUserSuffix, err := randutil.GenerateRandomString(5)

cmd/up.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type UpCmd struct {
4141
type UpCmdFlags struct {
4242
tiller bool
4343
open string
44-
initRegistry bool
44+
initRegistries bool
4545
build bool
4646
shell string
4747
sync bool
@@ -55,7 +55,7 @@ type UpCmdFlags struct {
5555
var UpFlagsDefault = &UpCmdFlags{
5656
tiller: true,
5757
open: "cmd",
58-
initRegistry: true,
58+
initRegistries: true,
5959
build: true,
6060
sync: true,
6161
deploy: false,
@@ -130,7 +130,7 @@ func (cmd *UpCmd) Run(cobraCmd *cobra.Command, args []string) {
130130

131131
cmd.initHelm()
132132

133-
if cmd.flags.initRegistry {
133+
if cmd.flags.initRegistries {
134134
if cmd.flags.initRegistry && cmd.flags.imageDestination == "" {
135135
log.StartWait("Initializing docker registry")
136136
err := registry.InitRegistry(cmd.kubectl, cmd.helm)

pkg/devspace/config/v1/services.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ type TillerConfig struct {
1515
//InternalRegistry defines the deployment of an internal registry
1616
type InternalRegistry struct {
1717
Release *Release `yaml:"release,omitempty"`
18-
Host *string `yaml:"host,omitempty"`
1918
}

0 commit comments

Comments
 (0)