-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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):
|
578e5d1
to
a88dca0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21281 +/- ##
==========================================
+ Coverage 55.64% 55.68% +0.03%
==========================================
Files 339 339
Lines 56876 56906 +30
==========================================
+ Hits 31648 31686 +38
+ Misses 22583 22579 -4
+ Partials 2645 2641 -4 ☔ 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
Hello @reggie-k , I've updated the PR with documentation. Would you be able to review it once more, when you get a chance?? Thanks a lot!! |
a9570dd
to
eb1ec86
Compare
…match Signed-off-by: Sriteja TADAKALURU <[email protected]>
eb1ec86
to
0978e58
Compare
0ad29c8
to
5746aab
Compare
Signed-off-by: Sriteja TADAKALURU <[email protected]>
5746aab
to
6675228
Compare
Signed-off-by: Sriteja TADAKALURU <[email protected]>
Signed-off-by: Sriteja TADAKALURU <[email protected]>
6a3801a
to
5ee1ef6
Compare
Could you achieve the same thing with generator post selectors? https://argo-cd.readthedocs.io/en/latest/operator-manual/applicationset/Generators-Post-Selector/ |
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: