mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
update pause to 3.4.1 for kubelet/kubeadm
Signed-off-by: pacoxu <paco.xu@daocloud.io>
This commit is contained in:
parent
0c152cbbbe
commit
8946f26769
@ -160,9 +160,9 @@ dependencies:
|
|||||||
match: TAG =
|
match: TAG =
|
||||||
|
|
||||||
- name: "k8s.gcr.io/pause: dependents"
|
- name: "k8s.gcr.io/pause: dependents"
|
||||||
version: 3.2
|
version: 3.4.1
|
||||||
refPaths:
|
refPaths:
|
||||||
- path: cmd/kubeadm/app/constants/constants_unix.go
|
- path: cmd/kubeadm/app/constants/constants.go
|
||||||
match: PauseVersion\s+=
|
match: PauseVersion\s+=
|
||||||
- path: cmd/kubeadm/app/util/template_test.go
|
- path: cmd/kubeadm/app/util/template_test.go
|
||||||
match: validTmpl\s+=
|
match: validTmpl\s+=
|
||||||
@ -209,7 +209,7 @@ dependencies:
|
|||||||
- path: test/utils/runners.go
|
- path: test/utils/runners.go
|
||||||
match: k8s.gcr.io\/pause:\d+\.\d+
|
match: k8s.gcr.io\/pause:\d+\.\d+
|
||||||
- path: test/utils/image/manifest.go
|
- path: test/utils/image/manifest.go
|
||||||
match: configs\[Pause\] = Config{gcRegistry, "pause", "\d+\.\d+"}
|
match: configs\[Pause\] = Config{gcRegistry, "pause", "\d+\.\d+.\d+"}
|
||||||
|
|
||||||
# metadata-concealment: bump this one first
|
# metadata-concealment: bump this one first
|
||||||
- name: "metadata-concealment"
|
- name: "metadata-concealment"
|
||||||
|
@ -414,6 +414,9 @@ const (
|
|||||||
ModeRBAC string = "RBAC"
|
ModeRBAC string = "RBAC"
|
||||||
// ModeNode is an authorization mode that authorizes API requests made by kubelets.
|
// ModeNode is an authorization mode that authorizes API requests made by kubelets.
|
||||||
ModeNode string = "Node"
|
ModeNode string = "Node"
|
||||||
|
|
||||||
|
// PauseVersion indicates the default pause image version for kubeadm
|
||||||
|
PauseVersion = "3.4.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -21,7 +21,4 @@ package constants
|
|||||||
const (
|
const (
|
||||||
// DefaultDockerCRISocket defines the default Docker CRI socket
|
// DefaultDockerCRISocket defines the default Docker CRI socket
|
||||||
DefaultDockerCRISocket = "/var/run/dockershim.sock"
|
DefaultDockerCRISocket = "/var/run/dockershim.sock"
|
||||||
|
|
||||||
// PauseVersion indicates the default pause image version for kubeadm
|
|
||||||
PauseVersion = "3.2"
|
|
||||||
)
|
)
|
||||||
|
@ -21,7 +21,4 @@ package constants
|
|||||||
const (
|
const (
|
||||||
// DefaultDockerCRISocket defines the default Docker CRI socket
|
// DefaultDockerCRISocket defines the default Docker CRI socket
|
||||||
DefaultDockerCRISocket = "npipe:////./pipe/docker_engine"
|
DefaultDockerCRISocket = "npipe:////./pipe/docker_engine"
|
||||||
|
|
||||||
// PauseVersion indicates the default pause image version for kubeadm
|
|
||||||
PauseVersion = "1.4.0"
|
|
||||||
)
|
)
|
||||||
|
@ -8,23 +8,14 @@ load(
|
|||||||
|
|
||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = ["images.go"],
|
||||||
"images.go",
|
|
||||||
"images_unix.go",
|
|
||||||
"images_windows.go",
|
|
||||||
],
|
|
||||||
importpath = "k8s.io/kubernetes/cmd/kubeadm/app/images",
|
importpath = "k8s.io/kubernetes/cmd/kubeadm/app/images",
|
||||||
deps = [
|
deps = [
|
||||||
"//cmd/kubeadm/app/apis/kubeadm:go_default_library",
|
"//cmd/kubeadm/app/apis/kubeadm:go_default_library",
|
||||||
"//cmd/kubeadm/app/constants:go_default_library",
|
"//cmd/kubeadm/app/constants:go_default_library",
|
||||||
"//cmd/kubeadm/app/util:go_default_library",
|
"//cmd/kubeadm/app/util:go_default_library",
|
||||||
"//vendor/k8s.io/klog/v2:go_default_library",
|
"//vendor/k8s.io/klog/v2:go_default_library",
|
||||||
] + select({
|
],
|
||||||
"@io_bazel_rules_go//go/platform:windows": [
|
|
||||||
"//cmd/kubeadm/app/apis/kubeadm/v1beta2:go_default_library",
|
|
||||||
],
|
|
||||||
"//conditions:default": [],
|
|
||||||
}),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
go_test(
|
go_test(
|
||||||
|
@ -121,3 +121,8 @@ func GetControlPlaneImages(cfg *kubeadmapi.ClusterConfiguration) []string {
|
|||||||
|
|
||||||
return imgs
|
return imgs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetPauseImage returns the image for the "pause" container
|
||||||
|
func GetPauseImage(cfg *kubeadmapi.ClusterConfiguration) string {
|
||||||
|
return GetGenericImage(cfg.ImageRepository, "pause", constants.PauseVersion)
|
||||||
|
}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
// +build !windows
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The Kubernetes Authors.
|
|
||||||
|
|
||||||
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 images
|
|
||||||
|
|
||||||
import (
|
|
||||||
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
|
|
||||||
"k8s.io/kubernetes/cmd/kubeadm/app/constants"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetPauseImage returns the image for the "pause" container
|
|
||||||
func GetPauseImage(cfg *kubeadmapi.ClusterConfiguration) string {
|
|
||||||
return GetGenericImage(cfg.ImageRepository, "pause", constants.PauseVersion)
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
// +build windows
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2020 The Kubernetes Authors.
|
|
||||||
|
|
||||||
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 images
|
|
||||||
|
|
||||||
import (
|
|
||||||
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
|
|
||||||
kubeadmapiv1beta2 "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2"
|
|
||||||
"k8s.io/kubernetes/cmd/kubeadm/app/constants"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetPauseImage returns the image for the "pause" container
|
|
||||||
func GetPauseImage(cfg *kubeadmapi.ClusterConfiguration) string {
|
|
||||||
//If user has configured the cluster to use a different image repository, use that for the Windows pause image.
|
|
||||||
if cfg.ImageRepository != kubeadmapiv1beta2.DefaultImageRepository {
|
|
||||||
return GetGenericImage(cfg.ImageRepository, "pause", constants.PauseVersion)
|
|
||||||
}
|
|
||||||
return GetGenericImage("mcr.microsoft.com/oss/kubernetes", "pause", constants.PauseVersion)
|
|
||||||
}
|
|
@ -119,11 +119,11 @@ func TestBuildKubeletArgMap(t *testing.T) {
|
|||||||
nodeRegOpts: &kubeadmapi.NodeRegistrationOptions{
|
nodeRegOpts: &kubeadmapi.NodeRegistrationOptions{
|
||||||
CRISocket: "/var/run/dockershim.sock",
|
CRISocket: "/var/run/dockershim.sock",
|
||||||
},
|
},
|
||||||
pauseImage: "gcr.io/pause:3.2",
|
pauseImage: "gcr.io/pause:3.4.1",
|
||||||
},
|
},
|
||||||
expected: map[string]string{
|
expected: map[string]string{
|
||||||
"network-plugin": "cni",
|
"network-plugin": "cni",
|
||||||
"pod-infra-container-image": "gcr.io/pause:3.2",
|
"pod-infra-container-image": "gcr.io/pause:3.4.1",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -21,9 +21,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
validTmpl = "image: {{ .ImageRepository }}/pause:3.2"
|
validTmpl = "image: {{ .ImageRepository }}/pause:3.4.1"
|
||||||
validTmplOut = "image: k8s.gcr.io/pause:3.2"
|
validTmplOut = "image: k8s.gcr.io/pause:3.4.1"
|
||||||
doNothing = "image: k8s.gcr.io/pause:3.2"
|
doNothing = "image: k8s.gcr.io/pause:3.4.1"
|
||||||
invalidTmpl1 = "{{ .baz }/d}"
|
invalidTmpl1 = "{{ .baz }/d}"
|
||||||
invalidTmpl2 = "{{ !foobar }}"
|
invalidTmpl2 = "{{ !foobar }}"
|
||||||
)
|
)
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
// When these values are updated, also update test/utils/image/manifest.go
|
// When these values are updated, also update test/utils/image/manifest.go
|
||||||
defaultPodSandboxImageName = "k8s.gcr.io/pause"
|
defaultPodSandboxImageName = "k8s.gcr.io/pause"
|
||||||
defaultPodSandboxImageVersion = "3.2"
|
defaultPodSandboxImageVersion = "3.4.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -40,7 +40,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultSandboxImage = "k8s.gcr.io/pause:3.2"
|
defaultSandboxImage = "k8s.gcr.io/pause:3.4.1"
|
||||||
|
|
||||||
// Various default sandbox resources requests/limits.
|
// Various default sandbox resources requests/limits.
|
||||||
defaultSandboxCPUshares int64 = 2
|
defaultSandboxCPUshares int64 = 2
|
||||||
|
Loading…
Reference in New Issue
Block a user