I feel like in both cases you're mixing different life-span contexts in a single YAML/repo and it's expected that you'll run into problems.
In both cases there is an entity (IP, Disk) which is associated with a context that is broader than a cluster (e.g. a "subscription" in Azure, a "project" in GCP)
Because we implicitly create these entities in the cluster context when they don't exist, we're providing "ease of use" that causes the customer problem.
The right model is:
Repo-1 <- "above cluster entity definitions" (e.g. the YAML/JSON to create the IP or the disk)Repo-2 <- "the cluster configs that use the IP or disk"
On Fri, May 14, 2021 at 9:37 AM Brendan Burns <bbu...@microsoft.com> wrote:I feel like in both cases you're mixing different life-span contexts in a single YAML/repo and it's expected that you'll run into problems.
In both cases there is an entity (IP, Disk) which is associated with a context that is broader than a cluster (e.g. a "subscription" in Azure, a "project" in GCP)
Because we implicitly create these entities in the cluster context when they don't exist, we're providing "ease of use" that causes the customer problem.
The right model is:
Repo-1 <- "above cluster entity definitions" (e.g. the YAML/JSON to create the IP or the disk)Repo-2 <- "the cluster configs that use the IP or disk"Even this breaks down in the face of something like PD. That has to be an admin-owned resource, or else end-users can PVC their way into any disk they want. With IPs, we have this problem. We don't have any way to denote that "namespace foo can use static IP x, but namespace bar cannot". Should "foo" stop using that IP, "bar" could jump on it.
You received this message because you are subscribed to the Google Groups "kubernetes-api-reviewers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-api-rev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-api-reviewers/CAO_Rewbk_ChfP6c5ZreQKaKQ0uixBUTOGvki2QfmOb2YkjqijQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/SJ0PR21MB2013552AD82824C97880D6D7DB509%40SJ0PR21MB2013.namprd21.prod.outlook.com.
I think there are two problems: 1) how do we reference an externally allocated and managed resource from within the cluster; 2) how do we manage access control to that resource. I don't think we really have a solution to the first one yet.
On Fri, May 14, 2021 at 9:37 AM Brendan Burns <bbu...@microsoft.com> wrote:I feel like in both cases you're mixing different life-span contexts in a single YAML/repo and it's expected that you'll run into problems.
In both cases there is an entity (IP, Disk) which is associated with a context that is broader than a cluster (e.g. a "subscription" in Azure, a "project" in GCP)
Because we implicitly create these entities in the cluster context when they don't exist, we're providing "ease of use" that causes the customer problem.
The right model is:
Repo-1 <- "above cluster entity definitions" (e.g. the YAML/JSON to create the IP or the disk)Repo-2 <- "the cluster configs that use the IP or disk"Even this breaks down in the face of something like PD. That has to be an admin-owned resource, or else end-users can PVC their way into any disk they want. With IPs, we have this problem. We don't have any way to denote that "namespace foo can use static IP x, but namespace bar cannot". Should "foo" stop using that IP, "bar" could jump on it.This makes it easier to move between clusters (I just refer to the backing IP by name) vs. PV/PVC (which is safer but requires the admin make a new PV ref'ing the backing disk by name).
You received this message because you are subscribed to the Google Groups "kubernetes-api-reviewers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-api-rev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-api-reviewers/CAO_Rewbk_ChfP6c5ZreQKaKQ0uixBUTOGvki2QfmOb2YkjqijQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/SJ0PR21MB20130C5E202B60B84276960FDB509%40SJ0PR21MB2013.namprd21.prod.outlook.com.
No new turtles. If "adoption" happens based upon a user-define string (e.g., name) then my requirement is satisfied. It's only if adoption can only be done use an allocated ID that there is a problem. For PV probably we're OK. For IP we don't necessarily keep the reference so perhaps that's the issue.
On Fri, May 14, 2021 at 11:14 AM John Belamaric <jbela...@google.com> wrote:No new turtles. If "adoption" happens based upon a user-define string (e.g., name) then my requirement is satisfied. It's only if adoption can only be done use an allocated ID that there is a problem. For PV probably we're OK. For IP we don't necessarily keep the reference so perhaps that's the issue.I don't think it's good to put this requirement on the driver/cloud provider, I doubt every possible target integration is going to have a place to record the sort of metadata necessary to make that work, and it sounds like with that model we'd be making the cloud provider controller a critical part of the security model. I think it's much better for implementers to only have to figure out how to allocate/deallocate, and have k8s handle adoption or access concerns within the k8s API paradigm.
On Fri, May 14, 2021 at 11:19 AM Daniel Smith <dbs...@google.com> wrote:On Fri, May 14, 2021 at 11:14 AM John Belamaric <jbela...@google.com> wrote:No new turtles. If "adoption" happens based upon a user-define string (e.g., name) then my requirement is satisfied. It's only if adoption can only be done use an allocated ID that there is a problem. For PV probably we're OK. For IP we don't necessarily keep the reference so perhaps that's the issue.I don't think it's good to put this requirement on the driver/cloud provider, I doubt every possible target integration is going to have a place to record the sort of metadata necessary to make that work, and it sounds like with that model we'd be making the cloud provider controller a critical part of the security model. I think it's much better for implementers to only have to figure out how to allocate/deallocate, and have k8s handle adoption or access concerns within the k8s API paradigm.When they allocated or deallocate, they return an identifier. In order to solve the problem that Tim brought up, you need that identifier to be pre-allocated and known by the external system and your manifest. Otherwise, you have to store the identifier in your manifest post-allocation. In a PV this is general going to be fine, for example in GCP you use the pdName to bind it. For the IP case, we don't provide a similar way to do the binding. So, in your early question of "what's wrong with the PV / PVC model", I probably should have just answered "nothing" :)
There is one other point though - while a name is sufficient, meta-data is better. Tim's example was "we allocate the IP then we store it in the manifest". That works for a single instance of the service in a single cluster, and the name makes it slightly better because you get the repeatability in the allocation. But if you want to deploy the same set of manifests across multiple clusters in different regions, you're going to actually need different names for those IPs (assuming name is not regionally scoped). If instead the allocation is done by the metadata, the region is just another piece of metadata. This is why we would prefer not to have to pre-provision the IPs with specific names - it means you have a separate out-of-band step prior to configuring your manifests. Instead we want a "create or adopt" model. In non-cloud provider cases, the enterprise IPAM needs to do these allocate from specific CIDRs based upon the data center the cluster lives in - it needs information to key into its model of the network to determine those CIDRs.
This comes down to the strength of that metadata - is it unfakeable? Are all
the inputs immutable? Is the context "closed"? E.g. if I tie it to a specific
cluster ID (inasmuch as we have one), then I can't hand it off to another
cluster. But if it is not tied to a cluster ID, then any cluster can take it.