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

feat: Allow merging nested values in plugin config secretRef #2096

Merged
merged 14 commits into from
Dec 15, 2023

Conversation

Revolyssup
Copy link
Contributor

@Revolyssup Revolyssup commented Dec 11, 2023

Type of change:

FIxes #1722

This feature allows setting specific fields on plugin configuration by passing the path to the field via secrets in a dot separated way.

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2023

Codecov Report

Attention: 45 lines in your changes are missing coverage. Please review.

Comparison is base (589bae6) 37.12% compared to head (0994aba) 37.24%.
Report is 2 commits behind head on master.

❗ Current head 0994aba differs from pull request most recent head aa0655e. Consider uploading reports for the commit aa0655e to get more accurate results

Files Patch % Lines
pkg/providers/ingress/translation/translator.go 0.00% 32 Missing ⚠️
...gress/translation/annotations/upstream/upstream.go 83.78% 3 Missing and 3 partials ⚠️
pkg/providers/utils/insert_map.go 75.00% 2 Missing and 2 partials ⚠️
pkg/providers/apisix/translation/apisix_route.go 0.00% 2 Missing ⚠️
...roviders/apisix/translation/apisix_pluginconfig.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2096      +/-   ##
==========================================
+ Coverage   37.12%   37.24%   +0.11%     
==========================================
  Files          93       94       +1     
  Lines        7886     7948      +62     
==========================================
+ Hits         2928     2960      +32     
- Misses       4568     4595      +27     
- Partials      390      393       +3     

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

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
#content is "v2"
name: echo
data:
headers.X-Foo: djI=
Copy link
Member

@kayx23 kayx23 Dec 12, 2023

Choose a reason for hiding this comment

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

  1. Does this have to be base64 encoded? If so, perhaps should be mentioned?
  2. Instead of putting a comment #content is "v2", you could consider mentioning djI= is base64 encoded v2 in the paragraph above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@@ -262,6 +262,46 @@ spec:
secretRef: echo
```

## Config with secretRef configuring nested fields
Copy link
Member

Choose a reason for hiding this comment

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

Could you come up with a better title? Struggle to understand what this is trying to say

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kayx23 Please check if current title is fine. I made the change/

Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
@Revolyssup Revolyssup merged commit a759ae5 into apache:master Dec 15, 2023
79 checks passed
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.

feat: Allow ApisixRoute's secretRef to provision nested configuration
5 participants