Skip to content

Commit 22c7492

Browse files
committed
Update CSR Duration KEP to match implementation
Signed-off-by: Monis Khan <[email protected]>
1 parent 50e928a commit 22c7492

File tree

2 files changed

+35
-20
lines changed

2 files changed

+35
-20
lines changed

keps/sig-auth/2784-csr-duration/README.md

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@
3939

4040
Items marked with (R) are required *prior to targeting to a milestone / release*.
4141

42-
- [ ] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
43-
- [ ] (R) KEP approvers have approved the KEP status as `implementable`
44-
- [ ] (R) Design details are appropriately documented
45-
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
46-
- [ ] e2e Tests for all Beta API Operations (endpoints)
42+
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
43+
- [x] (R) KEP approvers have approved the KEP status as `implementable`
44+
- [x] (R) Design details are appropriately documented
45+
- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
46+
- [x] e2e Tests for all Beta API Operations (endpoints)
4747
- [ ] (R) Ensure GA e2e tests for meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
4848
- [ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
49-
- [ ] (R) Graduation criteria is in place
49+
- [x] (R) Graduation criteria is in place
5050
- [ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
51-
- [ ] (R) Production readiness review completed
52-
- [ ] (R) Production readiness review approved
53-
- [ ] "Implementation History" section is up-to-date for milestone
51+
- [x] (R) Production readiness review completed
52+
- [x] (R) Production readiness review approved
53+
- [x] "Implementation History" section is up-to-date for milestone
5454
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
5555
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
5656

@@ -228,9 +228,13 @@ during version skews (discussed below).
228228
- Confirm with [pinniped](https://pinniped.dev) that the new functionality addresses their use case
229229
- Confirm that no other metrics are necessary
230230
- Wait one release after beta to allow bugs to be reported
231-
232-
The existing conformance tests for the certificates API (`test/e2e/auth/certificates.go`)
233-
are sufficient coverage as the new functionality is optional.
231+
- Inform external signer implementations of the `spec.expirationSeconds` field
232+
+ [GCP controller manager](https://github.com/kubernetes/cloud-provider-gcp/blob/ce127135e3b5c71893afc4dbf996bb3144eea81e/cmd/gcp-controller-manager/csr_signer.go)
233+
+ [open-ness/edgeservices](https://github.com/open-ness/edgeservices/blob/e5f79c877a7fb16ee6078855a4674dcf0a23bf80/pkg/certsigner/certsigner.go)
234+
+ [SUSE/kucero](https://github.com/SUSE/kucero/blob/515e41a7599e518d8f39d79cd072ff443eb0de8f/pkg/pki/signer/signer.go)
235+
- Update conformance tests for the certificates API (`test/e2e/auth/certificates.go`) to assert that
236+
the `spec.expirationSeconds` field is persisted. We will not check if the field is honored as
237+
this functionality is optional.
234238

235239
### Upgrade / Downgrade Strategy
236240

@@ -353,8 +357,10 @@ is included to allow this functionality to be disabled.
353357

354358
###### What specific metrics should inform a rollback?
355359

356-
The `csr_duration_honored` metric can be used to determine if signers and/or clients
357-
should be upgraded to handle the `spec.expirationSeconds` field.
360+
The `apiserver_certificates_registry_csr_honored_duration_total` and
361+
`apiserver_certificates_registry_csr_requested_duration_total` metrics can be used
362+
to determine if signers and/or clients should be upgraded to handle the
363+
`spec.expirationSeconds` field.
358364

359365
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
360366

@@ -380,8 +386,9 @@ Once a target CSR has been located, check that the issued certificate in
380386
`.status.certificate` has the correct duration. Audit logging could also be
381387
used to determine this.
382388

383-
The `csr_duration_honored` can be used to determine if signers are honoring
384-
durations when explicitly requested by clients.
389+
The `apiserver_certificates_registry_csr_honored_duration_total` and
390+
`apiserver_certificates_registry_csr_requested_duration_total` metrics can be used
391+
to determine if signers are honoring durations when explicitly requested by clients.
385392

386393
###### How can someone using this feature know that it is working for their instance?
387394

@@ -399,8 +406,13 @@ API.
399406
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
400407

401408
- Metrics
402-
- Metric name: `csr_duration_honored`
403-
- Components exposing the metric:
409+
- Metric name: `apiserver_certificates_registry_csr_honored_duration_total`
410+
+ Total number of issued CSRs with a requested duration that was honored,
411+
sliced by signer, only kubernetes.io signer names are specifically identified
412+
- Metric name: `apiserver_certificates_registry_csr_requested_duration_total`
413+
+ Total number of issued CSRs with a requested duration, sliced by signer,
414+
only kubernetes.io signer names are specifically identified
415+
- Components exposing the metrics:
404416
- kube-apiserver
405417

406418
- Details: Check the Kubernetes audit log from CRUD operations on CSRs.
@@ -482,7 +494,7 @@ The semantics of the Kubernetes CSR API do not change in this regard.
482494
###### What are other known failure modes?
483495

484496
- Signer does not honor requested duration
485-
- Detection: See `csr_duration_honored` metric and `kubectl` discussion above.
497+
- Detection: See metrics and `kubectl` discussion above.
486498
- Mitigations: Upgrade signers to honor the new field. Clients could also be
487499
configured to set a requested duration that is within the signer's policy.
488500
- Diagnostics: Audit logs could be used to capture full request and response
@@ -498,6 +510,8 @@ N/A
498510

499511
- 1.22: 2021-06-17: KEP written
500512
- 1.22: 2021-06-21: KEP review comments addressed
513+
- 1.22: 2021-07-02: Implementation [pull request](https://github.com/kubernetes/kubernetes/pull/99494) merged
514+
- 1.22: 2021-07-12: KEP updated with implementation details
501515

502516
## Drawbacks
503517

keps/sig-auth/2784-csr-duration/kep.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ feature-gates:
3535
disable-supported: true
3636

3737
metrics:
38-
- csr_duration_honored
38+
- apiserver_certificates_registry_csr_honored_duration_total
39+
- apiserver_certificates_registry_csr_requested_duration_total

0 commit comments

Comments
 (0)