Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lumbrjx committed Sep 12, 2024
1 parent acccc75 commit 4d4aef0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 81 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ MAIN_BRANCH = main
all: create-cluster deploy-controller deploy-daemonset setup-prometheus port-forward-prometheus


build-cli:
cd cmd/cli && go build -o obzevMini *.go

package-chart:
cd chart && helm package .
helm repo index . --merge index.yaml
Expand Down
5 changes: 3 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
- [x] create packetManipulation k8s-controller call
- [x] use reqSimulator for latency service
- [x] add helm charts
- [ ] create a CLI only version (obzevMini)
- [ ] add kustomize
- [x] create a CLI only version (obzevMini)
- [ ] remove junk
- [ ] write docs
13 changes: 12 additions & 1 deletion cmd/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@ import (
"os"
)

func printHelp() {
fmt.Println(`Usage: obzev0 <command> [options]
Commands:
init Initialize the service
apply Apply the configuration
Run 'obzev0 help <command>' for more information on a specific command.`)
}
func readArgs() {
if len(os.Args) < 2 {
fmt.Println("expected 'init' or 'apply' command")
os.Exit(1)
}

switch os.Args[1] {
case "help":
printHelp()
case "init":
initCmd := flag.NewFlagSet("init", flag.ExitOnError)
dist := initCmd.String(
Expand Down Expand Up @@ -51,7 +62,7 @@ func readArgs() {
apply(c)

default:
fmt.Println("expected 'init' or 'apply' command")
fmt.Println("expected 'init', 'apply' or 'help' command")
os.Exit(1)
}
}
Binary file added cmd/cli/obzev0mini
Binary file not shown.
71 changes: 0 additions & 71 deletions daemon/cmd/cli/main.go

This file was deleted.

7 changes: 0 additions & 7 deletions daemon/cmd/cli/obzevConf.yaml

This file was deleted.

0 comments on commit 4d4aef0

Please sign in to comment.