Skip to content

Commit

Permalink
docs(foomo/squadron): add README
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinkim committed Oct 17, 2024
1 parent 899fa57 commit 8a7286e
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions foomo/squadron/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# POSH squadron provider

## Usage

### Plugin

```go
package plugin

type Plugin struct {
l log.Logger
cache cache.Cache
op *onepassword.OnePassword
kubectl *kubectl.Kubectl
commands command.Commands
squadron *squadron.Squadron
}

func New(l log.Logger) (plugin.Plugin, error) {
var err error
inst := &Plugin{
l: l,
cache: cache.MemoryCache{},
commands: command.Commands{},
}

// ...

inst.op, err = onepassword.New(l, inst.cache)
if err != nil {
return nil, errors.Wrap(err, "failed to create onepassword")
}

inst.kubectl, err = kubectl.New(l, inst.cache)
if err != nil {
return nil, errors.Wrap(err, "failed to create kubectl")
}

inst.squadron, err = squadron.New(l, inst.kubectl)
if err != nil {
return nil, errors.Wrap(err, "failed to create squadron")
}

inst.commands.Add(squadron.NewCommand(l, inst.squadron, inst.kubectl, inst.op, inst.cache))

// ...

return inst, nil
}
```

### Config

To install binary locally, add:

```yaml
squadron:
path: squadrons
clusters:
- name: prod
fleets: ["default"]
- name: dev
fleets: ["default"]
```
### Ownbrew
To install binary locally, add:
```yaml
ownbrew:
packages:
# https://github.com/foomo/squadron/releases
- name: squadron
tap: foomo/tap/foomo/squadron
version: 2.1.5
```

0 comments on commit 8a7286e

Please sign in to comment.