21
21
- [ ServiceAccount Admission Controller Migration] ( #serviceaccount-admission-controller-migration )
22
22
- [ Prerequisites] ( #prerequisites )
23
23
- [ Safe rollout of time-bound token] ( #safe-rollout-of-time-bound-token )
24
+ - [ Test Plan] ( #test-plan )
25
+ - [ TokenRequest/TokenRequestProjection] ( #tokenrequesttokenrequestprojection )
26
+ - [ RootCAConfigMap] ( #rootcaconfigmap )
27
+ - [ BoundServiceAccountTokenVolume] ( #boundserviceaccounttokenvolume )
24
28
- [ Graduation Criteria] ( #graduation-criteria )
25
- - [ Alpha-> ; Beta] ( #alpha-beta )
26
- - [ Beta -> ; GA Graduation] ( #beta---ga-graduation )
29
+ - [ TokenRequest/TokenRequestProjection] ( #tokenrequesttokenrequestprojection-1 )
30
+ - [ Beta-> ; GA] ( #beta-ga )
31
+ - [ RootCAConfigMap] ( #rootcaconfigmap-1 )
32
+ - [ Beta-> ; GA] ( #beta-ga-1 )
33
+ - [ BoundServiceAccountTokenVolume] ( #boundserviceaccounttokenvolume-1 )
34
+ - [ Alpha-> ; Beta] ( #alpha-beta )
35
+ - [ Beta -> ; GA Graduation] ( #beta---ga-graduation )
27
36
- [ Production Readiness Review Questionnaire] ( #production-readiness-review-questionnaire )
28
37
- [ Feature Enablement and Rollback] ( #feature-enablement-and-rollback )
29
38
- [ Scalability] ( #scalability )
@@ -291,11 +300,15 @@ operators should make sure:
291
300
292
301
** Note** : If having trouble in finding places using in-cluster config
293
302
completely, cluster operators can specify flag
294
- ` --service-account-extend-token-expiration ` to kube apiserver to allow
303
+ ` --service-account-extend-token-expiration=true ` to kube apiserver to allow
295
304
tokens have longer expiration temporarily during the migration. Any usage of
296
305
legacy token will be recorded in both metrics and audit logs. After fixing
297
- all the potentially broken workloads, don't forget to remove the flag so
298
- that the original expiration settings are honored.
306
+ all the potentially broken workloads, turn off the flag so that the original
307
+ expiration settings are honored. Note the
308
+ ` --service-account-extend-token-expiration ` mitigation defaults to true, and
309
+ that cluster administrators can set it to
310
+ ` --service-account-extend-token-expiration=false ` to turn off the mitigation
311
+ if desired.
299
312
300
313
- Metrics: ` serviceaccount_stale_tokens_total `
301
314
- Audit: looking for ` authentication.k8s.io/stale-token ` annotation
@@ -343,36 +356,101 @@ are properly reloading tokens by:
343
356
1 . Add annotation to audit events for legacy and stale tokens including
344
357
necessary information to locate problematic client.
345
358
359
+ ### Test Plan
360
+
361
+ #### TokenRequest/TokenRequestProjection
362
+
363
+ - Unit tests
364
+ - E2E tests
365
+ - Projected jwt tokens are correctly mounted. (conformance test)
366
+ - The owner and mode of projected tokens are correctly set
367
+ - In-cluster clients work with Token rotation
368
+
369
+ #### RootCAConfigMap
370
+
371
+ - Unit tests
372
+ - E2E tests
373
+ - Every namespace has configmap ` kube-root-ca.crt `
374
+
375
+ #### BoundServiceAccountTokenVolume
376
+
377
+ - Unit tests
378
+ - An upgrade test
379
+
380
+ 1 . Create pod A with feature disabled where pod A is working and a secret
381
+ volume is mounted
382
+ 2 . Enable feature where pod A continue working
383
+ 3 . Create pod B and it is working and projected volumes are mounted
384
+
346
385
### Graduation Criteria
347
386
348
- #### Alpha->Beta
387
+ #### TokenRequest/TokenRequestProjection
388
+
389
+ | Alpha | Beta | GA |
390
+ | ----- | ---- | ---- |
391
+ | 1.10 | 1.12 | 1.20 |
392
+
393
+ ##### Beta->GA
349
394
350
- Estimated version: v1.20
395
+ - [x] In use by multiple distributions
396
+ - [x] Approved by PRR and scalability
397
+ - [x] Any known bugs fixed
398
+ - [x] Tests passing
399
+ - [x] E2E test [ ServiceAccounts should mount projected service account
400
+ token when requested] ( https://k8s-testgrid.appspot.com/sig-auth-gce#gce )
401
+ - [x] E2E test [ ServiceAccounts should set ownership and permission when
402
+ RunAsUser or FsGroup is
403
+ present] ( https://k8s-testgrid.appspot.com/sig-auth-gce#gce )
404
+ - [x] E2E test
405
+ [ ServiceAccounts should support InClusterConfig with token rotation] ( https://k8s-testgrid.appspot.com/sig-auth-gce#gce-slow )
351
406
352
- All known migration frictions have been fixed:
407
+ #### RootCAConfigMap
353
408
354
- - PodSecurityPolicies that allow secrets but not projected volumes will
355
- prevent the use of token volumes.
356
- - Fixed in https://github.com/kubernetes/kubernetes/pull/92006
357
- - In-cluster clients that don’t reload service account tokens will start
358
- failing an hour after deployment.
359
- - Mitigation added in https://github.com/kubernetes/kubernetes/issues/68164
360
- - Pods running as non root may not access the service account token.
361
- - Fixed in https://github.com/kubernetes/kubernetes/pull/89193
409
+ | Alpha | Beta | GA |
410
+ | ----- | ---- | ---- |
411
+ | 1.13 | 1.20 | 1.21 |
362
412
363
- An upgrade test is passing periodically:
413
+ ##### Beta->GA
364
414
365
- 1 . Create pod A with feature disabled where pod A is working and a secret volume
366
- is mounted.
367
- 2 . Enable feature where pod A continue working
368
- 3 . Create pod B and it is working and projected volumes are mounted.
415
+ - [ ] In use by multiple distributions
416
+ - [ ] Approved by PRR and scalability
417
+ - [ ] Any known bugs fixed
369
418
370
- #### Beta -> GA Graduation
419
+ #### BoundServiceAccountTokenVolume
371
420
372
- Estimated version: v1.21+
421
+ | Alpha | Beta | GA |
422
+ | ----- | ---- | ---- |
423
+ | 1.13 | 1.21 | 1.22 |
373
424
374
- New ` ServiceAccount ` admission controller WAI in Beta for >= 1 minor without
375
- significant issues.
425
+ ##### Alpha->Beta
426
+
427
+ - [x] Any known bugs fixed
428
+
429
+ - [x] PodSecurityPolicies that allow secrets but not projected volumes
430
+ will prevent the use of token volumes.
431
+ - Fixed in https://github.com/kubernetes/kubernetes/pull/92006
432
+ - [x] In-cluster clients that don’t reload service account tokens will
433
+ start failing an hour after deployment.
434
+ - Mitigation added in
435
+ https://github.com/kubernetes/kubernetes/issues/68164
436
+ - [x] Pods running as non root may not access the service account token.
437
+ - Fixed in https://github.com/kubernetes/kubernetes/pull/89193
438
+
439
+ - [x] Tests passing
440
+
441
+ - [x] Upgrade test
442
+ [ sig-auth-serviceaccount-admission-controller-migration] ( https://k8s-testgrid.appspot.com/sig-auth-gce#upgrade-tests )
443
+
444
+ - [x] TokenRequest/TokenRequestProjection GA
445
+
446
+ - [ ] RootCAConfigMap GA
447
+
448
+ ##### Beta -> GA Graduation
449
+
450
+ - [ ] Allow kube-apiserver to recognize multiple issuers to enable non
451
+ disruptive issuer change.
452
+ - [ ] New ` ServiceAccount ` admission controller work as intended in Beta
453
+ for >= 1 minor release without significant issues.
376
454
377
455
## Production Readiness Review Questionnaire
378
456
@@ -389,19 +467,20 @@ significant issues.
389
467
of a node? no.
390
468
391
469
- ** Does enabling the feature change any default behavior?** yes, pods'
392
- service account tokens will not be long-lived and are not stored as Secrets
393
- any more.
470
+ service account tokens will expire after 1 year by default and are not
471
+ stored as Secrets any more.
394
472
395
473
- ** Can the feature be disabled once it has been enabled (i.e. can we roll
396
- back the enablement)?** yes. pods created while the feature was enabled will
397
- reference a configmap that can grow stale with the feature disabled.
474
+ back the enablement)?** yes.
398
475
399
476
- ** What happens if we reenable the feature if it was previously rolled
400
477
back?** the same as the first enablement.
401
478
402
479
- ** Are there any tests for feature enablement/disablement?**
480
+
403
481
- unit test: plugin/pkg/admission/serviceaccount/admission_test.go
404
- - upgrade test: test/e2e/upgrades/serviceaccount_admission_controller_migration.go
482
+ - upgrade test:
483
+ test/e2e/upgrades/serviceaccount_admission_controller_migration.go
405
484
406
485
### Scalability
407
486
@@ -423,7 +502,8 @@ significant issues.
423
502
provider?** no.
424
503
425
504
- ** Will enabling / using this feature result in increasing size or count of
426
- the existing API objects?** no.
505
+ the existing API objects?** controller creates one additional configmap per
506
+ namespace.
427
507
428
508
- ** Will enabling / using this feature result in increasing time taken by any
429
509
operations covered by [ existing SLIs/SLOs] ?** no.
0 commit comments