amimof / amimof/multikube

Add service to expose configuration to users

Aberta
#6 1 comentário 0 reações 1 responsável Reivindicada por @amimof Ver no GitHub
enhancement proposal
Linguagem predominante
Go
Estrelas
24
Forks
4
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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
```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.