Skip to content

Commit

Permalink
feat(kubelogin): add kubelogin azure ad auth
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Haar <[email protected]>
  • Loading branch information
haarchri committed Dec 24, 2023
1 parent 8467c56 commit e8b0b4c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/clients/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ func WrapRESTConfig(_ context.Context, rc *rest.Config, credentials []byte, _ ..
return err
}

if rc.ExecProvider == nil || rc.ExecProvider.Args == nil || len(rc.ExecProvider.Args) < 1 {
return errors.New("an identity configuration was specified but the provided kubeconfig does not have execProvider section")
}

fs := pflag.NewFlagSet("kubelogin", pflag.ContinueOnError)
opts := token.NewOptions()
opts.AddFlags(fs)
Expand Down

0 comments on commit e8b0b4c

Please sign in to comment.