Skip to content

Commit 61576cd

Browse files
committed
chore: Remove support for Kubernetes 1.30
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
1 parent d00e45b commit 61576cd

File tree

276 files changed

+432
-18577
lines changed

Some content is hidden

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

276 files changed

+432
-18577
lines changed

cmd/kops/create_cluster_integration_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ 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")
5351
runCreateClusterIntegrationTest(t, "../../tests/integration/create_cluster/minimal-arm64", "v1alpha2")

cmd/kops/integration_test.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -257,28 +257,6 @@ func TestMinimalAWS(t *testing.T) {
257257
runTestTerraformAWS(t)
258258
}
259259

260-
// TestMinimal runs the test on a minimum configuration
261-
func TestMinimal_v1_29(t *testing.T) {
262-
newIntegrationTest("minimal.example.com", "minimal-1.29").
263-
withAddons(
264-
awsEBSCSIAddon,
265-
dnsControllerAddon,
266-
awsCCMAddon,
267-
).
268-
runTestTerraformAWS(t)
269-
}
270-
271-
// TestMinimal runs the test on a minimum configuration
272-
func TestMinimal_v1_30(t *testing.T) {
273-
newIntegrationTest("minimal.example.com", "minimal-1.30").
274-
withAddons(
275-
awsEBSCSIAddon,
276-
dnsControllerAddon,
277-
awsCCMAddon,
278-
).
279-
runTestTerraformAWS(t)
280-
}
281-
282260
// TestMinimal runs the test on a minimum configuration
283261
func TestMinimal_v1_31(t *testing.T) {
284262
newIntegrationTest("minimal.example.com", "minimal-1.31").

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)