Closed mbocharov-gpm closed 9 months ago
If you use the operator as is and do not add the /global-hooks directory to the image, the code exits with exit code 1 without any error messages
/global-hooks
main.go
err := operator.Setup() if err != nil { os.Exit(1) } err = operator.Start() if err != nil { os.Exit(1) }
It should be like this:
err := operator.Setup() if err != nil { fmt.Printf("Error on setup: %s\n", err) os.Exit(1) } err = operator.Start() if err != nil { fmt.Printf("Error on start: %s\n", err) os.Exit(1) }
And error:
Error on setup: global hooks directory: path '/global-hooks' not exist
https://github.com/flant/addon-operator/blob/a7c885b5ec66bbacf21466dbc3044432202db361/cmd/addon-operator/main.go#L56C4-L56C13
@mbocharov-gpm good catch! Do you want to go ahead and make the change (open a PR)?
@nabokihms https://github.com/flant/addon-operator/pull/446
Thanks! Really appreciate it. Closed in https://github.com/flant/addon-operator/pull/446
If you use the operator as is and do not add the
/global-hooks
directory to the image, the code exits with exit code 1 without any error messagesmain.go
It should be like this:
And error:
https://github.com/flant/addon-operator/blob/a7c885b5ec66bbacf21466dbc3044432202db361/cmd/addon-operator/main.go#L56C4-L56C13