kcp-dev / kcp

Kubernetes-like control planes for form-factors and use-cases beyond Kubernetes and container workloads.
https://kcp.io
Apache License 2.0
2.35k stars 381 forks source link

bug/cleanup: kcp-front-proxy should use flags for shard forwarding #1857

Closed sttts closed 7 months ago

sttts commented 2 years ago

Describe the bug

kcp-front-proxy uses a mapping file that suggests freedom to configure backends like shards in a flexible way, while in reality the behaviour for shards (i.e. URLs like /clusters/<ws>/...) is hardcoded and special.

Steps To Reproduce

-

Expected Behaviour

We should turn the shard forwarding configuration into well-defined, well-documented flags instead of relying on a mapping file with custom logic.

Whether we keep the mapping file for other URLs, I don't have a strong opinion. Maybe.

Additional Context

Note: forwarding the virtual workspace apiserver URLs starting with /services is wrong and will breaks as soon as we need multiple shard virtual workspace apiservers. We should also remove that from the testing mapping file. Clients should use the URLs published e.g. in APIExport.status or SyncTarget.status when talking to virtual workspaces. They not necessarily point to a front-proxy.

csams commented 2 years ago

@sttts What cardinality do you envision between virtual-workspace servers and kcp instances? Between the front proxy and kcp instances?

sttts commented 2 years ago

Logically 1:1 for shard:VW, physically potentially n:1, but only if we see value there.

front-proxy:shards n:m

mjudeikis commented 7 months ago

/close reopen if still needed

kcp-ci-bot commented 7 months ago

@mjudeikis: Closing this issue.

In response to [this](https://github.com/kcp-dev/kcp/issues/1857#issuecomment-2018482416): >/close >reopen if still needed Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.