devstream
devstream copied to clipboard
:four_leaf_clover: `Proposal`: Plugin `argocd` Enhancement (sub-task of #513)
What would you like to add? Why is this needed?
See #513 for the details
Adding more details about this issue:
Be Brave, Be Imaginative
Anything that isn't following the clean code best practice, refactor it.
Any feature you think would add value to end-users, add it.
Any configuration refactors / documentation updates that would improve the end users' quality of life, do it.
Be brave when deleting unnecessary code, and be imaginative when adding new features.
Possible Improvements: Config Refactor
The current options
section is like this:
options:
create_namespace: true
repo:
name: argo
url: https://argoproj.github.io/argo-helm
chart:
chart_name: argo/argo-cd
release_name: argocd
namespace: argocd
wait: true
timeout: 5m
upgradeCRDs: true
values_yaml: |
controller:
service:
port: 8080
redis:
image:
tag: 6.2.6-alpine3.15
There are a couple of possible improvements:
- Provide default values for
repo.name
andrepo.url
. I.E., therepo
section should be optional. The reason is that most users would install ArgoCD from the default/official repo. -
chart_name
might be a little bit misleading. It's rather "CHART_REPO/CHARTNAME`. A better name is needed. - Provide default values for
chart.release_name
,chart.namespace
,chart.wait
,chart.upgradeCRDs
, andchart.timeout
. - Provide a better example in the documentation, especially for the
values_yaml
section. The current example doesn't seem quite necessary (like Redis version, and service port 8080, not what normal users would override the default values from the chart).
Possible Improvements: Code Improvement
- Code:
internal/pkg/plugin/argocd/argocd.go
is empty, not necessary maybe. But since thedtm develop
command creates this file, maybe the better thing to do here is to move the logic from thestate.go
to this file. - Functions refactor. Make them easier to read and easier to test.
- Add unit tests wherever possible.
This issue might be too big for a good first issue, but we still want to give it a try since it's mainly refactoring and improving.
I will give it a try @daniel-hutao
TODO:
- [x] argocd support default config
- [x] argocd high available docs -> refer https://argo-cd.readthedocs.io/en/stable/operator-manual/high_availability/
- [ ] argocd sso