[tools] Add d8 tools pki certs check for control-plane certificate expiration inspection#355
Merged
Merged
Conversation
Signed-off-by: Maxim Mazin <maksim.mazin@flant.com>
d8 tools pki certs check for control-plane certificate expiration inspection
Signed-off-by: Maxim Mazin <maksim.mazin@flant.com>
4 tasks
Signed-off-by: Maxim Mazin <maksim.mazin@flant.com>
Signed-off-by: Maxim Mazin <maksim.mazin@flant.com>
Signed-off-by: Maxim Mazin <maksim.mazin@flant.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new d8 tools pki certs check command subtree to deckhouse-cli to inspect local control-plane PKI and kubeconfig client certificate expiration dates using the github.com/deckhouse/deckhouse/go_lib/controlplane APIs (referenced from the companion Deckhouse PR).
Changes:
- Registers a new
tools -> pki -> certs -> checkCobra command tree ind8. - Implements full-scan and single-file inspection modes, rendering kubeadm-like tables for leaf certs and CAs.
- Adds unit tests for report rendering and core formatting logic, and introduces the
go_lib/controlplanedependency (with related dependency bumps).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/tools/tools.go | Wires the new pki tools subtree into the existing d8 tools command. |
| internal/tools/pki/cmd/pki.go | Introduces the tools pki command group. |
| internal/tools/pki/certs/cmd/certs.go | Introduces the tools pki certs command group. |
| internal/tools/pki/certs/cmd/check.go | Implements certs check CLI flags, modes, and user-facing help/errors. |
| internal/tools/pki/certs/certs.go | Implements report building (full-scan + single-file) and kubeadm-like rendering. |
| internal/tools/pki/certs/certs_test.go | Adds test coverage for formatting and report behavior. |
| go.mod | Adds the controlplane library dependency and bumps several related modules. |
| go.sum | Records checksum updates for newly added/bumped dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Maxim Mazin <maksim.mazin@flant.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Maxim Mazin <maksim.mazin@flant.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Maxim Mazin <maksim.mazin@flant.com>
ldmonster
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
d8 tools pki certs checktodeckhouse-clito inspect local control-plane certificate expiration using thego_lib/controlplaneexpiration API from the companion PR deckhouse/deckhouse#19959.tools -> pki -> certs -> checkcommand tree ind8--kubeconfig-dirfor non-standard layouts; by default it resolves to the parent directory of--pathd8Screenshots
Full scan
Single-file certificate
Single-file kubeconfig (client certificate)