The console provides a user interface for cluster related items such as:
- Credentials management (For example, Cloud Providers)
- Cluster management
- Creating
- Importing
- Upgrading
- Detaching
- Destroying
Go to the Contributing guide to learn how to get involved.
- Node.js v14.x
-
Clone repository
-
Install dependencies
npm ci
-
Setup environment
You need:
- to be connected to a OpenShift 4.x.x cluster
- to have Advanced Cluster Management installed on the cluster
npm run setup
This will create a
.env
file in the backend directory containing the environment variables. -
Start the development services
npm start
This will start the frontend and the backend in parallel. (It may take up to 30 seconds for the UI to appear)
The frontend will proxy requests to the backend using react scripts.
The backend will proxy requests to the kubernetes cluster specified by CLUSTER_API_URL in backend/.env.
Method | Path | Description |
---|---|---|
ALL | /api | Proxy request to cluster /api |
ALL | /apis | Proxy request to cluster /apis |
GET | /watch | Server side event stream of kubernetes resources |
POST | /upgrade | Upgrade a cluster |
The backend proxies api calls to the kubernetes cluster api.
Proxy calls will use the clients api token stored in acm-access-token-cookie
cookie.
This enforces user RBAC for proxy calls.
The backend /watch
route streams resource changes using server side events.
The frontend is using react scripts to simplify dependencies. The react scripts internally handle all the webpacking of the frontend. The goal here is fewer dependencies of the frontend.
To develop with self signed certificates goto chrome://flags/
and enable
- Allow invalid certificates for resources loaded from localhost.
- Insecure origins treated as secure.
Frontend has a cookie acm-access-token-cookie
that contains the user's token.
If the backend responds with a 401 Unauthorized
the frontend starts an OAuth flow to authorize with the cluster.
- Frontend redirects to the backend
/login
endpoint. - Backend redirects to the cluster
/authorize
endpoint. - Cluster OAuth redirects back to the backend
/login/callback
endpoint. - Backend redirects to the frontend and sets the
acm-access-token-cookie
.
console
is part of the open-cluster-management community. For more information, visit: open-cluster-management.io