Clean up TLS default path logic. Use convention if config isn't present.#1049
Merged
sourishkrout merged 1 commit intomainfrom Feb 20, 2026
Merged
Clean up TLS default path logic. Use convention if config isn't present.#1049sourishkrout merged 1 commit intomainfrom
sourishkrout merged 1 commit intomainfrom
Conversation
Move cert/key path defaulting into LoadConfig and remove the redundant fallback from ensureTLSCertificate. Use local constants instead of the deprecated tlsbuilder.CertPEMFile/KeyPEMFile. Nest the two path checks under a single `if tls.Generate` guard. Signed-off-by: Sebastian (Tiedtke) Huckleberry <sebastiantiedtke@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR centralizes TLS cert/key path defaulting in application.App.LoadConfig, removing redundant fallback logic from the certificate-check command so TLS generation consistently uses the config-directory convention when paths aren’t provided.
Changes:
- Add
cert.pem/key.pemdefaulting inApp.LoadConfigwhenassistantServer.tlsConfig.generateis enabled and paths are empty. - Remove the
ensureTLSCertificatefallback that previously set default cert/key paths in the certificate-check command.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/agent/cmd/certificate_check.go | Removes redundant TLS cert/key path fallback before calling tlsbuilder.LoadOrGenerateConfig. |
| pkg/agent/application/app.go | Introduces default TLS cert/key filenames and applies defaulting during config load when TLSConfig.Generate is true. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Move cert/key path defaulting into LoadConfig and remove the redundant fallback from ensureTLSCertificate.
tlsbuilder.CertPEMFile/KeyPEMFile.if tls.Generateguard.