From 018f832fa4f995c2a1ffb0e648ee2877a3f2c7d7 Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik Date: Wed, 8 Jun 2022 15:21:30 +0200 Subject: [PATCH] chore: improve error message in getting ServiceAccount for PodIdentityProviderAwsEKS Signed-off-by: Zbynek Roubalik --- CHANGELOG.md | 1 + pkg/scaling/resolver/scale_resolvers.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e831f1f2943..6236edf7dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ To learn more about our roadmap, we recommend reading [this document](ROADMAP.md ### Other - **General:** Fix devcontainer on ARM64 Arch. ([3084](https://github.com/kedacore/keda/issues/3084)) +- **General:** Improve error message in resolving ServiceAccount for AWS EKS PodIdentity ([3142](https://github.com/kedacore/keda/issues/3142)) - **General:** Improve e2e on PR process. ([3004](https://github.com/kedacore/keda/issues/3004)) - **General:** Unify the used tooling on different workflows and arch. ([3092](https://github.com/kedacore/keda/issues/3092)) - **General:** Use Github's Checks API for e2e tests on PR. ([2567](https://github.com/kedacore/keda/issues/2567)) diff --git a/pkg/scaling/resolver/scale_resolvers.go b/pkg/scaling/resolver/scale_resolvers.go index d93a7c24280..c70dbca0105 100644 --- a/pkg/scaling/resolver/scale_resolvers.go +++ b/pkg/scaling/resolver/scale_resolvers.go @@ -139,7 +139,7 @@ func ResolveAuthRefAndPodIdentity(ctx context.Context, client client.Client, log serviceAccount := &corev1.ServiceAccount{} err := client.Get(ctx, types.NamespacedName{Name: serviceAccountName, Namespace: namespace}, serviceAccount) if err != nil { - return nil, kedav1alpha1.PodIdentityProviderNone, fmt.Errorf("error getting service account: %s", err) + return nil, kedav1alpha1.PodIdentityProviderNone, fmt.Errorf("error getting service account: '%s', error: %s", serviceAccountName, err) } authParams["awsRoleArn"] = serviceAccount.Annotations[kedav1alpha1.PodIdentityAnnotationEKS] } else if podIdentity == kedav1alpha1.PodIdentityProviderAwsKiam {