Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/kubernetes/minikube into …
Browse files Browse the repository at this point in the history
…master_srikrishnabh
  • Loading branch information
Srikrishnabh committed Nov 6, 2021
2 parents 7dd0eb0 + 9abb3b5 commit c80793c
Show file tree
Hide file tree
Showing 99 changed files with 1,698 additions and 640 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/sync-minikube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Sync docker images of minikube to Alibaba Cloud

on:
workflow_dispatch:
schedule:
# every day at 7am & 7pm pacific
- cron: "0 2,14 * * *"

jobs:
sync-images:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./image-syncer
steps:
- uses: actions/checkout@v2
with:
repository: denverdino/image-syncer
path: ./image-syncer

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Build
run: make

- name: Synchronize images to Alibaba Cloud Container Registry Service
env:
ACR_USER: ${{ secrets.ALIBABA_CLOUD_ACR_USER }}
ACR_PASSWORD: ${{ secrets.ALIBABA_CLOUD_ACR_PASSWORD }}
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}

run: ./image-syncer --auth=auth.json --images=images.json --days=2 --proc=2
126 changes: 126 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,131 @@
# Release Notes

## Version 1.24.0 - 2021-11-04

Features:
* Add --no-kubernetes flag to start minikube without kubernetes [#12848](https://github.com/kubernetes/minikube/pull/12848)
* `minikube addons list` shows addons if cluster does not exist [#12837](https://github.com/kubernetes/minikube/pull/12837)

Bug fixes:
* virtualbox: change default `host-only-cidr` [#12811](https://github.com/kubernetes/minikube/pull/12811)
* fix zsh completion [#12841](https://github.com/kubernetes/minikube/pull/12841)
* Fix starting on Windows with VMware driver on non `C:` drive [#12819](https://github.com/kubernetes/minikube/pull/12819)

For a more detailed changelog, including changes occuring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md).

Thank you to our contributors for this release!

- Akira Yoshiyama
- Keyhoh
- Medya Ghazizadeh
- Nicolas Busseneau
- Sharif Elgamal
- Steven Powell
- Toshiaki Inukai

Thank you to our PR reviewers for this release!

- spowelljr (11 comments)
- sharifelgamal (10 comments)
- afbjorklund (6 comments)
- atoato88 (5 comments)
- medyagh (3 comments)
- yosshy (1 comments)

Thank you to our triage members for this release!

- sharifelgamal (13 comments)
- afbjorklund (9 comments)
- spowelljr (6 comments)
- medyagh (3 comments)
- Sarathgiggso (2 comments)

## Version 1.24.0-beta.0 - 2021-10-28

Features:
* Allow running podman as experimental driver in Windows & macOS [#12579](https://github.com/kubernetes/minikube/pull/12579)
* Add Aliyun (China) mirror for preload images and K8s release binaries [#12578](https://github.com/kubernetes/minikube/pull/12578)

Minor Improvements:
* certs: Renew minikube certs if expired [#12534](https://github.com/kubernetes/minikube/pull/12534)
* mount: Persist mount settings after stop start [#12719](https://github.com/kubernetes/minikube/pull/12719)
* cri-o: Implement --force-systemd into cri-o [#12553](https://github.com/kubernetes/minikube/pull/12553)
* tunnel: Use new bridge interface name on OSX Monterey [#12799](https://github.com/kubernetes/minikube/pull/12799)
* Added port validation [#12233](https://github.com/kubernetes/minikube/pull/12233)
* buildkit: Start the daemon on demand (socket-activated) [#12081](https://github.com/kubernetes/minikube/pull/12081)

Bug Fixes:
* ingress: Restore ingress & ingress-dns backwards compatibility for k8s < v1.19 [#12794](https://github.com/kubernetes/minikube/pull/12794)
* gcp-auth: Fix disabling addon [#12779](https://github.com/kubernetes/minikube/pull/12779)
* podman: Fix network inspect index check [#12756](https://github.com/kubernetes/minikube/pull/12756)
* cilium: Fix Ipv4 cidr [#12587](https://github.com/kubernetes/minikube/pull/12587)
* mount: Fix mounting on non-default profile [#12711](https://github.com/kubernetes/minikube/pull/12711)
* podman: Match the lower case of the podman error message [#12685](https://github.com/kubernetes/minikube/pull/12685)
* ssh: Fix using tilde in ssh-key path [#12672](https://github.com/kubernetes/minikube/pull/12672)
* podman: Fix network not getting deleted [#12627](https://github.com/kubernetes/minikube/pull/12627)
* zsh: Fix completion [#12420](https://github.com/kubernetes/minikube/pull/12420)
* windows wsl2: Fix invoking kubeadm failing when spaces in PATH for none driver [#12617](https://github.com/kubernetes/minikube/pull/12617)
* image build: Only build on control plane by default [#12149](https://github.com/kubernetes/minikube/pull/12149)
* mount: Fix `minikube stop` on Windows VMs taking 9 minutes when mounted [#12716](https://github.com/kubernetes/minikube/pull/12716)

Version Upgrades:
* ingres controller: Update to v1/1.0.4 and v1beta1/0.49.3 [#12702](https://github.com/kubernetes/minikube/pull/12702)
* minikube-ingress-dns: Update image to 0.0.2 [#12730](https://github.com/kubernetes/minikube/pull/12730)
* helm-tiller: Update image to v2.17.0 [#12641](https://github.com/kubernetes/minikube/pull/12641)

For a more detailed changelog, including changes occuring in pre-release versions, see [CHANGELOG.md](https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md).

Thank you to our contributors for this release!

- Akira Yoshiyama
- Alexandre Garnier
- Anders F Björklund
- Aniruddha Amit Dutta
- Avinash Upadhyaya
- Cameron Brunner
- Carlos Santana
- Claudiu Belu
- Gio Gutierrez
- Jeff MAURY
- KallyDev
- Keyhoh
- Kumar Shivendu
- Li Yi
- Marc Velasco
- Marcus Watkins
- Medya Ghazizadeh
- Michael Cade
- Pablo Caderno
- Peixuan Ding
- Piotr Resztak
- Predrag Rogic
- RA489
- Sharif Elgamal
- Steven Powell
- Taylor Steil
- Wei Luo
- phbits
- yxxhero

Thank you to our PR reviewers for this release!

- spowelljr (27 comments)
- medyagh (22 comments)
- t-inu (20 comments)
- sharifelgamal (9 comments)
- atoato88 (6 comments)
- rikatz (5 comments)
- YuikoTakada (1 comments)
- tstromberg (1 comments)

Thank you to our triage members for this release!

- spowelljr (37 comments)
- afbjorklund (34 comments)
- RA489 (30 comments)
- medyagh (29 comments)
- sharifelgamal (29 comments)

## Version 1.23.2 - 2021-09-21

Fix crio regression:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

# Bump these on release - and please check ISO_VERSION for correctness.
VERSION_MAJOR ?= 1
VERSION_MINOR ?= 23
VERSION_BUILD ?= 2
VERSION_MINOR ?= 24
VERSION_BUILD ?= 0
RAW_VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_BUILD)
VERSION ?= v$(RAW_VERSION)

KUBERNETES_VERSION ?= $(shell egrep "DefaultKubernetesVersion =" pkg/minikube/constants/constants.go | cut -d \" -f2)
KIC_VERSION ?= $(shell egrep "Version =" pkg/drivers/kic/types.go | cut -d \" -f2)

# Default to .0 for higher cache hit rates, as build increments typically don't require new ISO versions
ISO_VERSION ?= v1.23.1-1633115168-12081
ISO_VERSION ?= v1.24.0
# Dashes are valid in semver, but not Linux packaging. Use ~ to delimit alpha/beta
DEB_VERSION ?= $(subst -,~,$(RAW_VERSION))
DEB_REVISION ?= 0
Expand Down
3 changes: 2 additions & 1 deletion cmd/minikube/cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ __minikube_convert_bash_to_zsh() {
-e "s/${LWORD}compopt${RWORD}/__minikube_compopt/g" \
-e "s/${LWORD}declare${RWORD}/__minikube_declare/g" \
-e "s/\\\$(type${RWORD}/\$(__minikube_type/g" \
-e "s/aliashash\[\"\([a-z]*\)\"\]/aliashash[\1]/g" \
<<'BASH_COMPLETION_EOF'
`

Expand All @@ -292,7 +293,7 @@ __minikube_convert_bash_to_zsh() {
}

buf := new(bytes.Buffer)
err = cmd.GenZshCompletion(buf)
err = cmd.GenBashCompletion(buf)
if err != nil {
return errors.Wrap(err, "Error generating zsh completion")
}
Expand Down
22 changes: 19 additions & 3 deletions cmd/minikube/cmd/config/addons_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ var addonsListCmd = &cobra.Command{
exit.Message(reason.Usage, "usage: minikube addons list")
}

_, cc := mustload.Partial(ClusterFlagValue())
var cc *config.ClusterConfig
if config.ProfileExists(ClusterFlagValue()) {
_, cc = mustload.Partial(ClusterFlagValue())
}
switch strings.ToLower(addonListOutput) {
case "list":
printAddonsList(cc)
Expand Down Expand Up @@ -98,18 +101,26 @@ var printAddonsList = func(cc *config.ClusterConfig) {

var tData [][]string
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"Addon Name", "Profile", "Status", "Maintainer"})
table.SetAutoFormatHeaders(true)
table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
table.SetCenterSeparator("|")
if cc == nil {
table.SetHeader([]string{"Addon Name", "Maintainer"})
} else {
table.SetHeader([]string{"Addon Name", "Profile", "Status", "Maintainer"})
}

for _, addonName := range addonNames {
addonBundle := assets.Addons[addonName]
enabled := addonBundle.IsEnabled(cc)
maintainer := addonBundle.Maintainer
if maintainer == "" {
maintainer = "unknown (third-party)"
}
if cc == nil {
tData = append(tData, []string{addonName, maintainer})
continue
}
enabled := addonBundle.IsEnabled(cc)
tData = append(tData, []string{addonName, cc.Name, fmt.Sprintf("%s %s", stringFromStatus(enabled), iconFromStatus(enabled)), maintainer})
}

Expand All @@ -135,6 +146,11 @@ var printAddonsJSON = func(cc *config.ClusterConfig) {
addonsMap := map[string]map[string]interface{}{}

for _, addonName := range addonNames {
if cc == nil {
addonsMap[addonName] = map[string]interface{}{}
continue
}

addonBundle := assets.Addons[addonName]
enabled := addonBundle.IsEnabled(cc)

Expand Down
85 changes: 85 additions & 0 deletions cmd/minikube/cmd/config/addons_list_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
Copyright 2021 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package config

import (
"encoding/json"
"os"
"testing"

"k8s.io/minikube/pkg/minikube/out"
)

func TestAddonsList(t *testing.T) {
t.Run("NonExistingClusterTable", func(t *testing.T) {
b := make([]byte, 167)
r, w, err := os.Pipe()
if err != nil {
t.Fatalf("failed to create pipe: %v", err)
}
old := os.Stdout
defer func() { os.Stdout = old }()
os.Stdout = w
printAddonsList(nil)
if err := w.Close(); err != nil {
t.Fatalf("failed to close pipe: %v", err)
}
if _, err := r.Read(b); err != nil {
t.Fatalf("failed to read bytes: %v", err)
}
got := string(b)
expected := `|-----------------------------|-----------------------|
| ADDON NAME | MAINTAINER |
|-----------------------------|-----------------------|`
if got != expected {
t.Errorf("Expected header to be: %q; got = %q", expected, got)
}
})

t.Run("NonExistingClusterJSON", func(t *testing.T) {
type addons struct {
Ambassador *interface{} `json:"ambassador"`
}

b := make([]byte, 534)
r, w, err := os.Pipe()
if err != nil {
t.Fatalf("failed to create pipe: %v", err)
}
old := os.Stdout
defer func() {
os.Stdout = old
out.SetOutFile(os.Stdout)
}()
os.Stdout = w
out.SetOutFile(os.Stdout)
printAddonsJSON(nil)
if err := w.Close(); err != nil {
t.Fatalf("failed to close pipe: %v", err)
}
if _, err := r.Read(b); err != nil {
t.Fatalf("failed to read bytes: %v", err)
}
got := addons{}
if err := json.Unmarshal(b, &got); err != nil {
t.Fatalf("failed to unmarshal output; output: %q; err: %v", string(b), err)
}
if got.Ambassador == nil {
t.Errorf("expected `ambassador` field to not be nil, but was")
}
})
}
7 changes: 6 additions & 1 deletion cmd/minikube/cmd/config/profile_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/kverify"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/machine"
Expand Down Expand Up @@ -164,7 +165,11 @@ func profilesToTableData(profiles []*config.Profile) [][]string {
exit.Error(reason.GuestCpConfig, "error getting primary control plane", err)
}

data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime, cp.IP, strconv.Itoa(cp.Port), p.Config.KubernetesConfig.KubernetesVersion, p.Status, strconv.Itoa(len(p.Config.Nodes))})
k8sVersion := p.Config.KubernetesConfig.KubernetesVersion
if k8sVersion == constants.NoKubernetesVersion { // for --no-kubernetes flag
k8sVersion = "N/A"
}
data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime, cp.IP, strconv.Itoa(cp.Port), k8sVersion, p.Status, strconv.Itoa(len(p.Config.Nodes))})
}
return data
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/minikube/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/cruntime"
"k8s.io/minikube/pkg/minikube/delete"
"k8s.io/minikube/pkg/minikube/download"
"k8s.io/minikube/pkg/minikube/driver"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/kubeconfig"
Expand Down Expand Up @@ -151,7 +152,7 @@ func runDelete(cmd *cobra.Command, args []string) {
}
// register.SetEventLogPath(localpath.EventLog(ClusterFlagValue()))
register.Reg.SetStep(register.Deleting)

download.CleanUpOlderPreloads()
validProfiles, invalidProfiles, err := config.ListProfiles()
if err != nil {
klog.Warningf("'error loading profiles in minikube home %q: %v", localpath.MiniPath(), err)
Expand Down
2 changes: 2 additions & 0 deletions cmd/minikube/cmd/node_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"k8s.io/minikube/pkg/minikube/mustload"
"k8s.io/minikube/pkg/minikube/node"
"k8s.io/minikube/pkg/minikube/out"
"k8s.io/minikube/pkg/minikube/out/register"
"k8s.io/minikube/pkg/minikube/reason"
"k8s.io/minikube/pkg/minikube/style"
)
Expand Down Expand Up @@ -70,6 +71,7 @@ var nodeAddCmd = &cobra.Command{
}
}

register.Reg.SetStep(register.InitialSetup)
if err := node.Add(cc, n, false); err != nil {
_, err := maybeDeleteAndRetry(cmd, *cc, n, nil, err)
if err != nil {
Expand Down
Loading

0 comments on commit c80793c

Please sign in to comment.