opencontrolplane / documentation

This is the documentation repo for the OpenCP project
Apache License 2.0
28 stars 1 forks source link

Region / Network / Namespaces - re-work #2

Open DMajrekar opened 1 year ago

DMajrekar commented 1 year ago

At the moment, changing a provider and regions is controlled by an additional Custer stanza in the kubeconfig

clusters:
- cluster:
    server: https://opencp.lon1.civo.com
  name: civo-lon1
- cluster:
    server: https://opencp.nyc1.civo.com
  name: civo-nyc1

With a namespace then being used as an individual network.

After discussion with @rawkode, it was suggested we could use the namespace as a well defined region:network format. e.g:

namespace: lon1:default
namespace: nyc1:staging

which would leave the cluster block as a switch between vendors:

clusters:
- cluster:
    server: https://opencp.civo.com
  name: civo
- cluster:
    server: https://opencp.aws.com
  name: aws

This would provider a nicer user flow however we'd want to consider how auto-complete of this would work. The list/namespaces end point would now need to work cross region within the provider, and this may not be supported out of the box.

alejandrojnm commented 1 year ago

This implies the user needs to specify the region in the name of the namespace like:

apiVersion: v1
kind: Namespace
metadata:
  name: lon1:private

and if you create another resource like cluster or firewall in the namespace you need to do the same, so the cloud implementation need to handle that, and if you send to list all the namespace we need to query all the regions and return it