-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add default repo config for argo
Signed-off-by: homily707 <homily707@outlook.com>
- Loading branch information
Showing
5 changed files
with
55 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,44 @@ | ||
package argocd | ||
|
||
import ( | ||
. "github.com/devstream-io/devstream/internal/pkg/plugin/common/helm" | ||
"github.com/devstream-io/devstream/pkg/util/helm" | ||
) | ||
|
||
const ( | ||
defaultRepoName = "argo" | ||
defaultRepoURL = "https://argoproj.github.io/argo-helm" | ||
) | ||
|
||
var DefaultDeploymentList = []string{ | ||
"argocd-applicationset-controller", | ||
"argocd-dex-server", | ||
"argocd-notifications-controller", | ||
"argocd-redis", | ||
"argocd-repo-server", | ||
"argocd-server", | ||
} | ||
|
||
func GetStaticState() *helm.InstanceState { | ||
retState := &helm.InstanceState{} | ||
for _, dpName := range DefaultDeploymentList { | ||
retState.Workflows.AddDeployment(dpName, true) | ||
} | ||
return retState | ||
} | ||
|
||
func defaultMissedOptions(opts *Options) error { | ||
emptyRepo := helm.Repo{} | ||
if opts.Repo == emptyRepo { | ||
opts.Repo.Name = defaultRepoName | ||
opts.Repo.URL = defaultRepoURL | ||
} else { | ||
if opts.Repo.URL == "" { | ||
opts.Repo.URL = defaultRepoURL | ||
} | ||
if opts.Repo.Name == "" { | ||
opts.Repo.Name = defaultRepoName | ||
} | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters