Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/helen-frank/hcnmp
https://github.com/helen-frank/hcnmp
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/helen-frank/hcnmp
- Owner: helen-frank
- License: apache-2.0
- Created: 2023-09-15T07:42:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-30T08:58:43.000Z (about 1 year ago)
- Last Synced: 2024-06-21T20:03:44.942Z (5 months ago)
- Language: Go
- Size: 313 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hcnmp (Helen Cloud Native Management Platform)
[简体中文](./docs/READMD_cn.md)## 1. Brief description
A simple, efficient, and reliable cloud-native management platform demo project for multiple Kubernetes clusters## 2. Quick start
1. kind creates a cluster
```shell
kind create cluster --name=multi-node
```2. Get the kubeconfig and paste it into `.config/kube.config`.
```shell
kubectl config view --raw
```3. Run
> Run locally
```shell
go run ./main.go --kubeconfig .config/kube.config
```> Cluster deployment
```shell
kubectl apply -f sample/hcnmp.yaml
```4. Testing the interface
Import [api documentation](./docs/hcnmp.openapi.json) to apifox, configure apifox access interface
## 3. hcnmp Excellent mechanism
### Multi-cluster client caching mechanism
After using POST /apis/cluster/v1/code/{clusterCode} to add a cluster for hcnmp, hcnmp will write the cluster data to a configmap internally, and then each hcnmp listens to the change event by watching this configmap, and then gets the configmap from the event. configmap, read the configmap data to generate clients into its own sync.Map, when the business interface needs to operate the cluster, get the corresponding cluster clients from sync.This mechanism utilizes the list/watch mechanism of configmap to achieve cluster data consistency among multiple hcnmp replicas.