Skip to content

Commit

Permalink
Rewire local (#635)
Browse files Browse the repository at this point in the history
* refactor: move local to a single command

* feat: split cobra functions
  • Loading branch information
João Paulo Vanzuita authored Nov 2, 2022
1 parent 4b68484 commit 90162b5
Show file tree
Hide file tree
Showing 19 changed files with 1,154 additions and 188 deletions.
4 changes: 2 additions & 2 deletions cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ cluster provisioning process spinning up the services, and validates the livenes
// todo: wire it up in the architecture / files / folder

// update terraform s3 backend to internal k8s dns (s3/minio bucket)
err = pkg.ReplaceS3Backend()
err = pkg.ReplaceTerraformS3Backend()
if err != nil {
return err
}
Expand All @@ -280,7 +280,7 @@ cluster provisioning process spinning up the services, and validates the livenes
branchName := "update-s3-backend"
branchNameRef := plumbing.ReferenceName("refs/heads/" + branchName)

gitClient.UpdateLocalTFFilesAndPush(
gitClient.UpdateLocalTerraformFilesAndPush(
githubHost,
githubOwner,
localRepo,
Expand Down
4 changes: 4 additions & 0 deletions cmd/createUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
)

// todo: move it to internals/ArgoCD
// deprecated
func setArgocdCreds(dryRun bool) {
if dryRun {
log.Printf("[#99] Dry-run mode, setArgocdCreds skipped.")
Expand All @@ -43,6 +44,7 @@ func setArgocdCreds(dryRun bool) {
viper.WriteConfig()
}

// deprecated
func waitArgoCDToBeReady(dryRun bool) {
if dryRun {
log.Printf("[#99] Dry-run mode, waitArgoCDToBeReady skipped.")
Expand Down Expand Up @@ -76,6 +78,7 @@ func waitArgoCDToBeReady(dryRun bool) {
}
}

// deprecated
func waitVaultToBeRunning(dryRun bool) {
if dryRun {
log.Printf("[#99] Dry-run mode, waitVaultToBeRunning skipped.")
Expand Down Expand Up @@ -115,6 +118,7 @@ func waitVaultToBeRunning(dryRun bool) {
}
}

// deprecated
func loopUntilPodIsReady(dryRun bool) {
if dryRun {
log.Printf("[#99] Dry-run mode, loopUntilPodIsReady skipped.")
Expand Down
2 changes: 1 addition & 1 deletion cmd/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func init() {

//Group Flags

rootCmd.AddCommand(localCmd)
//rootCmd.AddCommand(localCmd)
currentCommand := localCmd
//log.SetPrefix("LOG: ")
//log.SetFlags(log.Ldate | log.Lmicroseconds | log.Llongfile)
Expand Down
Loading

0 comments on commit 90162b5

Please sign in to comment.