Skip to content

Commit

Permalink
fix: fix k3d git final push and port forward issue (#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
echoboomer authored Jul 1, 2023
1 parent a7bf241 commit 2da5d33
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions cmd/k3d/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
argocdapi "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned"
"github.com/go-git/go-git/v5"
githttps "github.com/go-git/go-git/v5/plumbing/transport/http"
gitssh "github.com/go-git/go-git/v5/plumbing/transport/ssh"
"github.com/go-git/go-git/v5/plumbing/transport/ssh"
"github.com/kubefirst/kubefirst/internal/gitShim"
"github.com/kubefirst/kubefirst/internal/telemetryShim"
"github.com/kubefirst/kubefirst/internal/utilities"
Expand Down Expand Up @@ -471,6 +471,12 @@ func runK3d(cmd *cobra.Command, args []string) error {
telemetryShim.Transmit(useTelemetryFlag, segmentClient, segment.MetricInitCompleted, "")
telemetryShim.Transmit(useTelemetryFlag, segmentClient, segment.MetricClusterInstallStarted, "")

//* generate public keys for ssh
publicKeys, err := ssh.NewPublicKeys("git", []byte(viper.GetString("kbot.private-key")), "")
if err != nil {
log.Info().Msgf("generate public keys failed: %s\n", err.Error())
}

gitopsTemplateTokens := k3d.GitopsTokenValues{
GithubOwner: cGitOwner,
GithubUser: cGitUser,
Expand Down Expand Up @@ -508,9 +514,6 @@ func runK3d(cmd *cobra.Command, args []string) error {
gitopsTemplateTokens.UseTelemetry = "false"
}

//* generate public keys for ssh
publicKeys, err := gitssh.NewPublicKeys("git", []byte(viper.GetString("kbot.private-key")), "")

//* generate http credentials for git auth over https
httpAuth := &githttps.BasicAuth{
Username: cGitUser,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/go-git/go-git/v5 v5.6.1
github.com/hashicorp/vault/api v1.9.0
github.com/kubefirst/runtime v0.1.73
github.com/kubefirst/runtime v0.1.74
github.com/rs/zerolog v1.29.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubefirst/runtime v0.1.73 h1:7Twp48ukpejM/56dc+8EItEVSof4hjeVLCUaMfGfOQ8=
github.com/kubefirst/runtime v0.1.73/go.mod h1:hbV3BuyzKp7hgMDLYQCuXFMn5ERl9pzqiotDDpRrLhc=
github.com/kubefirst/runtime v0.1.74 h1:4r8l8WnK8peXGSV3snwY+rZiVeVnGeUtCbPGCtklXT0=
github.com/kubefirst/runtime v0.1.74/go.mod h1:hbV3BuyzKp7hgMDLYQCuXFMn5ERl9pzqiotDDpRrLhc=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo=
Expand Down

0 comments on commit 2da5d33

Please sign in to comment.