-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Namespace Definition/Imports to Operator Log #224
Comments
To clarify, |
We could add a header to federated ( In the short-term that would always be e.g. |
To elaborate...
To handle the use case where a client wants to check the actual source registry API in addition to what is provided by the proxying registry, a How do we feel about that? Do we still need future extension to remap a namespace under this implementation? |
For now, I would really like to stick to the names being Domain Names because the fact that they're globally unique means they mean the same thing regardless of who your home registry is (which simplifies user assumptions) and we can cache things from the same registry name together because they refer to the same state. To zero in on something Calvin said, I think the I would like to move forward initially without the additional |
On that note, do you think the client should globally share the cache of logs by registry domain, regardless if sourced directly or different proxy registries? I could imagine proxy registry checkpoints being not necessarily up to date and in sync. That might be problematic. I recall that we discussed separately caching previously. Thoughts? Suppose could partially share things. For instance, separately store checkpoints and validators but fetch the logs and cache those globally. |
My intention is that clients can combine together information about a given registry from different sources (e.g. the registry itself, its home registry) as long as every new checkpoint it receives is checked against the registry it's about (either by getting it from its own origin or monitoring against the origin) and all data about the registry is checked against verified checkpoints. There is some consistency stuff we need to be careful about, but I think this is the goal and is pretty powerful. |
As a clarifying point, namespace importing does not imply proxying support. And a registry may support proxying other registries that aren't mentioned in the operator log. So the operator log's By default, the CLI tries to proxy through the default registry. If that isn't supported, then the client tries to directly request from the source registry. How does that sound? |
This might be problematic in the case where the registry domain needs to be remapped, but we don't have that ability. |
I'd like us to find a better term for "serving a response on behalf of another party" than proxy, but I think letting registries choose to not serve the content of all registries they import is fine and we can write the client to fall back to fetching from the imported registry itself. I do think for certain common registry use cases (e.g. internal corporate registries) they'll serve all of it but we don't have to impose that as a requirement. |
Think we are ready for a PR? |
I think so, it should be relatively straightforward to add the entry types and implement the validation logic. Since the client already validates the operator log it'll get propagated to the client without any extra work. |
Merged the server-side #225 |
As proposed in November 1st meeting, I think a good way to start prototyping federation is to introduce a basic namespace-to-origin mapping into the registrty state via two new Operator Log Entries.
ImportNamespace { name: String, registry: String }
- This registry imports the namespacename
fromregistry
.DefineNamespace { name: String }
- This registry defines the namespacename
in its own logs.A registry's
name
is currently required to be a domain name and a registry's "location" is currently required to map to itself. In the future we can relax this constraint if we want to add indirection between registry name and registry location.As a validation rule, it would be illegal for an operator log to contain two or more
*Namespace
entries using the samename
value. This means that every namespace is mapped to exactly zero or one registries (either a remote or this one) and that that mapping does not change over time.This feature when combined with the previously discussed
Warg-Registry
header will make it possible for clients to reason about the relationships between registries and talk to registries about each other. Most (or all?) registries will want to require that releases only reference namespaces that are bound and that requests withWarg-Registry
headers only use header values which are registries in the operator log as this acts as a record of which registries they federate with.Future Note 1:
ImportNamespace
can be extended in the future with an additional field that indicates what name from the specifiedregistry
is being imported asname
and when no value is provided for that it is implicitly the same asname
.Future Note 2: The no duplicate definitions/imports validation rule can be relaxed in the future in order to introduce namespace re-mapping.
The text was updated successfully, but these errors were encountered: