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

consul/connect: use task kind to get service name #8003

Merged
merged 1 commit into from
May 19, 2020
Merged

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented May 18, 2020

Fixes #8000

When requesting a Service Identity token from Consul, use the TaskKind
of the Task to get at the service name associated with the task. In
the past using the TaskName worked because it was generated as a sidecar
task with a name that included the service. In the Native context, we
need to get at the service name in a more correct way, i.e. using the
TaskKind which is defined to include the service name.

Fixes #8000

When requesting a Service Identity token from Consul, use the TaskKind
of the Task to get at the service name associated with the task. In
the past using the TaskName worked because it was generated as a sidecar
task with a name that included the service. In the Native context, we
need to get at the service name in a more correct way, i.e. using the
TaskKind which is defined to include the service name.
Copy link
Member

@nickethier nickethier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that if using connect native you need to set the kind yourself? I just didn't see here any place/hook that sets a kind /w structs.ConnectNativePrefix.

@shoenig
Copy link
Member Author

shoenig commented May 19, 2020

Does this mean that if using connect native you need to set the kind yourself?

Nope, the Connect Native plumbing in coming in another PR/RFC (preview #8011). I just wanted to get this cleaned up first because it's kind of invasive and unrelated to connect itself.

@shoenig shoenig merged commit 36684bd into master May 19, 2020
@cgbaker
Copy link
Contributor

cgbaker commented May 30, 2020

merged into release-0.11.3

cgbaker pushed a commit that referenced this pull request May 30, 2020
consul/connect: use task kind to get service name
@shoenig shoenig deleted the c-use-taskkind branch June 15, 2021 14:29
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use TaskKind rather than TaskName in SI token requests
3 participants