Skip to content

fix(inputs.kube_inventory): send file location to enable token auto-refresh#11577

Merged
powersj merged 3 commits intoinfluxdata:masterfrom
powersj:fix/11267
Aug 2, 2022
Merged

fix(inputs.kube_inventory): send file location to enable token auto-refresh#11577
powersj merged 3 commits intoinfluxdata:masterfrom
powersj:fix/11267

Conversation

@powersj
Copy link
Copy Markdown
Contributor

@powersj powersj commented Aug 1, 2022

Currently, Telegraf will read a token file and provide that as a string
to the K8s client. This will prevent the K8s client from attempting to
auto-refresh the token. In newer versions of K8s, tokens will expire
every hour as a security measure.

This, instead will pass the file location rather than having telegraf
read it directly. Because of this new K8s behavior, this also deprecates
and warns the user when using a hard-coded string token.

fixes: #11267

…efresh

Currently, Telegraf will read a token file and provide that as a string
to the K8s client. This will prevent the K8s client from attempting to
auto-refresh the token. In newer versions of K8s, tokens will expire
every hour as a security measure.

This instead will pass the file location rather than having telegraf
read it directly. Becuase of this new K8s behavior, this also deprecates
and warns the user when using a hard-coded string token.

fixes: influxdata#11267
@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Aug 1, 2022
@powersj powersj marked this pull request as ready for review August 1, 2022 17:38
@sspaink sspaink changed the title fix(inputs/kube_inventory): send file location to enable token auto-refresh fix(inputs.kube_inventory): send file location to enable token auto-refresh Aug 1, 2022
Copy link
Copy Markdown
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. I only think it's helpful to add a sentence about deprecation of bearer_token to the sample.conf file.

@srebhan srebhan self-assigned this Aug 2, 2022
@srebhan srebhan added the plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins label Aug 2, 2022
@telegraf-tiger
Copy link
Copy Markdown
Contributor

telegraf-tiger bot commented Aug 2, 2022

Copy link
Copy Markdown
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks @powersj!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Aug 2, 2022
@powersj powersj merged commit b741f32 into influxdata:master Aug 2, 2022
reimda pushed a commit that referenced this pull request Aug 15, 2022
reimda pushed a commit that referenced this pull request Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for BoundServiceAccountTokenVolume refresh token

3 participants