fabric8-services / fabric8-tenant

Service responsible for provisioning and updating the tenant scoped services
Apache License 2.0
12 stars 29 forks source link

support multiple user kubernetes/openshift clusters #70

Closed jstrachan closed 6 years ago

jstrachan commented 7 years ago

we should always support the openshift online cluster (there may be many of them actually) but also allow users to add/edit/delete/select their own personal clusters (e.g. local minishift or their own cluster on AWS/GCE/Azure).

So we need a REST API to add/edit/delete user clusters. Each user cluster would look something vaguely like:

type UserOpenShiftCluster struct {
    ID        uuid.UUID `sql:"type:uuid default uuid_generate_v4()" gorm:"primary_key"`
    TenantID  uuid.UUID `sql:"type:uuid"`
    CreatedAt time.Time
    UpdatedAt time.Time
    DeletedAt *time.Time
    Name      string
    ApiServerURL string
    IdentityKey string
}

Where the IdentityKey is used to find the identity/token inside the keycloak REST API at something like /auth/realms/fabric8/broker/${identityKey}/token.

When creating the UserOpenShiftCluster the server should populate some values: ID, IdentityKey, CreatedAt in particular so that IdentityKey does not clash with another existing cluster or existing OSO cluster.

jstrachan commented 7 years ago

We'll also need a way to change the select the active cluster and a REST API to query the current active cluster's metadata and its token which can then be used by the UI & Forge

aslakknutsen commented 6 years ago

ClusterAPI provided by Auth https://github.com/fabric8-services/fabric8-auth/issues/282 UserAPI provide target cluster https://github.com/fabric8-services/fabric8-auth/issues/165

Closing as replaced by https://github.com/fabric8-services/fabric8-auth/issues/311