Skip to content

fix: use consistent cert dir between certgen and standalone run#7351

Merged
arkodg merged 4 commits into
envoyproxy:mainfrom
mathetake:certgenhome
Oct 28, 2025
Merged

fix: use consistent cert dir between certgen and standalone run#7351
arkodg merged 4 commits into
envoyproxy:mainfrom
mathetake:certgenhome

Conversation

@mathetake
Copy link
Copy Markdown
Member

What type of PR is this?

Fixes an inconsistency described in #7225 (comment) which makes the stanalone default mode works as expected.

What this PR does / why we need it:
This fixes the inconsistency between the dir where cergen generates certs vs the dir standalone mode expects to see TLS certs when no dir specifying env vars are not present, notably default behavor.

Which issue(s) this PR fixes:
N/A

Release Notes:No

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@mathetake
Copy link
Copy Markdown
Member Author

cc @arkodg @zirain

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Comment thread internal/cmd/certgen.go
}

certPath := filepath.Join(paths.DataHome, "certs")
certPath := paths.CertDir("")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is the actual fix which makes this match with

// CertDir returns the certificate directory path (under ConfigHome).
func (p *Paths) CertDir(component string) string {
	return filepath.Join(p.ConfigHome, "certs", component)
}

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.00%. Comparing base (01b2ebf) to head (d3addc0).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/cmd/certgen.go 44.44% 5 Missing ⚠️

❌ Your patch status has failed because the patch coverage (44.44%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7351      +/-   ##
==========================================
- Coverage   72.05%   72.00%   -0.05%     
==========================================
  Files         230      230              
  Lines       33379    33379              
==========================================
- Hits        24050    24036      -14     
- Misses       7583     7595      +12     
- Partials     1746     1748       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jukie
Copy link
Copy Markdown
Contributor

jukie commented Oct 28, 2025

/retest

@arkodg arkodg merged commit 282c916 into envoyproxy:main Oct 28, 2025
34 of 35 checks passed
@mathetake mathetake deleted the certgenhome branch October 28, 2025 17:43
@codefromthecrypt
Copy link
Copy Markdown
Contributor

thanks

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.

5 participants