-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Provide more prescriptive guidance on multi-tenancy #4514
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
Provide more prescriptive guidance on multi-tenancy #4514
Conversation
91a6a6a
to
ced8e64
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
90cc124
to
4caa22f
Compare
62cc67b
to
106f25a
Compare
/cc @nader-ziada |
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
Marked as WIP since we want to include the clusterctl annotation pieces for cluster scoped resource move I think @fabriziopandini ? |
TODO: Add helper to expose current controller namespace. @vincepri , reckon I should make a PR to controller-runtime to expose a public utility function that does https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/leaderelection/leader_election.go#L104 ? |
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 just added a question and a little nit.
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
Right, I have some questions to be answered. I have put them in this google doc https://docs.google.com/document/d/1hnjjPW6oEm3injHJMaVC-gbUYaSIuZB_ZGWVBh3LdMA/edit# |
@randomvariable @vincepri I'm currently working towards the CAPO v0.4.0 release. Is the v0.4.0 provider contract the current state of this PR or what's documented here? https://cluster-api.sigs.k8s.io/developer/architecture/controllers/multi-tenancy.html?highlight=multi%20ten#multi-tenancy P.S. I was on vacation the last weeks so I could have missed other discussions / PRs etc about this topic |
docs/book/src/developer/architecture/controllers/multi-tenancy.md
Outdated
Show resolved
Hide resolved
ba57074
to
bc44687
Compare
Signed-off-by: Naadir Jeewa <[email protected]>
5137b41
to
e1a76d2
Compare
This is updated as per the comments. I've tried to balance what the providers have done with the consensus in the discussions. PTAL. |
|
||
// Name of the infrastructure identity to be used. | ||
// Must be either a cluster-scoped resource, or namespaced-scoped | ||
// resource the same namespace as the resource(s) being provisioned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// resource the same namespace as the resource(s) being provisioned. | |
// resource with the same namespace as the resource(s) being provisioned. |
} | ||
``` | ||
|
||
- A Namespace field MUST never be added to the ProviderIdentityReference type to avoid crossing namespace boundaries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the ProviderIdentityReference
type still exist?
// ADDITIONAL INFRASTRUCTURE SPECIFIC IDENTITY FIELDS// | ||
|
||
|
||
clusterv1.InfraClusterScopedResourceIdentityCommonSpec `json:",inline"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not exist in the code, renamed?
is resolved --> | ||
These behaviours will be encoded in utility functions in the Cluster API repository at a later date. | ||
|
||
### Namespaced scoped resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Namespaced scoped resources | |
### Namespace-scoped resources |
|
||
## Supported RBAC Models | ||
|
||
Providers MAY support any combination of cluster-scoped or namespace-scoped resources as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the secret variant should also be added here
// | ||
// This field is mutually exclusive with list. | ||
// +optional | ||
Selector metav1.LabelSelector `json:"selector"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably stupid question: Can we differentiate between null and empty when the selector is not a pointer?
@randomvariable Thx for clarifying the part with the secret! |
@randomvariable Do you have some time to fix the comments above and make the bot happy? We can do another round of review thereafter |
@randomvariable: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@randomvariable should we close this one? |
hey @randomvariable just doing some housekeeping here, I'm closing this since does not seem to apply anymore, plase let me know or just reopen if I'm mistaken. |
@enxebre: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@enxebre I assume this means that the current contract regarding multi tenancy remains what we currently have in the book? https://cluster-api.sigs.k8s.io/developer/architecture/controllers/multi-tenancy.html If I remember correctly some providers already aligned to what is this described in this PR. But I think given that this PR here never merged, we can't really treat it as an active contract. (Or maybe it's documented elsewhere and I'm just not aware) I can't really assess what this means for us, why this contract addition was important, ... P.S. I agree that this PR itself doesn't really make sense if it's just sitting there. I just wonder if the topic is still relevant. |
@yastij this could be relevant for the overarching goal to ensure consistency across providers... |
What this PR does / why we need it:
As a follow up to the Cluster API meeting of 2021/04/21, this PR intends to give more prescriptive guidance around the multi-tenancy contract. In particular, this documents how cluster scoped resources should work at the present time, and also in a
future release of Cluster API that drops support for older Kubernetes versions.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
/assign @sedefsavas
/assign @devigned
/assign @CecileRobertMichon