Skip to content

Comments

Clean up TLS default path logic. Use convention if config isn't present.#1049

Merged
sourishkrout merged 1 commit intomainfrom
seb/tls-config
Feb 20, 2026
Merged

Clean up TLS default path logic. Use convention if config isn't present.#1049
sourishkrout merged 1 commit intomainfrom
seb/tls-config

Conversation

@sourishkrout
Copy link
Contributor

Move cert/key path defaulting into LoadConfig and remove the redundant fallback from ensureTLSCertificate.

  1. Use local constants instead of the deprecated tlsbuilder.CertPEMFile/KeyPEMFile.
  2. Nest the two path checks under a single if tls.Generate guard.

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>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.pem defaulting in App.LoadConfig when assistantServer.tlsConfig.generate is enabled and paths are empty.
  • Remove the ensureTLSCertificate fallback 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.

@sourishkrout sourishkrout merged commit 9400a89 into main Feb 20, 2026
10 checks passed
@sourishkrout sourishkrout deleted the seb/tls-config branch February 20, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant