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

Feature/extend cluster-agent REST API [basics] #1121

Conversation

iskitsas
Copy link
Contributor

@iskitsas iskitsas commented Apr 15, 2020

Introducing new REST endpoints for cluster-agent-api

  • /version: get the version of installed MicroK8s. Might be useful in unit/integration testing, health checks, or About/Info pages in a UI/IDE (eg. a MicroK8s Plugin for VS-code)
  • /status: a wrapper of microk8s.status
  • /services: get all available services with info related to their statuses (enabled and active)
  • /service/logs: get the last <N> lines of logs from a selected service

Info on how to test them with curl can be found in the relative README.md page.
Integration tests have been provided for all of those 4 2 new endpoints

Additionally, the callback validation process has been enhanced with a Header Auth option. Instead of passing the callback token from a json body request or form field, it can be passed as a header in the request:

Callback-Token: <CALLBACK_TOKEN_VALUE>

…ests. Examples of usage with curl provided in README.md file
@iskitsas iskitsas requested a review from ktsakalozos as a code owner April 15, 2020 22:44
@balchua
Copy link
Collaborator

balchua commented Jun 20, 2020

I am interested in this PR. 😊 I think exposing basic actions, for example /status is great.

@iskitsas
Copy link
Contributor Author

I am interested in this PR. I think exposing basic actions, for example /status is great.

Hi @balchua,

I have also updated the MicroDash UI to use the API from this PR. You can install it separately using k8s/deploy-in-microk8s.sh script, after cloning locally this project:
https://github.com/sastix/microk8s-addons/tree/feature/microdash-basics

When this PR merged, I will provide the scripts so it can be added as a MicroK8s Addon (relative work is here)

The main concept is that Angular files are added in NGINX, which is configured as a reverse proxy, using CALLBACK TOKEN to access MicroK8s APIs and Bearer TOKEN from within the pods to access specific K8S APIs, so an overview of your MicroK8s installation is exposed through your browser using also basic-auth to limit access of UI to admins only.

@stale
Copy link

stale bot commented May 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label May 21, 2021
@stale stale bot closed this Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants