feat: add sds allowedNamespaces in EnvoyProxy - #8917
Conversation
Signed-off-by: zirain <zirain2009@gmail.com>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50774dd2bd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if !selector.Matches(labels.Set(secretNs.Labels)) { | ||
| return fmt.Errorf("SDS Secret reference is not allowed in namespace: %s", secretNs.Name) |
There was a problem hiding this comment.
Preserve namespace labels before matching SDS selectors
When sdsConfig.allowedNamespaces is used with the file provider or egctl translate, this match sees empty labels because the shared YAML loader constructs Namespace resources with only ObjectMeta.Name (internal/gatewayapi/resource/load.go:278-286, reached from internal/provider/file/resources.go:54). A manifest that includes Namespace labels and an SDS Secret in that namespace will therefore be rejected even though the selector should match; the loader needs to preserve Namespace metadata before this selector check can work outside the Kubernetes provider.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8917 +/- ##
==========================================
+ Coverage 74.67% 74.71% +0.03%
==========================================
Files 251 251
Lines 40398 40511 +113
==========================================
+ Hits 30169 30266 +97
- Misses 8157 8169 +12
- Partials 2072 2076 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions! |
Follow up #8745