Skip to content

Commit 44e0751

Browse files
authored
Merge pull request kubernetes#3635 from andrewsykim/kep-1965
KEP-1965: update apiserver lease identity format
2 parents d6bbe13 + 108983c commit 44e0751

File tree

1 file changed

+10
-11
lines changed
  • keps/sig-api-machinery/1965-kube-apiserver-identity

1 file changed

+10
-11
lines changed

keps/sig-api-machinery/1965-kube-apiserver-identity/README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,17 @@ post-start-hook and expired leases will be garbage collected by the `start-kube-
127127
post-start-hook in kube-apiserver. The refresh rate, lease duration will be configurable through kube-apiserver
128128
flags
129129

130-
The format of the lease ID will be `kube-apiserver-<UUID>`. The UUID is newly generated on every start-up. This ID format is preferred
131-
for the following reasons:
132-
* No two kube-apiservers on the same host can share the same lease identity.
133-
* Revealing the hostname of kube-apiserver may not be desirable for some Kubernetes platforms.
134-
* The kube-apiserver version may change between restarts, which can trigger a storage version migration (see KEP on StorageVersionAPI)
130+
The format of the lease will be `kube-apiserver-<hash-using-hostname>`. A hash based on the hostname is used for two reasons:
131+
1. To ensure that a `kube-apiserver` that is restarting will attempt to obtain its previous lease, avoiding system churn when a kube-apiserver Lease is garbage collected.
132+
2. Avoiding the need to truncate the lease name when using longer hostnames that exceed the 64 character limit for object names, which can lead to naming conflicts.
135133

136-
In some cases it can be desirable to use a predictable ID format (e.g. kube-apiserver-<hostname>). We may consider providing
137-
a flag in `kube-apiserver` to override the lease identity.
134+
Each lease will have a `kubernetes.io/hostname` label with the actual hostname seen by kube-apiserver which cluster admins
135+
can use to determine which kube-apiserver owns a Lease object. However, the holder identity of the
136+
lease (`lease.spec.holderIdentity`) will be uniquely generated per start-up, which can be used as an indicator for
137+
ownership churn of the lease. All kube-apiserver leases will also have a component label `k8s.io/component=kube-apiserver`.
138138

139-
All kube-apiserver leases will also have a component label `k8s.io/component=kube-apiserver`.
139+
In the future, we may consider providing a flag in `kube-apiserver` to override the lease name, but we don't anticipate
140+
needing this today.
140141

141142

142143
### Test Plan
@@ -178,9 +179,7 @@ Alpha should provide basic functionality covered with tests described above.
178179

179180
#### Beta -> GA Graduation
180181

181-
- SIG consensus on whether Lease names should be unique per process (i.e. uuid) or persist across restarts (i.e. hostname)
182-
- SIG consensus on whether Lease names should include a hostname identifier (via label) if they do NOT persist across restarts.
183-
- SIG consensus on where the storageversiongc controller should run (kube-apiserver vs kube-controller-manager).
182+
==TODO==
184183

185184
**For non-optional features moving to GA, the graduation criteria must include
186185
[conformance tests].**

0 commit comments

Comments
 (0)