Skip to content

Commit 6ab1d37

Browse files
mikkeloscarMustafaSaber
authored andcommitted
Update to Kubernetes v1.26
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
1 parent d9857c5 commit 6ab1d37

File tree

12 files changed

+1173
-304
lines changed

12 files changed

+1173
-304
lines changed

cluster/config-defaults.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,6 @@ horizontal_pod_autoscaler_sync_period: "30s"
464464
horizontal_pod_autoscaler_tolerance: "0.1"
465465
horizontal_pod_downscale_stabilization: "5m0s"
466466

467-
# enable/disable legacy autoscaling APIs
468-
# Note StackSet controller still depends on autoscaling/v2beta2 in clusters
469-
# using horizontalPodAutoscaler field.
470-
autoscaling_v2beta1_enabled: "false"
471-
autoscaling_v2beta2_enabled: "false"
472-
473467
# Vertical pod autoscaler version for controlling roll-out, can be "current" or "legacy"
474468
# current => v0.11.0-internal.17
475469
# legacy => v0.6.1-internal.16
@@ -572,7 +566,7 @@ teapot_admission_controller_namespace_delete_protection_enabled: "false"
572566
teapot_admission_controller_resolve_vanity_images: "true"
573567

574568
{{if eq .Cluster.Environment "e2e"}}
575-
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)-.*)$"
569+
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)-.*)$"
576570
teapot_admission_controller_crd_ensure_no_resources_on_delete: "false"
577571
{{else}}
578572
teapot_admission_controller_ignore_namespaces: "^kube-system$"
@@ -678,14 +672,14 @@ tracing_coredns_local_zone_traces_endpoint: ""
678672
# AMI id given the image name and the Image AWS account owner.
679673
#
680674
# [0]: https://github.com/zalando-incubator/cluster-lifecycle-manager/blob/8a9bd1cb2d094038a9e23e646421f8146b48886a/provisioner/template.go#L116
681-
kuberuntu_image_v1_24_focal_amd64: {{ amiID "zalando-ubuntu-focal-20.04-kubernetes-production-v1.24.17-amd64-master-283" "861068367966" }}
682-
kuberuntu_image_v1_24_focal_arm64: {{ amiID "zalando-ubuntu-focal-20.04-kubernetes-production-v1.24.17-arm64-master-283" "861068367966" }}
683-
kuberuntu_image_v1_24_jammy_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.24.17-amd64-master-297" "861068367966" }}
684-
kuberuntu_image_v1_24_jammy_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.24.17-arm64-master-297" "861068367966" }}
685675
kuberuntu_image_v1_25_focal_amd64: {{ amiID "zalando-ubuntu-focal-20.04-kubernetes-production-v1.25.16-amd64-master-305" "861068367966" }}
686676
kuberuntu_image_v1_25_focal_arm64: {{ amiID "zalando-ubuntu-focal-20.04-kubernetes-production-v1.25.16-arm64-master-305" "861068367966" }}
687677
kuberuntu_image_v1_25_jammy_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.25.16-amd64-master-305" "861068367966" }}
688678
kuberuntu_image_v1_25_jammy_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.25.16-arm64-master-305" "861068367966" }}
679+
kuberuntu_image_v1_26_focal_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.26.13-amd64-master-307" "861068367966" }}
680+
kuberuntu_image_v1_26_focal_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.26.13-arm64-master-307" "861068367966" }}
681+
kuberuntu_image_v1_26_jammy_amd64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.26.13-amd64-master-307" "861068367966" }}
682+
kuberuntu_image_v1_26_jammy_arm64: {{ amiID "zalando-ubuntu-jammy-22.04-kubernetes-production-v1.26.13-arm64-master-307" "861068367966" }}
689683

690684
# Which distro from the previous config items should be used. Valid options are `focal` and `jammy`. Can be set for each node pool.
691685
{{if eq .Cluster.Environment "test"}}

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
eu-central-1:
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_25_" .NodePool.ConfigItems.kuberuntu_distro_master "_" .Values.InstanceInfo.Architecture) }}'
13+
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_26_" .NodePool.ConfigItems.kuberuntu_distro_master "_" .Values.InstanceInfo.Architecture) }}'
1414

1515
Resources:
1616
AutoScalingGroup:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ write_files:
124124
{{- end }}
125125
- --tls-cert-file=/etc/kubernetes/ssl/apiserver.pem
126126
- --tls-private-key-file=/etc/kubernetes/ssl/apiserver-key.pem
127-
- --runtime-config=authorization.k8s.io/v1beta1=true,scheduling.k8s.io/v1alpha1=true,admissionregistration.k8s.io/v1beta1=true,autoscaling/v2beta2={{ .Cluster.ConfigItems.autoscaling_v2beta2_enabled }},autoscaling/v2beta1={{ .Cluster.ConfigItems.autoscaling_v2beta1_enabled }}
127+
- --runtime-config=authorization.k8s.io/v1beta1=true,scheduling.k8s.io/v1alpha1=true,admissionregistration.k8s.io/v1beta1=true
128128
- --authentication-token-webhook-config-file=/etc/kubernetes/config/authn.yaml
129129
- --authentication-token-webhook-cache-ttl=10s
130130
- --cloud-provider=aws
@@ -667,7 +667,7 @@ write_files:
667667
args:
668668
- --kubeconfig=/etc/kubernetes/scheduler-kubeconfig
669669
- --leader-elect=true
670-
- --feature-gates=NonPreemptingPriority=true,MinDomainsInPodTopologySpread={{ .Cluster.ConfigItems.min_domains_in_pod_topology_spread_enabled }}
670+
- --feature-gates=MinDomainsInPodTopologySpread={{ .Cluster.ConfigItems.min_domains_in_pod_topology_spread_enabled }}
671671
- --profiling={{ .Cluster.ConfigItems.enable_control_plane_profiling }}
672672
resources:
673673
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
eu-central-1:
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_25_" .NodePool.ConfigItems.kuberuntu_distro_worker "_" .Values.InstanceInfo.Architecture) }}'
13+
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_26_" .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_25_" .NodePool.ConfigItems.kuberuntu_distro_worker "_amd64") }}
12-
- id: {{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_25_" .NodePool.ConfigItems.kuberuntu_distro_worker "_arm64") }}
11+
- id: {{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_26_" .NodePool.ConfigItems.kuberuntu_distro_worker "_amd64") }}
12+
- id: {{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_26_" .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
eu-central-1:
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_25_" .NodePool.ConfigItems.kuberuntu_distro_worker "_" .Values.InstanceInfo.Architecture) }}'
13+
MachineImage: '{{ index .NodePool.ConfigItems (print "kuberuntu_image_v1_26_" .NodePool.ConfigItems.kuberuntu_distro_worker "_" .Values.InstanceInfo.Architecture) }}'
1414

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

test/e2e/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# builder image
22
FROM golang:1.21 as builder
33

4-
RUN CGO_ENABLED=0 go install github.com/onsi/ginkgo/v2/ginkgo@v2.1.6
4+
RUN CGO_ENABLED=0 go install github.com/onsi/ginkgo/v2/ginkgo@v2.4.0
55

66
# final image
77
# TODO get rid of python dependencies

test/e2e/Makefile

Lines changed: 6 additions & 9 deletions
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.25.15
5+
KUBE_VERSION ?= v1.26.13
66
IMAGE ?= pierone.stups.zalan.do/teapot/$(BINARY)
77
TAG ?= $(VERSION)
88
DOCKERFILE ?= Dockerfile
@@ -23,27 +23,24 @@ $(GO_BINDATA):
2323
fix-go-modules: $(MOD_PATH)
2424
MOD_PATH=$(MOD_PATH) KUBE_VERSION=$(KUBE_VERSION) ./setup_modules.sh
2525

26-
generate-code: fix-go-modules $(GO_BINDATA)
27-
make generated_files -C "$(MOD_PATH)/kubernetes"
26+
deps:
27+
CGO_ENABLED=0 go install github.com/onsi/ginkgo/v2/[email protected]
2828

29-
deps: generate-code
30-
go install github.com/onsi/ginkgo/v2/[email protected]
31-
32-
e2e.test: generate-code
29+
e2e.test: fix-go-modules $(GO_BINDATA)
3330
go test -v -c -o e2e.test
3431

3532
stackset-e2e:
3633
CGO_ENABLED=0 go test -modfile stackset/go.mod -c -o stackset-e2e github.com/zalando-incubator/stackset-controller/cmd/e2e
3734

3835
build: e2e.test stackset-e2e
3936

40-
build/linux/amd64/e2e.test: generate-code
37+
build/linux/amd64/e2e.test:
4138
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go test -v -c -o $@
4239

4340
build/linux/amd64/stackset-e2e:
4441
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go test -modfile stackset/go.mod -c -o $@ github.com/zalando-incubator/stackset-controller/cmd/e2e
4542

46-
build/linux/arm64/e2e.test: generate-code
43+
build/linux/arm64/e2e.test:
4744
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go test -v -c -o $@
4845

4946
build/linux/arm64/stackset-e2e:

test/e2e/audit.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
auditinternal "k8s.io/apiserver/pkg/apis/audit"
1616
auditv1 "k8s.io/apiserver/pkg/apis/audit/v1"
1717
"k8s.io/kubernetes/test/e2e/framework"
18-
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
18+
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
1919
admissionapi "k8s.io/pod-security-admission/api"
2020

2121
jsonpatch "github.com/evanphx/json-patch"
@@ -57,14 +57,14 @@ var _ = describe("Audit", func() {
5757
}
5858
updatePod := func(pod *apiv1.Pod) {}
5959

60-
f.PodClient().CreateSync(pod)
60+
e2epod.NewPodClient(f).CreateSync(pod)
6161

62-
f.PodClient().Update(pod.Name, updatePod)
62+
e2epod.NewPodClient(f).Update(pod.Name, updatePod)
6363

64-
_, err := f.PodClient().Patch(context.TODO(), pod.Name, types.JSONPatchType, patch, metav1.PatchOptions{})
64+
_, err := e2epod.NewPodClient(f).Patch(context.TODO(), pod.Name, types.JSONPatchType, patch, metav1.PatchOptions{})
6565
framework.ExpectNoError(err, "failed to patch pod")
6666

67-
f.PodClient().DeleteSync(pod.Name, metav1.DeleteOptions{}, framework.DefaultPodDeletionTimeout)
67+
e2epod.NewPodClient(f).DeleteSync(pod.Name, metav1.DeleteOptions{}, e2epod.DefaultPodDeletionTimeout)
6868

6969
expectEvents(f, []utils.AuditEvent{
7070
{
@@ -130,9 +130,9 @@ func expectEvents(f *framework.Framework, expectedEvents []utils.AuditEvent) {
130130
defer stream.Close()
131131
missingReport, err := utils.CheckAuditLines(stream, expectedEvents, auditv1.SchemeGroupVersion)
132132
if err != nil {
133-
e2elog.Logf("Failed to observe audit events: %v", err)
133+
framework.Logf("Failed to observe audit events: %v", err)
134134
} else if len(missingReport.MissingEvents) > 0 {
135-
e2elog.Logf("Events %#v not found!", missingReport)
135+
framework.Logf("Events %#v not found!", missingReport)
136136
}
137137
return len(missingReport.MissingEvents) == 0, nil
138138
})

0 commit comments

Comments
 (0)