Skip to content

Commit

Permalink
Make docker-registry, registry-username, and registry-password
Browse files Browse the repository at this point in the history
…optional:

A previous commit allowed an empty registry to be used when
running a tink worker action. This allows tink worker to take
advantage of that update by not requiring these registry CLI flags.

Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed Apr 19, 2022
1 parent 2b87714 commit 8d0f44d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cmd/tink-worker/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func NewRootCommand(version string, logger log.Logger) *cobra.Command {
rootCmd.Flags().Int64("max-file-size", defaultMaxFileSize, "Maximum file size in bytes (MAX_FILE_SIZE)")
rootCmd.Flags().Bool("capture-action-logs", true, "Capture action container output as part of worker logs")
rootCmd.Flags().Bool("tinkerbell-tls", true, "Connect to server via TLS or not (TINKERBELL_TLS)")
rootCmd.Flags().StringP("docker-registry", "r", "", "Sets the Docker registry (DOCKER_REGISTRY)")
rootCmd.Flags().StringP("registry-username", "u", "", "Sets the registry username (REGISTRY_USERNAME)")
rootCmd.Flags().StringP("registry-password", "p", "", "Sets the registry-password (REGISTRY_PASSWORD)")

must := func(err error) {
if err != nil {
Expand All @@ -103,15 +106,6 @@ func NewRootCommand(version string, logger log.Logger) *cobra.Command {
rootCmd.Flags().StringP("id", "i", "", "Sets the worker id (ID)")
must(rootCmd.MarkFlagRequired("id"))

rootCmd.Flags().StringP("docker-registry", "r", "", "Sets the Docker registry (DOCKER_REGISTRY)")
must(rootCmd.MarkFlagRequired("docker-registry"))

rootCmd.Flags().StringP("registry-username", "u", "", "Sets the registry username (REGISTRY_USERNAME)")
must(rootCmd.MarkFlagRequired("registry-username"))

rootCmd.Flags().StringP("registry-password", "p", "", "Sets the registry-password (REGISTRY_PASSWORD)")
must(rootCmd.MarkFlagRequired("registry-password"))

rootCmd.Flags().String("tinkerbell-grpc-authority", "", "tink server grpc endpoint (TINKERBELL_GRPC_AUTHORITY)")
must(rootCmd.MarkFlagRequired("tinkerbell-grpc-authority"))

Expand Down

0 comments on commit 8d0f44d

Please sign in to comment.