-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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: Add fileSelector to the GitFileGenerator to support label-based file match(https://github.com/argoproj/argo-cd/issues/17673)(Alpha) #21281
base: master
Are you sure you want to change the base?
Conversation
🔴 Preview Environment stopped on BunnyshellSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
…match Signed-off-by: Sriteja TADAKALURU <[email protected]>
578e5d1
to
a88dca0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21281 +/- ##
==========================================
+ Coverage 53.34% 55.20% +1.85%
==========================================
Files 337 337
Lines 57056 57082 +26
==========================================
+ Hits 30439 31510 +1071
+ Misses 23974 22869 -1105
- Partials 2643 2703 +60 ☔ View full report in Codecov by Sentry. |
0053d42
to
b57951d
Compare
@@ -419,7 +419,8 @@ type GitDirectoryGeneratorItem struct { | |||
} | |||
|
|||
type GitFileGeneratorItem struct { | |||
Path string `json:"path" protobuf:"bytes,1,name=path"` | |||
Path string `json:"path" protobuf:"bytes,1,name=path"` | |||
FileSelector *metav1.LabelSelector `json:"fileSelector,omitempty" protobuf:"bytes,2,name=fileSelector"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe name it FileLabelSelector to be more clear it's a label selector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
b57951d
to
1e18080
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Could you add documentation for this functionality?
55bea6e
to
f248068
Compare
Done, documentation has been added, Thanks!!! |
9409aae
to
0acf034
Compare
Description:
This is to support more granularity on selecting files over git repositories based on the key-value pairs along with the path. This is similar to how matchLabels or matchExpressions works on kubernetes metadata objects.
Optional Field: fileSelector can be used with matchLabels/matchExpressions.
Supports matchLabels
Supports matchExpressions:
Note: This is only for the objects(doesn't work for arrays of objects).
Example CR:
Checklist: