-
Notifications
You must be signed in to change notification settings - Fork 6.6k
feat(hydrator): dynamically manage README template from argocd-cm ConfigMap [updated] (#19067) #24309
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
base: master
Are you sure you want to change the base?
feat(hydrator): dynamically manage README template from argocd-cm ConfigMap [updated] (#19067) #24309
Conversation
❌ Preview Environment undeployed from BunnyshellAvailable commands (reply to this comment):
|
crenshaw-dev
left a comment
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! Added a comment for a slightly different high-level direction for implementation.
| settingsMgr := settings.NewSettingsManager(context.Background(), kubeclientset, namespace) | ||
| err = settingsMgr.ResyncInformers() | ||
| if err != nil { | ||
| errors.CheckError(err) | ||
| } |
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.
I think instead of loading the template directly from the commit-server component, we should load it in the application-controller and pass it to the commit-server via the gRPC request. That'll require updating commit.proto with the new param.
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.
Thank you for the review! I’ll update the code according to your comment and push a new commit.
|
Aside question: are you or your org finding the README.md useful so far? What kind of things do you want to add to the template? |
Actually, I haven’t used the hydrator feature much yet. I’ll try using it more and think about practical strings to add to the template. I’ll also ask my colleagues for their opinions. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24309 +/- ##
=========================================
Coverage ? 60.84%
=========================================
Files ? 404
Lines ? 66238
Branches ? 0
=========================================
Hits ? 40304
Misses ? 22694
Partials ? 3240 ☔ View full report in Codecov by Sentry. |
ff31047 to
40a3a11
Compare
|
Hi @crenshaw-dev, sorry for updating the code so late. I have reverted all previous code implementations and added a new implementation according to the review comments. Changes in this PR
I tested this on my local server, and the results are as follows. You can check them via this link: I know you are busy, but I would appreciate it if you could review the implementation. Thank you! |
0e3e8f7 to
f3c52d3
Compare
e059e70 to
5c1414c
Compare
Signed-off-by: gyu-young-park <[email protected]>
Signed-off-by: gyu-young-park <[email protected]>
… make test to be passed Signed-off-by: gyu-young-park <[email protected]>
Signed-off-by: gyu-young-park <[email protected]>
Signed-off-by: gyu-young-park <[email protected]>
Signed-off-by: gyu-young-park <[email protected]>
…d code Signed-off-by: gyu-young-park <[email protected]>
Signed-off-by: gyu-young-park <[email protected]>
Signed-off-by: gyu-young-park <[email protected]>
Signed-off-by: gyu-young-park <[email protected]>
04636b7 to
fe8430c
Compare
Related Issue #19067
This PR introduces support for dynamically managing the content written to README.md that hydrator uses using the
argocd-cmConfigMap.Changes:
argocd-cmconfigmap with an k8s informer to detect changes dynamically.hydrator.readme.templateinargocd-cmto configure the README template string dynamically.hydrator.readme.templateis empty, the default template will be applied.Test:
I created the following Application and used the hydrator feature.
Next, I modified the configmap.
In argocd-cm, I changed hydrator.readme.template as follows:
data: hydrator.readme.template: "Hello World! Im Gyu! {{ .RepoURL }}"The result submitted by hydrator can be found at the following link. You can see that the README.md correctly reflects the updated configmap information dynamically.
gyu-young-park/argocd-example-apps@4a705c7
Current Status
hydrator.readme.templatein the configmap are correctly reflected inREADME.mdof hydratorThis PR is still in an early stage, and I’d like to gather feedback on the implementation before proceeding with tests and documentation. Since I’m not yet very familiar with the argo-cd codebase, I find it difficult to identify potential issues in my changes or the right direction for improvements. I’d greatly appreciate your feedback and suggestions before moving forward.
Checklist: