Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pause image to 3.4.1 and also update the change log #98205

Merged
merged 5 commits into from Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions build/dependencies.yaml
Expand Up @@ -160,9 +160,9 @@ dependencies:
match: TAG =

- name: "k8s.gcr.io/pause: dependents"
version: 3.2
version: 3.4.1
refPaths:
- path: cmd/kubeadm/app/constants/constants_unix.go
- path: cmd/kubeadm/app/constants/constants.go
match: PauseVersion\s+=
- path: cmd/kubeadm/app/util/template_test.go
match: validTmpl\s+=
Expand Down Expand Up @@ -209,7 +209,7 @@ dependencies:
- path: test/utils/runners.go
match: k8s.gcr.io\/pause:\d+\.\d+
- 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
- name: "metadata-concealment"
Expand Down
12 changes: 12 additions & 0 deletions build/pause/CHANGELOG.md
@@ -1,3 +1,15 @@
# 3.4.1

* Support for Windows container images (OS Versions: 20H2) was added.([#97322](https://prs.k8s.io/97322), [@claudiubelu](https://github.com/claudiubelu))

# 3.4

* Support for Windows container images (OS Versions: 1809, 1903, 1909, 2004) was added. ([#91452](https://prs.k8s.io/91452), [@claudiubelu](https://github.com/claudiubelu))

# 3.3

* update debian-base version to v2.1.0 ([#90665](https://prs.k8s.io/90665), [@justaugustus]

# 3.2

* The pause container is built with the correct "Architecture" metadata. ([#87954](https://prs.k8s.io/87954), [@BenTheElder](https://github.com/BenTheElder))
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/config-common.sh
Expand Up @@ -158,7 +158,7 @@ export WINDOWS_BOOTSTRAP_KUBECONFIG_FILE="${WINDOWS_K8S_DIR}\kubelet.bootstrap-k
# Path for kube-proxy kubeconfig file on Windows nodes.
export WINDOWS_KUBEPROXY_KUBECONFIG_FILE="${WINDOWS_K8S_DIR}\kubeproxy.kubeconfig"
# Pause container image for Windows container.
export WINDOWS_INFRA_CONTAINER="gcr.io/gke-release/pause-win:1.5.1"
export WINDOWS_INFRA_CONTAINER="k8s.gcr.io/pause:3.4.1"
# Storage Path for csi-proxy. csi-proxy only needs to be installed for Windows.
export CSI_PROXY_STORAGE_PATH="https://storage.googleapis.com/gke-release/csi-proxy"
# Version for csi-proxy
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/windows/smoke-test.sh
Expand Up @@ -358,7 +358,7 @@ spec:
spec:
containers:
- name: pause-win
image: gcr.io/gke-release/pause-win:1.5.1
image: k8s.gcr.io/pause:3.4.1
nodeSelector:
kubernetes.io/os: windows
tolerations:
Expand Down
3 changes: 3 additions & 0 deletions cmd/kubeadm/app/constants/constants.go
Expand Up @@ -414,6 +414,9 @@ const (
ModeRBAC string = "RBAC"
// ModeNode is an authorization mode that authorizes API requests made by kubelets.
ModeNode string = "Node"

// PauseVersion indicates the default pause image version for kubeadm
PauseVersion = "3.4.1"
)

var (
Expand Down
3 changes: 0 additions & 3 deletions cmd/kubeadm/app/constants/constants_unix.go
Expand Up @@ -21,7 +21,4 @@ package constants
const (
// DefaultDockerCRISocket defines the default Docker CRI socket
DefaultDockerCRISocket = "/var/run/dockershim.sock"

// PauseVersion indicates the default pause image version for kubeadm
PauseVersion = "3.2"
)
3 changes: 0 additions & 3 deletions cmd/kubeadm/app/constants/constants_windows.go
Expand Up @@ -21,7 +21,4 @@ package constants
const (
// DefaultDockerCRISocket defines the default Docker CRI socket
DefaultDockerCRISocket = "npipe:////./pipe/docker_engine"

// PauseVersion indicates the default pause image version for kubeadm
PauseVersion = "1.4.0"
)
13 changes: 2 additions & 11 deletions cmd/kubeadm/app/images/BUILD
Expand Up @@ -8,23 +8,14 @@ load(

go_library(
name = "go_default_library",
srcs = [
"images.go",
"images_unix.go",
"images_windows.go",
],
srcs = ["images.go"],
importpath = "k8s.io/kubernetes/cmd/kubeadm/app/images",
deps = [
"//cmd/kubeadm/app/apis/kubeadm:go_default_library",
"//cmd/kubeadm/app/constants:go_default_library",
"//cmd/kubeadm/app/util: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(
Expand Down
5 changes: 5 additions & 0 deletions cmd/kubeadm/app/images/images.go
Expand Up @@ -121,3 +121,8 @@ func GetControlPlaneImages(cfg *kubeadmapi.ClusterConfiguration) []string {

return imgs
}

// GetPauseImage returns the image for the "pause" container
func GetPauseImage(cfg *kubeadmapi.ClusterConfiguration) string {
return GetGenericImage(cfg.ImageRepository, "pause", constants.PauseVersion)
}
pacoxu marked this conversation as resolved.
Show resolved Hide resolved
29 changes: 0 additions & 29 deletions cmd/kubeadm/app/images/images_unix.go

This file was deleted.

34 changes: 0 additions & 34 deletions cmd/kubeadm/app/images/images_windows.go

This file was deleted.

4 changes: 2 additions & 2 deletions cmd/kubeadm/app/phases/kubelet/flags_test.go
Expand Up @@ -119,11 +119,11 @@ func TestBuildKubeletArgMap(t *testing.T) {
nodeRegOpts: &kubeadmapi.NodeRegistrationOptions{
CRISocket: "/var/run/dockershim.sock",
},
pauseImage: "gcr.io/pause:3.2",
pauseImage: "gcr.io/pause:3.4.1",
},
expected: map[string]string{
"network-plugin": "cni",
"pod-infra-container-image": "gcr.io/pause:3.2",
"pod-infra-container-image": "gcr.io/pause:3.4.1",
},
},
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/kubeadm/app/util/template_test.go
Expand Up @@ -21,9 +21,9 @@ import (
)

const (
validTmpl = "image: {{ .ImageRepository }}/pause:3.2"
validTmplOut = "image: k8s.gcr.io/pause:3.2"
doNothing = "image: k8s.gcr.io/pause:3.2"
validTmpl = "image: {{ .ImageRepository }}/pause:3.4.1"
validTmplOut = "image: k8s.gcr.io/pause:3.4.1"
doNothing = "image: k8s.gcr.io/pause:3.4.1"
invalidTmpl1 = "{{ .baz }/d}"
invalidTmpl2 = "{{ !foobar }}"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/kubelet/app/options/container_runtime.go
Expand Up @@ -28,7 +28,7 @@ import (
const (
// When these values are updated, also update test/utils/image/manifest.go
defaultPodSandboxImageName = "k8s.gcr.io/pause"
defaultPodSandboxImageVersion = "3.2"
defaultPodSandboxImageVersion = "3.4.1"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion hack/testdata/filter/pod-apply-selector.yaml
Expand Up @@ -8,4 +8,4 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if these are used even. 2.0 was quite some time ago.

i'd recommend leaving all hack/testdata changes out of the PR, but let's see comments from others first.

also these files should be ideally templated instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

I think this will make it easier in the future when we need more integration or e2e tests on windows.

2 changes: 1 addition & 1 deletion hack/testdata/filter/pod-dont-apply.yaml
Expand Up @@ -8,4 +8,4 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
2 changes: 1 addition & 1 deletion hack/testdata/multi-resource-1.yaml
Expand Up @@ -11,7 +11,7 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
---
apiVersion: v1
kind: Namespace
Expand Down
6 changes: 3 additions & 3 deletions hack/testdata/multi-resource-3.yaml
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
---
apiVersion: v1
kind: Pod
Expand All @@ -17,7 +17,7 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
---
apiVersion: v1
kind: Pod
Expand All @@ -26,5 +26,5 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1

2 changes: 1 addition & 1 deletion hack/testdata/multi-resource-json-modify.json
Expand Up @@ -43,7 +43,7 @@
"spec":{
"containers":[{
"name": "mock-container",
"image": "k8s.gcr.io/pause:2.0",
"image": "k8s.gcr.io/pause:3.4.1",
"ports":[{
"containerPort":9949,
"protocol":"TCP"
Expand Down
2 changes: 1 addition & 1 deletion hack/testdata/multi-resource-json.json
Expand Up @@ -41,7 +41,7 @@
"spec":{
"containers":[{
"name": "mock-container",
"image": "k8s.gcr.io/pause:2.0",
"image": "k8s.gcr.io/pause:3.4.1",
"ports":[{
"containerPort":9949,
"protocol":"TCP"
Expand Down
2 changes: 1 addition & 1 deletion hack/testdata/multi-resource-list-modify.json
Expand Up @@ -47,7 +47,7 @@
"spec":{
"containers":[{
"name": "mock-container",
"image": "k8s.gcr.io/pause:2.0",
"image": "k8s.gcr.io/pause:3.4.1",
"ports":[{
"containerPort":9949,
"protocol":"TCP"
Expand Down
2 changes: 1 addition & 1 deletion hack/testdata/multi-resource-list.json
Expand Up @@ -45,7 +45,7 @@
"spec":{
"containers":[{
"name": "mock-container",
"image": "k8s.gcr.io/pause:2.0",
"image": "k8s.gcr.io/pause:3.4.1",
"ports":[{
"containerPort":9949,
"protocol":"TCP"
Expand Down
4 changes: 2 additions & 2 deletions hack/testdata/multi-resource-rclist-modify.json
Expand Up @@ -26,7 +26,7 @@
"spec":{
"containers":[{
"name": "mock-container",
"image": "k8s.gcr.io/pause:2.0",
"image": "k8s.gcr.io/pause:3.4.1",
"ports":[{
"containerPort":9949,
"protocol":"TCP"
Expand Down Expand Up @@ -60,7 +60,7 @@
"spec":{
"containers":[{
"name": "mock-container",
"image": "k8s.gcr.io/pause:2.0",
"image": "k8s.gcr.io/pause:3.4.1",
"ports":[{
"containerPort":9949,
"protocol":"TCP"
Expand Down
4 changes: 2 additions & 2 deletions hack/testdata/multi-resource-rclist.json
Expand Up @@ -26,7 +26,7 @@
"spec":{
"containers":[{
"name": "mock-container",
"image": "k8s.gcr.io/pause:2.0",
"image": "k8s.gcr.io/pause:3.4.1",
"ports":[{
"containerPort":9949,
"protocol":"TCP"
Expand Down Expand Up @@ -60,7 +60,7 @@
"spec":{
"containers":[{
"name": "mock-container",
"image": "k8s.gcr.io/pause:2.0",
"image": "k8s.gcr.io/pause:3.4.1",
"ports":[{
"containerPort":9949,
"protocol":"TCP"
Expand Down
2 changes: 1 addition & 1 deletion hack/testdata/multi-resource-yaml-modify.yaml
Expand Up @@ -29,7 +29,7 @@ spec:
spec:
containers:
- name: mock-container
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
ports:
- containerPort: 9949
protocol: TCP
2 changes: 1 addition & 1 deletion hack/testdata/multi-resource-yaml.yaml
Expand Up @@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: mock-container
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
ports:
- containerPort: 9949
protocol: TCP
2 changes: 1 addition & 1 deletion hack/testdata/pod-apply.yaml
Expand Up @@ -7,4 +7,4 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
2 changes: 1 addition & 1 deletion hack/testdata/pod-changed.yaml
Expand Up @@ -7,4 +7,4 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:3.0
image: k8s.gcr.io/pause:3.4
2 changes: 1 addition & 1 deletion hack/testdata/pod-with-precision.json
Expand Up @@ -9,7 +9,7 @@
"containers": [
{
"name": "kubernetes-pause",
"image": "k8s.gcr.io/pause:3.2"
"image": "k8s.gcr.io/pause:3.4.1"
}
],
"restartPolicy": "Never",
Expand Down
2 changes: 1 addition & 1 deletion hack/testdata/pod.yaml
Expand Up @@ -7,4 +7,4 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
2 changes: 1 addition & 1 deletion hack/testdata/prune/a.yaml
Expand Up @@ -7,4 +7,4 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
2 changes: 1 addition & 1 deletion hack/testdata/prune/b.yaml
Expand Up @@ -8,4 +8,4 @@ metadata:
spec:
containers:
- name: kubernetes-pause
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1
2 changes: 1 addition & 1 deletion hack/testdata/sorted-pods/sorted-pod1.yaml
Expand Up @@ -8,4 +8,4 @@ metadata:
spec:
containers:
- name: kubernetes-pause2
image: k8s.gcr.io/pause:2.0
image: k8s.gcr.io/pause:3.4.1