Skip to content

Commit 8907049

Browse files
authored
Merge pull request #7965 from zalando-incubator/kube-1.31
Update to Kubernetes 1.31
2 parents 10293ba + 527f84c commit 8907049

File tree

14 files changed

+1168
-345
lines changed

14 files changed

+1168
-345
lines changed

cluster/config-defaults.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ teapot_admission_controller_namespace_delete_protection_enabled: "false"
609609
teapot_admission_controller_resolve_vanity_images: "true"
610610

611611
{{if eq .Cluster.Environment "e2e"}}
612-
teapot_admission_controller_ignore_namespaces: "^kube-system|((downward-api|kubectl|projected|statefulset|pod-network|scope-selectors|resourcequota|limitrange|sysctl|node-tests|e2e-kubelet-etc-hosts|csiinlinevolumes|dns)-.*)$"
612+
teapot_admission_controller_ignore_namespaces: "^kube-system|((downward-api|kubectl|projected|statefulset|pod-network|scope-selectors|resourcequota|limitrange|sysctl|node-tests|e2e-kubelet-etc-hosts|csiinlinevolumes|job|dns)-.*)$"
613613
teapot_admission_controller_crd_ensure_no_resources_on_delete: "false"
614614
{{else}}
615615
teapot_admission_controller_ignore_namespaces: "^kube-system$"
@@ -727,6 +727,9 @@ tracing_coredns_local_zone_traces_endpoint: ""
727727
kuberuntu_image_v1_30_jammy_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.30.2-amd64-master-341" "861068367966" }}
728728
kuberuntu_image_v1_30_jammy_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.30.2-arm64-master-341" "861068367966" }}
729729

730+
kuberuntu_image_v1_31_jammy_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.0-amd64-master-347" "861068367966" }}
731+
kuberuntu_image_v1_31_jammy_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.31.0-arm64-master-347" "861068367966" }}
732+
730733
# Which distro from the previous config items should be used. Valid options are only `jammy` for now. Can be set for each node pool.
731734
kuberuntu_distro_master: "jammy"
732735
kuberuntu_distro_worker: "jammy"
@@ -904,8 +907,6 @@ enable_topology_aware_hints: "false"
904907

905908
# Enable FeatureGate HPAScaleToZero
906909
enable_hpa_scale_to_zero: "true"
907-
# Enable FeatureGate HPAContainerMetrics
908-
enable_hpa_container_metrics: "true"
909910

910911
# Enable FeatureGate MaxUnavailableStatefulSet
911912
max_unavailable_statefulset_enabled: "false"
@@ -1129,6 +1130,3 @@ control_plane_graceful_shutdown: "true"
11291130
# fs.aio-max-nr = 8388608
11301131
# fs.inotify.max_user_watches = 100000
11311132
sysctl_settings: ""
1132-
1133-
# enables/disables the minDomains field for pod topology spread.
1134-
min_domains_in_pod_topology_spread_enabled: "true"

cluster/manifests/aws-cloud-controller-manager/daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
- --cloud-provider=aws
2828
- --use-service-account-credentials=true
2929
- --configure-cloud-routes=false
30-
image: container-registry.zalando.net/teapot/aws-cloud-controller-manager-internal:v1.30.2-master-126
30+
image: container-registry.zalando.net/teapot/aws-cloud-controller-manager-internal:v1.31.0-master-127
3131
name: aws-cloud-controller-manager
3232
resources:
3333
requests:

cluster/node-pools/master-default/stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Mappings:
1010
Images:
1111
{{.Cluster.Region}}:
1212
# Use the node pool's architecture to construct the config item name that we're using to get the AMI name.
13-
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_30_" .NodePool.ConfigItems.kuberuntu_distro_master "_" .Values.InstanceInfo.Architecture) }}'
13+
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_31_" .NodePool.ConfigItems.kuberuntu_distro_master "_" .Values.InstanceInfo.Architecture) }}'
1414

1515
Resources:
1616
AutoScalingGroup:

cluster/node-pools/master-default/userdata.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ write_files:
132132
- --runtime-config=authorization.k8s.io/v1beta1=true,scheduling.k8s.io/v1alpha1=true,admissionregistration.k8s.io/v1beta1=true
133133
- --authentication-token-webhook-config-file=/etc/kubernetes/config/authn.yaml
134134
- --authentication-token-webhook-cache-ttl=10s
135-
- --cloud-provider=external
136135
- --authorization-mode=Node,Webhook,RBAC
137136
- --authorization-webhook-config-file=/etc/kubernetes/config/authz.yaml
138137
- --authorization-webhook-version=v1
@@ -143,7 +142,7 @@ write_files:
143142
- "--oidc-username-prefix=okta:"
144143
- --oidc-groups-claim=groups
145144
- "--oidc-groups-prefix=okta:"
146-
- --feature-gates=HPAScaleToZero={{ .Cluster.ConfigItems.enable_hpa_scale_to_zero }},HPAContainerMetrics={{ .Cluster.ConfigItems.enable_hpa_container_metrics }},StatefulSetAutoDeletePVC={{ .Cluster.ConfigItems.enable_statefulset_autodelete_pvc }},TopologyAwareHints={{ .Cluster.ConfigItems.enable_topology_aware_hints }},MinDomainsInPodTopologySpread={{ .Cluster.ConfigItems.min_domains_in_pod_topology_spread_enabled }},MaxUnavailableStatefulSet={{.Cluster.ConfigItems.max_unavailable_statefulset_enabled}},KMSv1=true
145+
- --feature-gates=HPAScaleToZero={{ .Cluster.ConfigItems.enable_hpa_scale_to_zero }},StatefulSetAutoDeletePVC={{ .Cluster.ConfigItems.enable_statefulset_autodelete_pvc }},TopologyAwareHints={{ .Cluster.ConfigItems.enable_topology_aware_hints }},MaxUnavailableStatefulSet={{.Cluster.ConfigItems.max_unavailable_statefulset_enabled}},KMSv1=true
147146
- --service-account-key-file=/etc/kubernetes/ssl/service-account-public-key.pem
148147
- --service-account-signing-key-file=/etc/kubernetes/ssl/service-account-private-key.pem
149148
- --service-account-issuer={{ .Cluster.APIServerURL }}
@@ -154,6 +153,8 @@ write_files:
154153
- --audit-log-path=/var/log/kube-audit.log
155154
- --audit-log-maxage=0
156155
- --audit-log-maxbackup=0
156+
# we need this since the /logs/kube-audit.log endpoint is off by default since v1.31
157+
- --enable-logs-handler
157158
{{ else }}
158159
- --audit-webhook-config-file=/etc/kubernetes/config/audit.yaml
159160
- --audit-webhook-mode=batch
@@ -670,7 +671,6 @@ write_files:
670671
args:
671672
- --config=/etc/kubernetes/config/scheduler-config.yaml
672673
- --leader-elect=true
673-
- --feature-gates=MinDomainsInPodTopologySpread={{ .Cluster.ConfigItems.min_domains_in_pod_topology_spread_enabled }}
674674
- --profiling={{ .Cluster.ConfigItems.enable_control_plane_profiling }}
675675
resources:
676676
requests:

cluster/node-pools/worker-combined/stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Mappings:
1010
Images:
1111
{{.Cluster.Region}}:
1212
# Use the node pool's architecture to construct the config item name that we're using to get the AMI name.
13-
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_30_" .NodePool.ConfigItems.kuberuntu_distro_worker "_" .Values.InstanceInfo.Architecture) }}'
13+
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_31_" .NodePool.ConfigItems.kuberuntu_distro_worker "_" .Values.InstanceInfo.Architecture) }}'
1414

1515
Resources:
1616
AutoScalingGroup:

cluster/node-pools/worker-karpenter/provisioners.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ spec:
88
amiFamily: Custom
99
amiSelectorTerms:
1010
# Select on any AMI that has any of the following IDs
11-
- id: {{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_30_" .NodePool.ConfigItems.kuberuntu_distro_worker "_amd64") }}
12-
- id: {{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_30_" .NodePool.ConfigItems.kuberuntu_distro_worker "_arm64") }}
11+
- id: {{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_31_" .NodePool.ConfigItems.kuberuntu_distro_worker "_amd64") }}
12+
- id: {{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_31_" .NodePool.ConfigItems.kuberuntu_distro_worker "_arm64") }}
1313
metadataOptions:
1414
httpEndpoint: enabled
1515
httpProtocolIPv6: disabled

cluster/node-pools/worker-splitaz/stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Mappings:
1010
Images:
1111
{{.Cluster.Region}}:
1212
# Use the node pool's architecture to construct the config item name that we're using to get the AMI name.
13-
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_30_" .NodePool.ConfigItems.kuberuntu_distro_worker "_" .Values.InstanceInfo.Architecture) }}'
13+
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_31_" .NodePool.ConfigItems.kuberuntu_distro_worker "_" .Values.InstanceInfo.Architecture) }}'
1414

1515
Resources:
1616
{{ with $data := . }}

test/e2e/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
BINARY ?= kubernetes-on-aws-e2e
44
VERSION ?= $(shell git describe --tags --always --dirty)
5-
KUBE_VERSION ?= v1.30.2
5+
KUBE_VERSION ?= v1.31.0
66
IMAGE ?= pierone.stups.zalan.do/teapot/$(BINARY)
77
SOURCES = $(shell find . -name '*.go')
88
TAG ?= $(VERSION)

test/e2e/apiserver.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
. "github.com/onsi/gomega"
2727

2828
appsv1 "k8s.io/api/apps/v1"
29+
batchv1 "k8s.io/api/batch/v1"
2930
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3031
"k8s.io/apimachinery/pkg/util/uuid"
3132
"k8s.io/client-go/kubernetes"
@@ -34,6 +35,7 @@ import (
3435
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
3536
"k8s.io/kubernetes/test/e2e/framework/statefulset"
3637
admissionapi "k8s.io/pod-security-admission/api"
38+
"k8s.io/utils/ptr"
3739
)
3840

3941
const (
@@ -472,7 +474,7 @@ var _ = describe("Image Policy Tests (Job)", func() {
472474
framework.ExpectNoError(err)
473475
}()
474476

475-
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, 1)
477+
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, ptr.To(batchv1.JobReasonCompletionsReached), 1)
476478
})
477479

478480
It("Should not create Job using non-compliant image [Image-Policy] [Non-Compliant] [Zalando]", func() {
@@ -493,7 +495,7 @@ var _ = describe("Image Policy Tests (Job)", func() {
493495
framework.ExpectNoError(err)
494496
}()
495497

496-
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, 1)
498+
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, ptr.To(batchv1.JobReasonCompletionsReached), 1)
497499
})
498500
})
499501

@@ -524,7 +526,7 @@ var _ = describe("Image Policy Tests (Job) (when disabled)", func() {
524526
framework.ExpectNoError(err)
525527
}()
526528

527-
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, 1)
529+
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, ptr.To(batchv1.JobReasonCompletionsReached), 1)
528530
})
529531
})
530532

@@ -558,7 +560,7 @@ var _ = describe("ECR Registry Pull", func() {
558560
framework.ExpectNoError(err)
559561
}()
560562

561-
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, 1)
563+
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, ptr.To(batchv1.JobReasonCompletionsReached), 1)
562564
})
563565

564566
It("Should run a Job using a vanity image from the staging registry [ECR] [Zalando]", func() {
@@ -582,6 +584,6 @@ var _ = describe("ECR Registry Pull", func() {
582584
framework.ExpectNoError(err)
583585
}()
584586

585-
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, 1)
587+
job.WaitForJobComplete(context.TODO(), cs, namespace, jobObj.Name, ptr.To(batchv1.JobReasonCompletionsReached), 1)
586588
})
587589
})

test/e2e/audit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var _ = describe("Audit", func() {
5151
Spec: apiv1.PodSpec{
5252
Containers: []apiv1.Container{{
5353
Name: "pause",
54-
Image: "container-registry.zalando.net/teapot/pause:3.4.1-master-18",
54+
Image: "container-registry.zalando.net/teapot/pause:3.7-master-21",
5555
}},
5656
},
5757
}

0 commit comments

Comments
 (0)