Skip to content

Commit

Permalink
Improve error message on azure auth not being supported (kube-rs#1082)
Browse files Browse the repository at this point in the history
be more explicit on azure auth not being supported

Signed-off-by: goenning <me@goenning.net>

Signed-off-by: goenning <me@goenning.net>
  • Loading branch information
goenning authored and aviramha committed Nov 19, 2022
1 parent 80657ec commit 3461e40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kube-client/src/client/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ fn token_from_provider(provider: &AuthProviderConfig) -> Result<ProviderToken, E
match provider.name.as_ref() {
"oidc" => token_from_oidc_provider(provider),
"gcp" => token_from_gcp_provider(provider),
"azure" => Err(Error::AuthExec(
"The azure auth plugin is not supported; use https://github.com/Azure/kubelogin instead".into()
)),
_ => Err(Error::AuthExec(format!(
"Authentication with provider {:} not supported",
provider.name
Expand Down

0 comments on commit 3461e40

Please sign in to comment.