Skip to content

Commit

Permalink
fix,feat: argo restart for k3d and argo upgrade (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
jokestax authored Aug 28, 2024
1 parent 565788f commit d45d161
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 2 additions & 0 deletions internal/argocd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ func GetArgocdTokenV2(httpClient *http.Client, argocdBaseURL string, username st
return "", err
}

req.Header.Set("Content-Type", "application/json")

res, err := httpClient.Do(req)
if err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion internal/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
MinioDefaultPassword = "feedkraystars"

// github.com/kubefirst/manifests ref ver
KubefirstManifestRepoRef = "0.1.0"
KubefirstManifestRepoRef = "v1.1.0"
)

// Vault
Expand Down
9 changes: 1 addition & 8 deletions internal/controller/argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,7 @@ func (clctrl *ClusterController) InstallArgoCD() error {
}
}

var argoCDInstallPath string

switch clctrl.CloudProvider {
case "digitalocean", "aws", "civo", "google", "vultr", "akamai":
argoCDInstallPath = "github.com:konstructio/manifests/argocd/cloud?ref=v1.1.0"
default:
argoCDInstallPath = fmt.Sprintf("github.com:kubefirst/manifests/argocd/cloud?ref=%s", pkg.KubefirstManifestRepoRef)
}
argoCDInstallPath := fmt.Sprintf("github.com:konstructio/manifests/argocd/cloud?ref=%s", pkg.KubefirstManifestRepoRef)

log.Info().Msg("installing argocd")

Expand Down
6 changes: 5 additions & 1 deletion pkg/k3d/k3d.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package k3d

import internal "github.com/konstructio/kubefirst-api/internal/k3d"
import (
"github.com/konstructio/kubefirst-api/internal/controller"
internal "github.com/konstructio/kubefirst-api/internal/k3d"
)

const DomainName = internal.DomainName
const GithubHost = internal.GithubHost
Expand Down Expand Up @@ -29,3 +32,4 @@ var DeleteK3dCluster = internal.DeleteK3dCluster
var GenerateSingleTLSSecret = internal.GenerateSingleTLSSecret

var ClusterCreateConsoleAPI = internal.ClusterCreateConsoleAPI
var RestartDeployment = controller.RestartDeployment

0 comments on commit d45d161

Please sign in to comment.