Skip to content
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

🍀 Proposal: Plugin argocdapp Enhancement (sub-task of #513) #515

Closed
daniel-hutao opened this issue May 18, 2022 · 2 comments
Closed

🍀 Proposal: Plugin argocdapp Enhancement (sub-task of #513) #515

daniel-hutao opened this issue May 18, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@daniel-hutao
Copy link
Member

daniel-hutao commented May 18, 2022

What would you like to add? Why is this needed?

Background

See #513 for more details.

@daniel-hutao daniel-hutao changed the title 🍀 Proposal: Plugin Enhancement - argocdapp 🍀 Proposal: (sub-task with #513) Plugin Enhancement - argocdapp May 18, 2022
@daniel-hutao daniel-hutao added the enhancement New feature or request label May 18, 2022
@daniel-hutao daniel-hutao changed the title 🍀 Proposal: (sub-task with #513) Plugin Enhancement - argocdapp 🍀 Proposal: (sub-task with #513) Plugin Enhancement with argocdapp May 18, 2022
@daniel-hutao daniel-hutao changed the title 🍀 Proposal: (sub-task with #513) Plugin Enhancement with argocdapp 🍀 Proposal: Plugin argocdapp Enhancement (sub-task with #513) May 18, 2022
@daniel-hutao daniel-hutao changed the title 🍀 Proposal: Plugin argocdapp Enhancement (sub-task with #513) 🍀 Proposal: Plugin argocdapp Enhancement (sub-task of #513) May 18, 2022
@IronCore864
Copy link
Member

Adding more background and possible improvements:

Background

The ArgoCD App plugin creates a YAML file locally for ArgoCD Application CRD then uses kubectl to apply it, which isn't a good practice, because:

  • It relies on kubectl command tool, but the thing is, it might not be available. So, the plugin depends on the environment in which it's running.
  • It creates a file then removes the file, which is redundant.

Possible Improvements: Apply Mechanism

Maybe we can use ArgoCD API client and/or K8s Go SDK to create the CRD, instead of using kubectl.

Possible Improvements: Config

Current config is as follows:

tools:
- name: argocdapp
  instanceID: default
  dependsOn: [ "argocd.ARGOCD_INSTANCE_NAME" ]
  options:
    app:
      name: hello
      namespace: argocd
    destination:
      server: https://kubernetes.default.svc
      namespace: default
    source:
      valuefile: values.yaml
      path: charts/go-hello-http
      repoURL: YOUR_CHART_REPO_URL

Better naming:

  • valuefile -> valueFile
  • path: is a bit unclear. Better naming is required.
  • repoURL: what repo?

Add default values, maybe:

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.

@steinliber
Copy link
Contributor

steinliber commented Aug 4, 2022

TODO:

  • value_file support local and remote
  • support default config for destination
  • use goclient instead of kubectl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants