Skip to content

Commit 6f04c9a

Browse files
authored
Merge pull request #18202 from hakman/remove-too-old
chore: Remove support for Kubernetes 1.30 in kOps 1.36
2 parents d00e45b + e236d4a commit 6f04c9a

File tree

284 files changed

+1004
-8475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+1004
-8475
lines changed

cmd/kops/create_cluster_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ var MagicTimestamp = metav1.Time{Time: time.Date(2017, 1, 1, 0, 0, 0, 0, time.UT
4646

4747
// TestCreateClusterMinimal runs kops create cluster minimal.example.com --zones us-test-1a
4848
func TestCreateClusterMinimal(t *testing.T) {
49-
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.29", "v1alpha2")
50-
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.30", "v1alpha2")
5149
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.31", "v1alpha2")
5250
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.32", "v1alpha2")
51+
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.35", "v1alpha2")
52+
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-1.36", "v1alpha2")
5353
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-arm64", "v1alpha2")
5454
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-irsa", "v1alpha2")
5555
}

cmd/kops/integration_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ func TestMinimalAWS(t *testing.T) {
258258
}
259259

260260
// TestMinimal runs the test on a minimum configuration
261-
func TestMinimal_v1_29(t *testing.T) {
262-
newIntegrationTest("minimal.example.com", "minimal-1.29").
261+
func TestMinimal_v1_31(t *testing.T) {
262+
newIntegrationTest("minimal.example.com", "minimal-1.31").
263263
withAddons(
264264
awsEBSCSIAddon,
265265
dnsControllerAddon,
@@ -269,8 +269,8 @@ func TestMinimal_v1_29(t *testing.T) {
269269
}
270270

271271
// TestMinimal runs the test on a minimum configuration
272-
func TestMinimal_v1_30(t *testing.T) {
273-
newIntegrationTest("minimal.example.com", "minimal-1.30").
272+
func TestMinimal_v1_32(t *testing.T) {
273+
newIntegrationTest("minimal.example.com", "minimal-1.32").
274274
withAddons(
275275
awsEBSCSIAddon,
276276
dnsControllerAddon,
@@ -280,8 +280,8 @@ func TestMinimal_v1_30(t *testing.T) {
280280
}
281281

282282
// TestMinimal runs the test on a minimum configuration
283-
func TestMinimal_v1_31(t *testing.T) {
284-
newIntegrationTest("minimal.example.com", "minimal-1.31").
283+
func TestMinimal_v1_33(t *testing.T) {
284+
newIntegrationTest("minimal.example.com", "minimal-1.33").
285285
withAddons(
286286
awsEBSCSIAddon,
287287
dnsControllerAddon,
@@ -291,8 +291,8 @@ func TestMinimal_v1_31(t *testing.T) {
291291
}
292292

293293
// TestMinimal runs the test on a minimum configuration
294-
func TestMinimal_v1_32(t *testing.T) {
295-
newIntegrationTest("minimal.example.com", "minimal-1.32").
294+
func TestMinimal_v1_34(t *testing.T) {
295+
newIntegrationTest("minimal.example.com", "minimal-1.34").
296296
withAddons(
297297
awsEBSCSIAddon,
298298
dnsControllerAddon,
@@ -302,8 +302,8 @@ func TestMinimal_v1_32(t *testing.T) {
302302
}
303303

304304
// TestMinimal runs the test on a minimum configuration
305-
func TestMinimal_v1_33(t *testing.T) {
306-
newIntegrationTest("minimal.example.com", "minimal-1.33").
305+
func TestMinimal_v1_35(t *testing.T) {
306+
newIntegrationTest("minimal.example.com", "minimal-1.35").
307307
withAddons(
308308
awsEBSCSIAddon,
309309
dnsControllerAddon,
@@ -313,8 +313,8 @@ func TestMinimal_v1_33(t *testing.T) {
313313
}
314314

315315
// TestMinimal runs the test on a minimum configuration
316-
func TestMinimal_v1_34(t *testing.T) {
317-
newIntegrationTest("minimal.example.com", "minimal-1.34").
316+
func TestMinimal_v1_36(t *testing.T) {
317+
newIntegrationTest("minimal.example.com", "minimal-1.36").
318318
withAddons(
319319
awsEBSCSIAddon,
320320
dnsControllerAddon,

hack/update-expected.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ cd "${KOPS_ROOT}"
2525
# Accept an optional argument overriding the package to update
2626
PKG="${1:-./...}"
2727

28+
# Accept an optional second argument to filter tests by name (-run)
29+
RUN_FILTER=()
30+
if [[ -n "${2:-}" ]]; then
31+
RUN_FILTER=(-run "$2")
32+
fi
33+
2834
# Don't override variables that are commonly used in dev, but shouldn't be in our tests
2935
unset KOPS_BASE_URL DNSCONTROLLER_IMAGE KOPSCONTROLLER_IMAGE KUBE_APISERVER_HEALTHCHECK_IMAGE KOPS_FEATURE_FLAGS KOPS_ARCH
3036
unset AWS_ACCESS_KEY_ID AWS_REGION AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN CNI_VERSION_URL DNS_IGNORE_NS_CHECK DO_ACCESS_TOKEN GOOGLE_APPLICATION_CREDENTIALS HCLOUD_TOKEN
@@ -35,4 +41,4 @@ unset AZURE_CLIENT_ID AZURE_CLIENT_SECRET AZURE_STORAGE_ACCOUNT AZURE_SUBSCRIPTI
3541
unset DIGITALOCEAN_ACCESS_TOKEN
3642

3743
# Run the tests in "autofix mode"
38-
HACK_UPDATE_EXPECTED_IN_PLACE=1 go test "${PKG}" -count=1
44+
HACK_UPDATE_EXPECTED_IN_PLACE=1 go test "${PKG}" "${RUN_FILTER[@]}" -count=1

nodeup/pkg/model/kube_apiserver.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -714,22 +714,6 @@ func (b *KubeAPIServerBuilder) buildPod(ctx context.Context, kubeAPIServer *kops
714714
}
715715
}
716716

717-
if b.IsKubernetesLT("1.31") {
718-
// Compatibility: Use the old healthz probe for older clusters
719-
for _, probe := range allProbes {
720-
probe.HTTPGet.Path = "/healthz"
721-
}
722-
723-
// Compatibility: Don't use startup probe / readiness probe
724-
startupProbe = nil
725-
readinessProbe = nil
726-
727-
// Compatibility: use old livenessProbe values
728-
livenessProbe.FailureThreshold = 0
729-
livenessProbe.PeriodSeconds = 0
730-
livenessProbe.InitialDelaySeconds = 45
731-
}
732-
733717
resourceRequests := v1.ResourceList{}
734718
resourceLimits := v1.ResourceList{}
735719

nodeup/pkg/model/kube_proxy.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,8 @@ func (b *KubeProxyBuilder) buildPod() (*v1.Pod, error) {
112112
// In particular when we forced nftables on rhel10, we should also pass the --proxy-mode=nftables flag.
113113
if b.Distribution.ForceNftables() {
114114
if c.ProxyMode == "" || c.ProxyMode == "iptables" {
115-
if b.IsKubernetesLT("1.29") {
116-
klog.Warningf("Distribution %v requires nftables proxy mode, but Kubernetes %s does not support it (requires 1.29+)", b.Distribution, b.NodeupConfig.KubernetesVersion)
117-
} else {
118-
klog.Infof("Distribution %v requires nftables; overriding kube-proxy mode from %q to nftables", b.Distribution, c.ProxyMode)
119-
c.ProxyMode = "nftables"
120-
}
115+
klog.Infof("Distribution %v requires nftables; overriding kube-proxy mode from %q to nftables", b.Distribution, c.ProxyMode)
116+
c.ProxyMode = "nftables"
121117
}
122118
}
123119

nodeup/pkg/model/kube_proxy_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ func TestKubeProxyBuilder_buildPod(t *testing.T) {
6666
wantErr bool
6767
}{
6868
{
69-
"Setup KubeProxy for kubernetes version 1.20",
69+
"Setup KubeProxy for kubernetes version 1.35",
7070
fields{
7171
&NodeupModelContext{
7272
NodeupConfig: nodeupConfig,
73-
kubernetesVersion: kopsmodel.MustParseKubernetesVersion("1.20"),
73+
kubernetesVersion: kopsmodel.MustParseKubernetesVersion("1.35"),
7474
},
7575
},
7676
&v1.Pod{

nodeup/pkg/model/kube_scheduler.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ func (b *KubeSchedulerBuilder) Build(c *fi.NodeupModelBuilderContext) error {
111111
// We didn't get a kubescheduler configuration; warn as we're aiming to move this to generation in the kops CLI
112112
klog.Warningf("using embedded kubescheduler configuration")
113113
config := NewSchedulerConfig("kubescheduler.config.k8s.io/v1")
114-
if b.IsKubernetesLT("1.25") {
115-
config = NewSchedulerConfig("kubescheduler.config.k8s.io/v1beta2")
116-
}
117114

118115
kubeSchedulerConfig, err := configbuilder.BuildConfigYaml(&kubeScheduler, config)
119116
if err != nil {

nodeup/pkg/model/kubelet_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestTaintsApplied(t *testing.T) {
4848
expectTaints []string
4949
}{
5050
{
51-
version: "1.29.0",
51+
version: "1.31.0",
5252
taints: []string{"foo", "bar", "baz"},
5353
expectTaints: []string{"foo", "bar", "baz", "node-role.kubernetes.io/control-plane=:NoSchedule"},
5454
},

nodeup/pkg/model/tests/dockerbuilder/docker_19.03.11/cluster.yaml

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)