amimof / amimof/multikube

Add service to expose configuration to users

Offen
#6 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @amimof Auf GitHub ansehen
enhancement proposal
Vorherrschende Sprache
Go
Sterne
24
Forks
4
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

A user must be able to get information about which clusters that multikube manages and their endpoints.
This is so that they can populate their .kube/config files.

Suggesting that we enhance proxy.go with a service that responds to /clientconfig and returns the cluster endpoints and contexts.

Eg. `curl -H "Authorization: Bearer eyJh..5Q" https://127.0.0.1:8443/clientconfig`
```json
{
"clusters": {
"kladdis": {
"server": "https://localhost:8443/kladdis",
"certificate-authority-data": "xxx"
},
"skippy": {
"server": "https://localhost:8443/skippy",
"certificate-authority-data": "xxx"
},
"woho": {
"server": "https://localhost:8443/woho",
"certificate-authority-data": "xxx"
}
},
"users": {
"mk-user": {
"token": "ey..."
}
},
"contexts": {
"kladdis": {
"cluster": "kladdis",
"user": "mk-user"
},
"skippy": {
"cluster": "skippy",
"user": "mk-user"
},
"woho": {
"cluster": "woho",
"user": "mk-user"
}
}
}
```

This would have enough information for an web-frontend to display an kube/.config file that the user can download.

If the user already has an existing config file the web ui can display the commands needed to add the cluster to the configuration. Eg.

```
To connect to the cluster, run the following commands [copy to clipboard]

kubectl config set clusters.skippy.server https://localhost:8443/skippy
kubectl config set clusters.skippy.certificate-authority-data LS0tL...S0tLS0K
kubectl config set contexts.skippy.cluster skippy
kubectl config set contexts.skippy.user mk-user
kubectl config use-context skippy
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.