Skip to content

Commit 06c5f20

Browse files
committed
Clarify namespace sameness wrt policy
After many discussions with customers and implementors, I think we need to clarify that implementations DO have an axis of freedom around implementation-defined control of sameness. E.g. "Sameness applies to <this namespace> only in <these clusters>, and to <that namespace> in <those clusters>."
1 parent 3ff3b12 commit 06c5f20

File tree

1 file changed

+54
-22
lines changed

1 file changed

+54
-22
lines changed

sig-multicluster/namespace-sameness-position-statement.md

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
# Namespace Sameness - SIG Multicluster Position Statement
22

3-
Author: Jeremy Olmsted-Thompson (**[@jeremyot](https://github.com/jeremyot)**), Google
4-
Last Edit: 2020/04/20
3+
Last Edit: 2023/04/22
54
Status: RELEASED
65

76
## Goal
7+
88
To establish a normative statement for multi-cluster namespace semantics and
99
governance as a building block for further development which will require
1010
specifying behaviors across clusters.
1111

1212
## Context
13+
1314
Users are reaching for multi-cluster deployments for a
1415
[variety of reasons](http://bit.ly/k8s-multicluster-conversation-starter-doc).
15-
However, Kubernetes treats the cluster boundary as the edge of the universe.
16-
There are currently no standard practices for how to extend the Kubernetes
17-
resource model across multiple clusters. Without common patterns we can’t build
18-
portable tooling to facilitate multi-cluster capabilities and know that behavior
19-
will be consistent for each user.
16+
However, Kubernetes has historically treated the cluster boundary as the edge
17+
of the universe. Without common patterns we can’t build portable tooling to
18+
facilitate multi-cluster capabilities and know that behavior will be consistent
19+
for each user.
2020

2121
## Scope
22+
2223
A single organization may need multiple, disjoint sets of clusters. They may,
2324
for example, represent different phases of the development lifecycle (dev,
2425
staging, prod) or support unrelated projects. Each organization governs their
2526
own clusters in isolation, so the scope of a namespace can only reasonably be
2627
declared within the organizational boundary. The scope of namespace identity is
27-
defined as the union of clusters, governed by a single authority, that are
28+
defined as the set of all clusters, governed by a single authority, that are
2829
expected to work together. An authority is a company, organization, team,
2930
individual, or other entity which is entrusted to manage these clusters and, in
3031
particular, to create namespaces in them.
3132

3233
## Position
33-
**For a set of related clusters governed by a single authority, all namespaces of
34-
a given name are considered to be the same namespace. A single namespace should
35-
have a consistent owner across the set of clusters.**
34+
35+
**Within a set of related clusters which are governed by a single authority (a
36+
"clusterset"), samely named namespaces in all clusters are considered to be
37+
related, to have the same owner(s), and to represent the same intention,
38+
unless otherwise dictated by some overriding policy, including, but not limited
39+
to, implementation-specific configuration.**
3640

3741
## Appendix
3842

@@ -46,12 +50,12 @@ Consider an organization that runs two clusters, "A" and "B". They have a
4650
cluster-ops team which is responsible for keeping those clusters alive and
4751
healthy. They also have app-teams, "foo" and "bar" which use those clusters.
4852

49-
Cluster-ops owns the creation of namespaces in both clusters. They can choose
53+
Cluster-ops owns the creation of namespaces in all clusters. They can choose
5054
to delegate the ability to create namespaces to foo-team and bar-team, but any
51-
namespace name that is allocated in "reserved" in all clusters. How the
55+
namespace name that is allocated is "reserved" in all clusters. How the
5256
delegation works is an area for innovation, but some possible examples
5357
include:
54-
* A self-service portal which allocate a name in a global database and
58+
* A self-service portal which allocates a name in a global database and
5559
creates the namespace on the user's behalf
5660
* Tooling that allocates a name in a global database and issues a credential
5761
to the user which is checked in an admission controller
@@ -79,7 +83,7 @@ If there are special RBAC rules that need to be applied in some clusters (e.g.
7983
clusters in EU have more limited access), the LDAP-to-RBAC sync implementation
8084
can apply specializations based on whatever criteria it understands.
8185

82-
### Example 3: Multi-cluster services
86+
### Example 3: Multi-cluster Services
8387

8488
Consider the same organization from previous examples. They have enabled an
8589
implementation of multi-cluster Services, which lets them access backends which
@@ -88,14 +92,42 @@ are running on other clusters in the group.
8892
As in example 2, cluster-ops run a per-cluster metrics service, It does not
8993
make sense for clients in cluster A to access the metrics server of cluster B.
9094
Even though this runs in the same "metrics" namespace in both clusters (and
91-
thus namespce sameness applies), the implementation of multi-cluster services
95+
thus namespace sameness applies), the implementation of multi-cluster services
9296
probably should not be on-by-default. The details of how multi-cluster
93-
services will work are an area for innovation, but ideas include:
94-
* Opt-in: services must be "exported" to be merged across clusters
95-
* Opt-out: services or namespace can be opted out of service merging
97+
services work are out of scope for this document, but valid approaches could
98+
include:
99+
* Opt-in: services must be explicitly "exported" to be merged across clusters
100+
* Opt-out: services or namespaces can be opted out of service merging
96101
* Different discovery: merged services and "raw" services use different names
97102
or other discovery mechanisms
98103

99-
However the implementation works, the metrics service is not automatically
100-
merged across clusters, though the LDAP-to-RBAC sync from example 2 can still
101-
apply consistent policies.
104+
However the implementation works, the metrics service is not _necessarily_
105+
merged across clusters, even if the LDAP-to-RBAC sync from example 2 still
106+
applies consistent RBAC policies. Those are independent capabilities.
107+
108+
### Example 4: Authority sameness policy
109+
110+
Consider the same organization from previous examples, but with more clusters:
111+
"A", "B", "C", and "D". Business rules dictate that the foo-team and the
112+
bar-team have a common security posture and may share clusters, but the
113+
billing-team has stricter requirements and must not share clusters with other
114+
teams. Cluster-ops wants to assign foo-team's and bar-team's namespaces to
115+
clusters A and B, and billing-team's namespaces to clusters C and D. They also
116+
want to ensure that the opposite is never true - foo-team's and bar-team's
117+
namespaces cannot be used from clusters C or D, and billing-team's namespaces
118+
cannot be used from clusters A or B.
119+
120+
What exactly it means to "be used" depends on each specific multi-cluster
121+
capability. For multi-cluster Services, the billing-team's endpoints from
122+
clusters C and D would be eligible for merging, but billing endpoints from
123+
clusters A and B would not. This can be used by implementations to add another
124+
layer of safety - even if cluster A were compromised and the billing-team's
125+
namespaces was created, the MCS implementation can use the policy described
126+
above to know that it should NOT merge billing endpoints from cluster A.
127+
128+
As an implementation choice, the authority may offer controls which govern
129+
which cluster-namespaces are considered for sameness and which are not.
130+
The details of how these policies might be expressed could include:
131+
* In-cluster namespace labels or annotations
132+
* In-cluster custom-resources
133+
* An external control-plane API

0 commit comments

Comments
 (0)