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

[feat] add linode token health check #295

Closed

Conversation

ficap-akamai
Copy link
Contributor

@ficap-akamai ficap-akamai commented Jan 15, 2025

Sometimes it happens that the LINODE API TOKEN used by ccm expires or is revoked. This can go unnoticed for long periods since the only mechanism in place is logging it when actual call to Linode API fails. This PR implements health checker component that periodically makes calls to authenticated linode api endpoint (/v4/profile) to determine validity of token being used. Upon detection of invalid token health checker sends a signal to shut down controllers. This results in ccm Pod CrashLoopBackOffing which is greatly visible and can be acted upon. Health checker is only started when the controller is elected the leader. This reduces number of calls done to Linode API if there are multiple replicas of ccm. Whole health checker functionality is behind --enable-token-health-checker flag to be explicitly enabled if needed rather than enabling it by default.

General:

  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

@github-actions github-actions bot added the new-feature for new features in the changelog. label Jan 15, 2025
@rahulait
Copy link
Collaborator

@ficap-akamai if you have write access to the repo, can you open the PR directly from a branch in original repo? It seems like GHAs are failing if PR is coming from a forked repo.

@ficap-akamai
Copy link
Contributor Author

closing in favor of #296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature for new features in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants