Skip to content

Commit

Permalink
tink worker command line args
Browse files Browse the repository at this point in the history
Signed-off-by: Marques Johansson <marques@packet.com>
  • Loading branch information
displague committed Sep 9, 2020
1 parent 87e74b9 commit d5f93df
Show file tree
Hide file tree
Showing 8 changed files with 606 additions and 424 deletions.
5 changes: 5 additions & 0 deletions cmd/tink-cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var rootCmd = &cobra.Command{
func init() {
cobra.OnInitialize(initConfig)
rootCmd.PersistentFlags().StringVarP(&cfgFile, "facility", "f", "", "used to build grpc and http urls")
viper.BindPFlag("facility", rootCmd.Flags().Lookup("facility"))
}

func setupClient(_ *cobra.Command, _ []string) error {
Expand All @@ -37,6 +38,10 @@ func Execute(version string) error {
// initConfig reads in config file and ENV variables if set.
func initConfig() {
viper.AutomaticEnv() // read in environment variables that match
viper.SetConfigName(".tinkerbell")
viper.AddConfigPath("/etc/tinkerbell")
viper.AddConfigPath("$HOME/.config/tinkerbell")
viper.AddConfigPath(".")

// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
Expand Down
310 changes: 0 additions & 310 deletions cmd/tink-worker/action.go

This file was deleted.

Loading

0 comments on commit d5f93df

Please sign in to comment.