Skip to content

Commit

Permalink
Merge pull request #162 from foomo/feature/azure-completion
Browse files Browse the repository at this point in the history
fix(azure/az): add completions
  • Loading branch information
franklinkim authored Dec 3, 2024
2 parents 3e4b5b5 + 4a3e574 commit cb17a4c
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions azure/az/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ func NewCommand(l log.Logger, az *AZ, kubectl *kubectl.Kubectl, opts ...CommandO
{
Name: "login",
Description: "Log in to Azure",
Execute: inst.exec,
Flags: func(ctx context.Context, r *readline.Readline, fs *readline.FlagSets) error {
fs.Default().String("tenant", "", "The Microsoft Entra tenant")
return nil
},
Execute: inst.exec,
},
{
Name: "logout",
Expand All @@ -81,6 +85,22 @@ func NewCommand(l log.Logger, az *AZ, kubectl *kubectl.Kubectl, opts ...CommandO
Description: "Manage Azure CLI configuration",
Execute: inst.exec,
},
{
Name: "acr",
Description: "Manage private registries with Azure Container Registries",
Execute: inst.exec,
Nodes: tree.Nodes{
{
Name: "login",
Description: "Log in to an Azure Container Registry through the Docker CLI",
Flags: func(ctx context.Context, r *readline.Readline, fs *readline.FlagSets) error {
fs.Default().String("name", "", "The name of the container registry")
return nil
},
Execute: inst.exec,
},
},
},
{
Name: "kubeconfig",
Description: "Retrieve credentials to access remote cluster",
Expand All @@ -105,7 +125,7 @@ func NewCommand(l log.Logger, az *AZ, kubectl *kubectl.Kubectl, opts ...CommandO
},
},
Flags: func(ctx context.Context, r *readline.Readline, fs *readline.FlagSets) error {
fs.Internal().String("profile", "", "Store credentials in given profile.")
fs.Internal().String("profile", "", "Store credentials in given profile")
return fs.Internal().SetValues("profile", "azure")
},
Execute: inst.kubeconfig,
Expand Down

0 comments on commit cb17a4c

Please sign in to comment.