feat: hot-reload apiToken - #591
Closed
cxdy wants to merge 1 commit into
Closed
Conversation
cxdy
force-pushed
the
feat/hot-reload-token
branch
from
July 16, 2026 14:56
ca76f6f to
340ca49
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inspired by linode/linode-cloud-controller-manager#576, adds the ability to store
apiTokenfor hot-reloading the token when rotated.General:
Pull Request Guidelines:
➜ linode-blockstorage-csi-driver git:(feat/hot-reload-token) go test -v ./pkg/linode-client/... === RUN TestNewLinodeClient === RUN TestNewLinodeClient/Valid_input_without_custom_API_URL === RUN TestNewLinodeClient/Valid_input_with_custom_API_URL === RUN TestNewLinodeClient/Invalid_API_URL --- PASS: TestNewLinodeClient (0.00s) --- PASS: TestNewLinodeClient/Valid_input_without_custom_API_URL (0.00s) --- PASS: TestNewLinodeClient/Valid_input_with_custom_API_URL (0.00s) --- PASS: TestNewLinodeClient/Invalid_API_URL (0.00s) === RUN TestNewLinodeClientWithTokenProviderNil --- PASS: TestNewLinodeClientWithTokenProviderNil (0.00s) === RUN TestTokenTransportAuthorization --- PASS: TestTokenTransportAuthorization (0.00s) === RUN TestTokenTransportUsesProviderError --- PASS: TestTokenTransportUsesProviderError (0.00s) === RUN TestTokenFileProviderCache --- PASS: TestTokenFileProviderCache (0.00s) === RUN TestTokenFileProviderEmptyFile --- PASS: TestTokenFileProviderEmptyFile (0.00s) === RUN TestTokenFileProviderMissingFile --- PASS: TestTokenFileProviderMissingFile (0.00s) === RUN TestTokenFileCacheTTLFromEnv === RUN TestTokenFileCacheTTLFromEnv/default === RUN TestTokenFileCacheTTLFromEnv/configured === RUN TestTokenFileCacheTTLFromEnv/invalid === RUN TestTokenFileCacheTTLFromEnv/non-positive --- PASS: TestTokenFileCacheTTLFromEnv (0.00s) --- PASS: TestTokenFileCacheTTLFromEnv/default (0.00s) --- PASS: TestTokenFileCacheTTLFromEnv/configured (0.00s) --- PASS: TestTokenFileCacheTTLFromEnv/invalid (0.00s) --- PASS: TestTokenFileCacheTTLFromEnv/non-positive (0.00s) === RUN TestTokenProviderFromFileOrEnv === RUN TestTokenProviderFromFileOrEnv/uses_file_when_available === RUN TestTokenProviderFromFileOrEnv/falls_back_to_env_when_file_missing === RUN TestTokenProviderFromFileOrEnv/errors_when_both_unavailable --- PASS: TestTokenProviderFromFileOrEnv (0.00s) --- PASS: TestTokenProviderFromFileOrEnv/uses_file_when_available (0.00s) --- PASS: TestTokenProviderFromFileOrEnv/falls_back_to_env_when_file_missing (0.00s) --- PASS: TestTokenProviderFromFileOrEnv/errors_when_both_unavailable (0.00s) === RUN TestStaticTokenProvider --- PASS: TestStaticTokenProvider (0.00s) PASS ok github.com/linode/linode-blockstorage-csi-driver/pkg/linode-client (cached)