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

Linkerd Check as an API Call? #11575

Closed
manju-rn opened this issue Nov 5, 2023 · 2 comments
Closed

Linkerd Check as an API Call? #11575

manju-rn opened this issue Nov 5, 2023 · 2 comments

Comments

@manju-rn
Copy link

manju-rn commented Nov 5, 2023

What problem are you trying to solve?

The linkerd check is very useful, especially linkerd mc check for the multicluster setup is very useful for me. However, running as a CLI restricts the automation option. Is there an API (preferably rest based) which can be called to do this exact checks and returns the results in json just like linkerd mc check -o json returns?
If there are client libs (in whatever language) doing the same also will be a good alternative.
I plan to run this as a k8s cron-job

How should the problem be solved?

Implementation of the REST Endpoints in linkerd based on the same logic that the linkerd CLI uses. This would enable both internal or external client (to the k8s cluster) to use this facility and perform checks

Any alternatives you've considered?

Linkerd Client Libraries for the major languages - python, go , Java, C?

How would users interact with this feature?

Either via

  1. Calling via the PODs (with relevant RBAC), either as standalone or cron-job using the REST
  2. Developing clients using the Client Lib and either externally or within the cluster as PODs

Would you like to work on this feature?

None

@alpeb
Copy link
Member

alpeb commented Nov 8, 2023

(copied from duped forum entry)

Checks are run on the calling side, usually calling the kube-api, so there’s no server from which to serve a REST interface in this case. Neither is there a supported public API you could consume for this, but you could scavenge the check code for public functions you could reuse. But IMO the easiest here would be to just pack the CLI command into an image in your k8s cron job, call it via a bash script checking for a clean run, and making sure the Job uses a service account with enough access to the kube-api.

@manju-rn
Copy link
Author

Thanks. I build a python flask image with linkerd bin file and implemented the same

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

No branches or pull requests

2 participants