Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] docs: remove tenantId from external-dns-azure secret #4418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sanketnadkarni
Copy link

Description

Removing tenantId in the Secret that is to be created for deploying external-dns with Helm in Azure with Managed Identities using Workload Identity

With tenantId present in the Secret the external-dns pods run into CrashLoopBackOff with following error:

time="2024-04-25T06:34:37Z" level=fatal msg="WorkloadIdentityCredential: unable to resolve an endpoint: http call(https://login.microsoftonline.com/XXXXX-REDACTED-XXXXXX/v2.0/.well-known/openid-configuration)(GET) error: reply status code was 400:\n{\"error\":\"invalid_tenant\",\"error_description\":\"AADSTS90002: Tenant 'XXXXX-REDACTED-XXXXXX' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may happen if there are no active subscriptions for the tenant. Trace ID: 56aa0372-738d-43ae-896d-d4fa9eb92101 Correlation ID: 45d49251-1a76-4be5-ac80-e6829e8c4bed Timestamp: 2024-04-25 06:34:37Z\",\"error_codes\":[90002],\"timestamp\":\"2024-04-25 06:34:37Z\",\"trace_id\":\"56aa0372-738d-43ae-896d-d4fa9eb92101\",\"correlation_id\":\"45d49251-1a76-4be5-ac80-e6829e8c4bed\",\"error_uri\":\"https://login.microsoftonline.com/error?code=90002\"}"

Error Details: https://login.microsoftonline.com/error?code=90002

The above error is also seen when you try to login using azcli from a pod with same service account and namespace using federated credentials:

~ # az login --federated-token "$(cat ${AZ_TOKEN})" --service-principal -u XXXX-MANAGEDIDENTITY-XXXX  -t XXXXX-REDACTED-XXXXXX
Failed to resolve tenant 'XXXXX-REDACTED-XXXXXX'.

Error detail: {"error":"invalid_tenant","error_description":"AADSTS90002: Tenant 'XXXXX-REDACTED-XXXXXX' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may happen if there are no active subscriptions for the tenant. Trace ID: 6ac60ea5-e0f8-4267-9f66-a02110b53300 Correlation ID: 0a1d6bf7-168c-4840-946d-4b116b9c28e1 Timestamp: 2024-04-25 09:47:44Z","error_codes":[90002],"timestamp":"2024-04-25 09:47:44Z","trace_id":"6ac60ea5-e0f8-4267-9f66-a02110b53300","correlation_id":"0a1d6bf7-168c-4840-946d-4b116b9c28e1","error_uri":"https://login.microsoftonline.com/error?code=90002"}

We were able to fix this after removing tenantId field from the Secret external-dns-azure, as it was not seen in the kubectl patch commands that create the same Secret using kubectl as alternative method, in the same document

Checklist

  • Unit tests updated
  • End user documentation updated

Copy link

CLA Missing ID CLA Not Signed

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign szuecs for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Apr 26, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @sanketnadkarni!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @sanketnadkarni. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 26, 2024
@sanketnadkarni sanketnadkarni changed the title docs: remove tenantId from external-dns-azure secret [WIP] docs: remove tenantId from external-dns-azure secret Apr 26, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants