Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add variable from secret when applying istio cr #1877

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

2456868764
Copy link
Collaborator

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 52.00000% with 36 lines in your changes missing coverage. Please review.

Project coverage is 43.47%. Comparing base (ef31e09) to head (d70e5a2).
Report is 346 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ingress/config/ingress_config.go 12.90% 27 Missing ⚠️
pkg/ingress/config/ingress_template.go 79.54% 6 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1877      +/-   ##
==========================================
+ Coverage   35.91%   43.47%   +7.55%     
==========================================
  Files          69       77       +8     
  Lines       11576    12374     +798     
==========================================
+ Hits         4157     5379    +1222     
+ Misses       7104     6659     -445     
- Partials      315      336      +21     
Files with missing lines Coverage Δ
pkg/ingress/config/ingress_template.go 79.54% <79.54%> (ø)
pkg/ingress/config/ingress_config.go 13.01% <12.90%> (-0.87%) ⬇️

... and 70 files with indirect coverage changes

🚀 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.

// TemplateProcessor handles template substitution in configs
type TemplateProcessor struct {
// getSecret is a function that retrieves secrets by name and namespace
getSecret func(namespace, name string) (*v1.Secret, error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个函数我建议抽象成 getValue,把从什么来源获取的逻辑也包在里面,例如可能未来会支持要从 nacos 获取某个配置项的值

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK

@2456868764 2456868764 requested a review from Xunzhuo as a code owner March 12, 2025 13:44
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.

3 participants