Skip to content

Commit

Permalink
Merge branch 'main' into feat-akamai-estimated-time
Browse files Browse the repository at this point in the history
  • Loading branch information
fharper authored May 21, 2024
2 parents 7c47146 + 4d4f3b6 commit f7dec0e
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 180 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ body:
multiple: true
options:
- None specific
- Akamai
- AWS
- Civo
- DigitalOcean
- Google Cloud
- k3d (local)
- K3s
- Vultr
validations:
required: true
Expand Down Expand Up @@ -75,7 +77,7 @@ body:
id: os
attributes:
label: Which Operating System?
description: Please add the architecture in the issue description. If you selected "Others", please specify in the textarea.
description: Please add the architecture in the issue description. If you selected "Other", please specify in the issue.
options:
- None specific
- macOS
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/check-signed.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: Validate if commits in PR are signed
on: pull_request
name: Validate if commits are signed
on: [pull_request, pull_request_target]

jobs:
signed-commits-check:
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@v3.5.3
- name: Check out the repository code
uses: actions/checkout@v4.1.4

- name: Check signed commits in PR
- name: Check if the commits are signed
uses: 1Password/check-signed-commits-action@v1
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ Each of our platforms have install guides that detail the prerequesites, command
- [k3d (local)](https://docs.kubefirst.io/k3d/overview/)
- [AWS](https://docs.kubefirst.io/aws/overview/)
- [Civo](https://docs.kubefirst.io/civo/overview/)
- [DigitalOcean](https://docs.kubefirst.io/do/overview/)

In beta:

- [DigitalOcean](https://docs.kubefirst.io/do/overview/)
- [Google Cloud](https://docs.kubefirst.io/gcp/overview/)
- [Vultr](https://docs.kubefirst.io/vultr/overview/)
- Akamai (docs coming soon) `kubefirst beta akamai create --help`
- K3s (docs coming soon) `kubefirst beta k3s create --help`

## Overview

Expand Down
34 changes: 18 additions & 16 deletions cmd/akamai/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"fmt"
"os"

"github.com/rs/zerolog/log"
"github.com/kubefirst/kubefirst/internal/catalog"
"github.com/kubefirst/kubefirst/internal/cluster"
"github.com/kubefirst/kubefirst/internal/gitShim"
Expand All @@ -18,6 +19,7 @@ import (
"github.com/kubefirst/kubefirst/internal/provision"
"github.com/kubefirst/kubefirst/internal/utilities"
"github.com/kubefirst/runtime/pkg"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -106,22 +108,22 @@ func ValidateProvidedFlags(gitProvider string) error {
}
}

// switch gitProvider {
// case "github":
// key, err := internalssh.GetHostKey("github.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "github.com", key.Type())
// }
// case "gitlab":
// key, err := internalssh.GetHostKey("gitlab.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
// }
// }
switch gitProvider {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "github.com", key.Type())
}
case "gitlab":
key, err := internalssh.GetHostKey("gitlab.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
}
}

progress.CompleteStep("Validate provided flags")

Expand Down
34 changes: 18 additions & 16 deletions cmd/aws/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"github.com/kubefirst/kubefirst/internal/utilities"
"github.com/kubefirst/runtime/pkg"
awsinternal "github.com/kubefirst/runtime/pkg/aws"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -131,22 +133,22 @@ func ValidateProvidedFlags(gitProvider string) error {
}
}

// switch gitProvider {
// case "github":
// key, err := internalssh.GetHostKey("github.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "github.com", key.Type())
// }
// case "gitlab":
// key, err := internalssh.GetHostKey("gitlab.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
// }
// }
switch gitProvider {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "github.com", key.Type())
}
case "gitlab":
key, err := internalssh.GetHostKey("gitlab.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
}
}

progress.CompleteStep("Validate provided flags")

Expand Down
34 changes: 18 additions & 16 deletions cmd/civo/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"github.com/kubefirst/kubefirst/internal/provision"
"github.com/kubefirst/kubefirst/internal/utilities"
"github.com/kubefirst/runtime/pkg"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -106,22 +108,22 @@ func ValidateProvidedFlags(gitProvider string) error {
}
}

// switch gitProvider {
// case "github":
// key, err := internalssh.GetHostKey("github.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "github.com", key.Type())
// }
// case "gitlab":
// key, err := internalssh.GetHostKey("gitlab.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
// }
// }
switch gitProvider {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "github.com", key.Type())
}
case "gitlab":
key, err := internalssh.GetHostKey("gitlab.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
}
}

progress.CompleteStep("Validate provided flags")

Expand Down
34 changes: 18 additions & 16 deletions cmd/digitalocean/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"github.com/kubefirst/kubefirst/internal/provision"
"github.com/kubefirst/kubefirst/internal/utilities"
"github.com/kubefirst/runtime/pkg"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -113,22 +115,22 @@ func ValidateProvidedFlags(gitProvider string) error {
}
}

// switch gitProvider {
// case "github":
// key, err := internalssh.GetHostKey("github.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "github.com", key.Type())
// }
// case "gitlab":
// key, err := internalssh.GetHostKey("gitlab.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
// }
// }
switch gitProvider {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "github.com", key.Type())
}
case "gitlab":
key, err := internalssh.GetHostKey("gitlab.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
}
}

progress.CompleteStep("Validate provided flags")

Expand Down
34 changes: 18 additions & 16 deletions cmd/google/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"github.com/kubefirst/kubefirst/internal/provision"
"github.com/kubefirst/kubefirst/internal/utilities"
"github.com/kubefirst/runtime/pkg"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
_ "k8s.io/client-go/plugin/pkg/client/auth"
Expand Down Expand Up @@ -107,22 +109,22 @@ func ValidateProvidedFlags(gitProvider string) error {
progress.Error("Unable to read GOOGLE_APPLICATION_CREDENTIALS file")
}

// switch gitProvider {
// case "github":
// key, err := internalssh.GetHostKey("github.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "github.com", key.Type())
// }
// case "gitlab":
// key, err := internalssh.GetHostKey("gitlab.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
// }
// }
switch gitProvider {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "github.com", key.Type())
}
case "gitlab":
key, err := internalssh.GetHostKey("gitlab.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
}
}

progress.CompleteStep("Validate provided flags")

Expand Down
34 changes: 18 additions & 16 deletions cmd/vultr/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"github.com/kubefirst/kubefirst/internal/provision"
"github.com/kubefirst/kubefirst/internal/utilities"
"github.com/kubefirst/runtime/pkg"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/rs/zerolog/log"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down Expand Up @@ -112,22 +114,22 @@ func ValidateProvidedFlags(gitProvider string) error {
}
}

// switch gitProvider {
// case "github":
// key, err := internalssh.GetHostKey("github.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "github.com", key.Type())
// }
// case "gitlab":
// key, err := internalssh.GetHostKey("gitlab.com")
// if err != nil {
// return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
// } else {
// log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
// }
// }
switch gitProvider {
case "github":
key, err := internalssh.GetHostKey("github.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "github.com", key.Type())
}
case "gitlab":
key, err := internalssh.GetHostKey("gitlab.com")
if err != nil {
return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy")
} else {
log.Info().Msgf("%s %s\n", "gitlab.com", key.Type())
}
}

progress.CompleteStep("Validate provided flags")

Expand Down
Binary file modified images/kubefirst-arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions internal/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func CheckForVersionUpdate() {
// versionCheck compares local to remote version
func versionCheck() (res *CheckResponse, skip bool) {
var latestVersion string
flatVersion := strings.ReplaceAll(configs.K1Version, "v", "")

resp, err := http.Get("https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/k/kubefirst.rb")

Expand Down Expand Up @@ -91,10 +92,10 @@ func versionCheck() (res *CheckResponse, skip bool) {
latestVersion = matches[1]

return &CheckResponse{
Current: configs.K1Version,
Outdated: latestVersion < configs.K1Version,
Latest: latestVersion == configs.K1Version,
New: configs.K1Version > latestVersion,
Current: flatVersion,
Outdated: latestVersion < flatVersion,
Latest: latestVersion == flatVersion,
New: flatVersion > latestVersion,
}, false
}

Expand Down
Loading

0 comments on commit f7dec0e

Please sign in to comment.