Skip to content
Draft
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
6 changes: 4 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ To change the default container runtime:

```yaml
# ...
container:
runtime: kubernetes
launchrctl:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must not be called launchrctl. We must find an agnostic name, not related to current binary name.

runtime:
container:
default_runtime: kubernetes
# ...
```

Expand Down
1 change: 1 addition & 0 deletions internal/launchr/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (

// PkgPath is a main module path.
const PkgPath = "github.com/launchrctl/launchr"
const ConfigKey = "launchrctl"

func init() {
// Set parent pid for subprocesses.
Expand Down
2 changes: 1 addition & 1 deletion pkg/action/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func WithDefaultRuntime(cfg launchr.Config) DecorateWithFn {
DefaultRuntime string `yaml:"default_runtime"`
}
var rtConfig configContainer
err := cfg.Get("runtime.container", &rtConfig)
err := cfg.Get(fmt.Sprintf("%s.runtime.container", launchr.ConfigKey), &rtConfig)
if err != nil {
launchr.Term().Warning().Printfln("configuration file field %q is malformed", "container")
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/actionnaming/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (p Plugin) OnAppInit(app launchr.App) error {
// Load naming configuration.
var launchrConfig launchrCfg
// @todo refactor yaml property position.
err := cfg.Get("launchrctl", &launchrConfig)
err := cfg.Get(launchr.ConfigKey, &launchrConfig)
if err != nil {
return err
}
Expand Down