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

Feat: Add a New Plugin helm-installer #1196

Merged
merged 4 commits into from
Oct 26, 2022

Conversation

daniel-hutao
Copy link
Member

@daniel-hutao daniel-hutao commented Oct 25, 2022

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

  1. Add plugin helm-installer (modify from helm-generic);
  2. Remove old helm-style plugins and transfer their default configs to helm-installer
  • argocd
  • artifactory
  • devlake
  • harbor
  • jenkins
  • kube-prometheus
  • openldap
  • sonarqube
  • tekton

I'll transfer the left plugins in the next pr.

Related Issues

#1194

New Behavior (screenshots if needed)

  • config
---
varFile: "" # If not empty, use the specified external variables config file
toolFile: "" # If not empty, use the specified external tools config file
pluginDir: "~/.devstream/plugins"
state: # state config, backend can be local or s3
  backend: local
  options:
    stateFile: devstream.state

---
tools:
- name: helm-installer
  instanceID: argocd-001
  • apply ./dtm apply -f config-helm-installer.yaml -y
2022-10-25 20:02:39 ℹ [INFO]  Apply started.
2022-10-25 20:02:39 ℹ [INFO]  Using dir </Users/danielhu/.devstream/plugins> to store plugins.
2022-10-25 20:02:39 ℹ [INFO]  Using local backend. State file: devstream.state.
2022-10-25 20:02:39 ℹ [INFO]  Tool (helm-installer/argocd-001) found in config but doesn't exist in the state, will be created.
2022-10-25 20:02:39 ℹ [INFO]  Start executing the plan.
2022-10-25 20:02:39 ℹ [INFO]  Changes count: 1.
2022-10-25 20:02:39 ℹ [INFO]  -------------------- [  Processing progress: 1/1.  ] --------------------
2022-10-25 20:02:39 ℹ [INFO]  Processing: (helm-installer/argocd-001) -> Create ...
2022-10-25 20:02:39 ℹ [INFO]  Filling default config with instance: argocd-001.
2022-10-25 20:02:40 ℹ [INFO]  Creating or updating helm chart ...
2022/10/25 20:02:44 checking 47 resources for changes
...
2022/10/25 20:02:45 Created a new StatefulSet called "argocd-application-controller" in argocd
2022/10/25 20:02:45 beginning wait for 47 resources with timeout of 5m0s
2022/10/25 20:02:45 Deployment is not ready: argocd/argocd-applicationset-controller. 0 out of 1 expected pods are ready
...
2022/10/25 20:03:51 Deployment is not ready: argocd/argocd-dex-server. 0 out of 1 expected pods are ready
2022/10/25 20:03:54 release installed successfully: argocd/argo-cd-5.6.6
2022-10-25 20:03:54 ✔ [SUCCESS]  Tool (helm-installer/argocd-001) Create done.
2022-10-25 20:03:54 ℹ [INFO]  -------------------- [  Processing done.  ] --------------------
2022-10-25 20:03:54 ✔ [SUCCESS]  All plugins applied successfully.
2022-10-25 20:03:54 ✔ [SUCCESS]  Apply finished.

TODO

  • update "GitOps Toolchain" document

Signed-off-by: Daniel Hu <tao.hu@merico.dev>
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
@daniel-hutao daniel-hutao force-pushed the feat-helm branch 4 times, most recently from ae4a326 to 218069a Compare October 26, 2022 06:51
@daniel-hutao daniel-hutao marked this pull request as ready for review October 26, 2022 06:52
@daniel-hutao daniel-hutao requested review from IronCore864 and a team as code owners October 26, 2022 06:52
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
@daniel-hutao
Copy link
Member Author

Please ignore the linkchecker error. I'll fix it in the next document pr.

internal/pkg/plugin/helminstaller/helminstaller.go Outdated Show resolved Hide resolved
internal/pkg/plugin/helminstaller/defaults/argocd.go Outdated Show resolved Hide resolved
internal/pkg/plugin/helminstaller/helminstaller.go Outdated Show resolved Hide resolved
internal/pkg/plugin/helminstaller/helminstaller.go Outdated Show resolved Hide resolved
internal/pkg/pluginengine/plugin.go Show resolved Hide resolved
Copy link
Contributor

@steinliber steinliber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Daniel Hu <tao.hu@merico.dev>
@daniel-hutao daniel-hutao merged commit b4a62f2 into devstream-io:main Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants