1
1
# Namespace Sameness - SIG Multicluster Position Statement
2
2
3
3
Author: Jeremy Olmsted-Thompson (** [ @jeremyot ] ( https://github.com/jeremyot ) ** ), Google
4
- Last Edit: 2020/04/20
4
+ Last Edit: 2022/07/18
5
5
Status: RELEASED
6
6
7
7
## Goal
8
+
8
9
To establish a normative statement for multi-cluster namespace semantics and
9
10
governance as a building block for further development which will require
10
11
specifying behaviors across clusters.
11
12
12
13
## Context
14
+
13
15
Users are reaching for multi-cluster deployments for a
14
16
[ 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.
17
+ However, Kubernetes has historically treated the cluster boundary as the edge
18
+ of the universe. Without common patterns we can’t build portable tooling to
19
+ facilitate multi-cluster capabilities and know that behavior will be consistent
20
+ for each user.
20
21
21
22
## Scope
23
+
22
24
A single organization may need multiple, disjoint sets of clusters. They may,
23
25
for example, represent different phases of the development lifecycle (dev,
24
26
staging, prod) or support unrelated projects. Each organization governs their
25
27
own clusters in isolation, so the scope of a namespace can only reasonably be
26
28
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
29
+ defined as the set of all clusters, governed by a single authority, that are
28
30
expected to work together. An authority is a company, organization, team,
29
31
individual, or other entity which is entrusted to manage these clusters and, in
30
32
particular, to create namespaces in them.
31
33
32
34
## Position
35
+
33
36
** 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.**
37
+ a given name are considered to be the same namespace, unless otherwise dictated
38
+ by the authority's policy. A single namespace should have a consistent owner
39
+ across the set of clusters.**
36
40
37
41
## Appendix
38
42
@@ -48,7 +52,7 @@ healthy. They also have app-teams, "foo" and "bar" which use those clusters.
48
52
49
53
Cluster-ops owns the creation of namespaces in both clusters. They can choose
50
54
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
52
56
delegation works is an area for innovation, but some possible examples
53
57
include:
54
58
* A self-service portal which allocate a name in a global database and
@@ -92,10 +96,29 @@ thus namespce sameness applies), the implementation of multi-cluster services
92
96
probably should not be on-by-default. The details of how multi-cluster
93
97
services will work are an area for innovation, but ideas include:
94
98
* Opt-in: services must be "exported" to be merged across clusters
95
- * Opt-out: services or namespace can be opted out of service merging
99
+ * Opt-out: services or namespaces can be opted out of sameness
96
100
* Different discovery: merged services and "raw" services use different names
97
101
or other discovery mechanisms
98
102
99
103
However the implementation works, the metrics service is not automatically
100
104
merged across clusters, though the LDAP-to-RBAC sync from example 2 can still
101
105
apply consistent policies.
106
+
107
+ ### Example 4: Authority sameness policy
108
+
109
+ Consider the same organization from previous examples, but with more clusters:
110
+ A, B, C, and D. They want to assign foo-team's namespaces to clusters A and B,
111
+ and bar-team's namespaces to clusters C and D. They also want to ensure that
112
+ the opposite is never true - foo-team's namespaces cannot be used in clusters C
113
+ or D, and bar-team's namespaces cannot be used from clusters A or B.
114
+
115
+ As an implementation choice, the authority may offers controls which govern
116
+ which cluster-namespaces are considered for sameness. For example, it could
117
+ express "all namespaces prefixed with 'foo-' may be merged from clusters A and
118
+ B" and "all namespaces prefixed with 'bar-' may be merged from clusters C and
119
+ D". If a "foo-something" namespace is found in cluster C it would _ not_ be
120
+ considered for sameness. The details of how these policies might be expressed
121
+ are an area for innovation, but ideas include:
122
+ * In-cluster namespace labels or annotations
123
+ * In-cluster custom-resources
124
+ * An external control-plane API
0 commit comments