Skip to content

Commit

Permalink
Merge branch 'master' into socketVMNet
Browse files Browse the repository at this point in the history
  • Loading branch information
spowelljr committed Oct 3, 2022
2 parents f11d12d + a416e26 commit d7cdd74
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
echo "::set-output name=changes::$c"
- name: Create PR
if: ${{ steps.gendocs.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: Update auto-generated docs and translations
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/leaderboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.MINIKUBE_BOT_PAT }}
- name: Create PR
if: ${{ steps.leaderboard.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: Update leaderboard
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/time-to-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
./hack/benchmark/time-to-k8s/time-to-k8s.sh
echo "::set-output name=version::$(minikube version --short)"
- name: Create PR
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: add time-to-k8s benchmark for ${{ steps.timeToK8sBenchmark.outputs.version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-golang-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "::set-output name=changes::$(git status --porcelain)"
- name: Create PR
if: ${{ steps.bumpGolang.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: bump golang versions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-golint-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "::set-output name=changes::$(git status --porcelain)"
- name: Create PR
if: ${{ steps.bumpGolint.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: bump golint versions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-gopogh-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "::set-output name=changes::$(git status --porcelain)"
- name: Create PR
if: ${{ steps.bumpGopogh.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: bump gopogh versions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-gotestsum-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "::set-output name=changes::$(git status --porcelain)"
- name: Create PR
if: ${{ steps.bumpGotestsum.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: bump gotestsum versions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-k8s-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo "::set-output name=changes::$c"
- name: Create PR
if: ${{ steps.bumpk8s.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: bump default/newest kubernetes versions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-kubadm-constants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
echo "::set-output name=changes::$c"
- name: Create PR
if: ${{ steps.bumpKubAdmConsts.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: update image constants for kubeadm images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yearly-leaderboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.MINIKUBE_BOT_PAT }}
- name: Create PR
if: ${{ steps.yearlyLeaderboard.outputs.changes != '' }}
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d
uses: peter-evans/create-pull-request@671dc9c9e0c2d73f07fa45a3eb0220e1622f0c5f
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: Update yearly leaderboard
Expand Down
11 changes: 8 additions & 3 deletions cmd/minikube/cmd/config/profile_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/machine"
"k8s.io/minikube/pkg/minikube/notify"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/reason"
"k8s.io/minikube/pkg/minikube/style"
Expand All @@ -49,7 +50,11 @@ var profileListCmd = &cobra.Command{
Short: "Lists all minikube profiles.",
Long: "Lists all valid minikube profiles and detects all possible invalid profiles.",
Run: func(cmd *cobra.Command, args []string) {
switch strings.ToLower(profileOutput) {
output := strings.ToLower(profileOutput)
out.SetJSON(output == "json")
go notify.MaybePrintUpdateTextFromGithub()

switch output {
case "json":
printProfilesJSON()
case "table":
Expand Down Expand Up @@ -204,11 +209,11 @@ func printProfilesJSON() {
body["valid"] = profilesOrDefault(validProfiles)
body["invalid"] = profilesOrDefault(invalidProfiles)
jsonString, _ := json.Marshal(body)
out.String(string(jsonString))
os.Stdout.Write(jsonString)
} else {
body["error"] = err
jsonString, _ := json.Marshal(body)
out.String(string(jsonString))
os.Stdout.Write(jsonString)
os.Exit(reason.ExGuestError)
}
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/minikube/cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import (
"k8s.io/minikube/pkg/minikube/machine"
"k8s.io/minikube/pkg/minikube/mustload"
"k8s.io/minikube/pkg/minikube/node"
"k8s.io/minikube/pkg/minikube/notify"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/out/register"
"k8s.io/minikube/pkg/minikube/reason"
Expand Down Expand Up @@ -219,6 +220,7 @@ var statusCmd = &cobra.Command{
}

out.SetJSON(output == "json")
go notify.MaybePrintUpdateTextFromGithub()

cname := ClusterFlagValue()
api, cc := mustload.Partial(cname)
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ var tunnelCmd = &cobra.Command{
cancel()
}()

if driver.NeedsPortForward(co.Config.Driver) {
if driver.NeedsPortForward(co.Config.Driver) || bindAddress != "" {
port, err := oci.ForwardedPort(co.Config.Driver, cname, 22)
if err != nil {
exit.Error(reason.DrvPortForward, "error getting ssh port", err)
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
contrib.go.opencensus.io/exporter/stackdriver v0.13.12
github.com/Delta456/box-cli-maker/v2 v2.2.2
github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.8
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.9.0
github.com/Microsoft/hcsshim v0.8.17 // indirect
github.com/Parallels/docker-machine-parallels/v2 v2.0.1
github.com/VividCortex/godaemon v1.0.0
Expand Down Expand Up @@ -61,7 +61,7 @@ require (
github.com/pmezard/go-difflib v1.0.0
github.com/russross/blackfriday v1.6.0 // indirect
github.com/samalba/dockerclient v0.0.0-20160414174713-91d7393ff859 // indirect
github.com/shirou/gopsutil/v3 v3.22.8
github.com/shirou/gopsutil/v3 v3.22.9
github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.13.0
Expand Down Expand Up @@ -112,7 +112,7 @@ require (
cloud.google.com/go/trace v1.2.0 // indirect
git.sr.ht/~sbinet/gg v0.3.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.8 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.33.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
Expand Down
18 changes: 9 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ github.com/Delta456/box-cli-maker/v2 v2.2.2/go.mod h1:idItIMZeyx3bg73XwSgsLeZd+g
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2 h1:rMamBsR6iCT9Y5m2Il6vFGJvY7FAgck4AoA/LobheKU=
github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2/go.mod h1:BB1eHdMLYEFuFdBlRMb0N7YGVdM5s6Pt0njxgvfbGGs=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.8 h1:gJotWbuzSbr350EljD1zTNy3l4NiigjDVeVBWf7ERgk=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.8/go.mod h1:Cy0FEJrgXiz3UbLX/ZRlHPQxq605mGwz14ac+peTwQo=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.32.8 h1:ehU1r1DPZfv3Qfi0r7C24UAi0sozSwiSHtqwD1sdL8k=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.8 h1:FJ3zlcMfrS9iv06vzg1V73RlfrHZPsyfdkKrqGYAT4E=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.8/go.mod h1:/G0zPXsUx5gZUd6ryJakuDo4VR7EJScegf1ZNK8xIGs=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.9.0 h1:OdiKeirSJ2Y8QMK/E7LOasoIJUQ3kLrIt+AFoVcajDg=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.9.0/go.mod h1:0U7WCkIC6l7b0YLIXhH5SvOHtKyo3gpKGS061MFahsw=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.33.0 h1:WGf4L3BLM+7+RUxz3czAnWQ6ohZUxZkAzgCTm2jxUqE=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.33.0 h1:+Z8Iw93t626kmOFMF+ZvTVpVXPMxbAOEJYpula80az4=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.33.0/go.mod h1:usNlVDrVPvqJZkz411dXfpyKqwkVgSE9kr24uinj+nU=
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
Expand Down Expand Up @@ -1241,8 +1241,8 @@ github.com/securego/gosec/v2 v2.9.1/go.mod h1:oDcDLcatOJxkCGaCaq8lua1jTnYf6Sou4w
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs=
github.com/shirou/gopsutil/v3 v3.21.10/go.mod h1:t75NhzCZ/dYyPQjyQmrAYP6c8+LCdFANeBMdLPCNnew=
github.com/shirou/gopsutil/v3 v3.22.8 h1:a4s3hXogo5mE2PfdfJIonDbstO/P+9JszdfhAHSzD9Y=
github.com/shirou/gopsutil/v3 v3.22.8/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI=
github.com/shirou/gopsutil/v3 v3.22.9 h1:yibtJhIVEMcdw+tCTbOPiF1VcsuDeTE4utJ8Dm4c5eA=
github.com/shirou/gopsutil/v3 v3.22.9/go.mod h1:bBYl1kjgEJpWpxeHmLI+dVHWtyAwfcmSBLDsp2TNT8A=
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
Expand Down Expand Up @@ -1419,10 +1419,10 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.34.0 h1:9NkMW03wwEzPtP/KciZ4Ozu/Uz5ZA7kfqXJIObnrjGU=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.0 h1:qZ3KzA4qPzLBDtQyPk4ydjlg8zvXbNysnFHaVMKJbVo=
go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4=
go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ=
go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs=
go.opentelemetry.io/otel/metric v0.32.1 h1:ftff5LSBCIDwL0UkhBuDg8j9NNxx2IusvJ18q9h6RC4=
go.opentelemetry.io/otel/sdk v1.10.0 h1:jZ6K7sVn04kk/3DNUdJ4mqRlGDiXAVuIG+MMENpTNdY=
go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE=
go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E=
Expand Down
3 changes: 3 additions & 0 deletions pkg/minikube/notify/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ func shouldCheckURLVersion(filePath string) bool {
if !viper.GetBool("interactive") {
return false
}
if out.JSON {
return false
}
lastUpdateTime := timeFromFileIfExists(filePath)
return time.Since(lastUpdateTime).Hours() >= viper.GetFloat64(config.ReminderWaitPeriodInHours)
}
Expand Down
Loading

0 comments on commit d7cdd74

Please sign in to comment.