From a14c153b3497e252c5ffd789135fcb81ee8aa8e1 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Tue, 22 Oct 2024 09:09:53 -0700 Subject: [PATCH 01/25] pin k0s version to 1.29 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9a62bfeb22..972112bc0b 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,10 @@ ADMIN_CONSOLE_CHART_REPO_OVERRIDE = ADMIN_CONSOLE_IMAGE_OVERRIDE = ADMIN_CONSOLE_MIGRATIONS_IMAGE_OVERRIDE = ADMIN_CONSOLE_KURL_PROXY_IMAGE_OVERRIDE = -K0S_VERSION = v1.30.5+k0s.0-ec.1 -K0S_GO_VERSION = v1.30.5+k0s.0 -PREVIOUS_K0S_VERSION ?= v1.29.9+k0s.0-ec.0 -PREVIOUS_K0S_GO_VERSION ?= v1.29.9+k0s.0 +K0S_VERSION = v1.29.9+k0s.0-ec.0 +K0S_GO_VERSION = v1.29.9+k0s.0 +PREVIOUS_K0S_VERSION ?= v1.28.14+k0s.0-ec.0 +PREVIOUS_K0S_GO_VERSION ?= v1.28.14+k0s.0 K0S_BINARY_SOURCE_OVERRIDE = TROUBLESHOOT_VERSION = v0.105.2 KOTS_VERSION = v$(shell awk '/^version/{print $$2}' pkg/addons/adminconsole/static/metadata.yaml | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1/') From 430c1c8053208d84957a3c8f1551a023dac990d3 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Tue, 22 Oct 2024 13:58:48 -0500 Subject: [PATCH 02/25] chore(ci): re-promote 1.8.0 release each time (#1364) * chore(ci): re-promote 1.8.0 release each time * chore(ci): re-promote 1.8.0 release each time --- .github/workflows/ci.yaml | 5 +++++ e2e/install_test.go | 20 +++++++++++-------- .../check-airgap-installation-state.sh | 4 ++-- e2e/scripts/check-airgap-post-ha-state.sh | 4 ++-- e2e/scripts/check-installation-state.sh | 4 ++-- e2e/scripts/check-post-ha-state.sh | 4 ++-- 6 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f13b2a15c..97fea70c05 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -395,6 +395,11 @@ jobs: export APP_VERSION="appver-${SHORT_SHA}-pre-minio-removal" replicated release promote 807 2cHXb1RCttzpR0xvnNWyaZCgDBP --version "${APP_VERSION}" + # re-promote a release containing an old version of embedded-cluster to test upgrades + export APP_VERSION="appver-${SHORT_SHA}-1.8.0-k8s-1.28" + replicated release promote 11615 2cHXb1RCttzpR0xvnNWyaZCgDBP --version "${APP_VERSION}" + replicated release promote 11615 2eAqMYG1IEtX8cwpaO1kgNV6EB3 --version "${APP_VERSION}" + # install the previous k0s version to ensure an upgrade occurs export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s" export APP_VERSION="appver-${SHORT_SHA}-previous-k0s" diff --git a/e2e/install_test.go b/e2e/install_test.go index 29b1faffa4..fc3b0618a1 100644 --- a/e2e/install_test.go +++ b/e2e/install_test.go @@ -551,19 +551,21 @@ func TestUpgradeEC18FromReplicatedApp(t *testing.T) { }) defer tc.Cleanup(withEnv) - t.Logf("%s: downloading embedded-cluster 1.8.0+k8s-1.28 on node 0", time.Now().Format(time.RFC3339)) - line := []string{"vandoor-prepare.sh", "1.8.0+k8s-1.28", os.Getenv("LICENSE_ID"), "false"} + appVer := fmt.Sprintf("appver-%s-1.8.0-k8s-1.28", os.Getenv("SHORT_SHA")) + + t.Logf("%s: downloading embedded-cluster %s on node 0", appVer, time.Now().Format(time.RFC3339)) + line := []string{"vandoor-prepare.sh", appVer, os.Getenv("LICENSE_ID"), "false"} if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil { t.Fatalf("fail to download embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr) } - t.Logf("%s: downloading embedded-cluster 1.8.0+k8s-1.28 on worker node", time.Now().Format(time.RFC3339)) - line = []string{"vandoor-prepare.sh", "1.8.0+k8s-1.28", os.Getenv("LICENSE_ID"), "false"} + t.Logf("%s: downloading embedded-cluster %s on worker node", appVer, time.Now().Format(time.RFC3339)) + line = []string{"vandoor-prepare.sh", appVer, os.Getenv("LICENSE_ID"), "false"} if stdout, stderr, err := tc.RunCommandOnNode(1, line); err != nil { t.Fatalf("fail to download embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr) } - t.Logf("%s: installing embedded-cluster 1.8.0+k8s-1.28 on node 0", time.Now().Format(time.RFC3339)) + t.Logf("%s: installing embedded-cluster %s on node 0", appVer, time.Now().Format(time.RFC3339)) line = []string{"single-node-install.sh", "ui"} if stdout, stderr, err := tc.RunCommandOnNode(0, line, withEnv); err != nil { t.Fatalf("fail to install embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr) @@ -600,7 +602,7 @@ func TestUpgradeEC18FromReplicatedApp(t *testing.T) { } t.Logf("%s: checking installation state", time.Now().Format(time.RFC3339)) - line = []string{"check-installation-state.sh", "1.8.0+k8s-1.28", "v1.28.11"} + line = []string{"check-installation-state.sh", appVer, "v1.28.11"} if stdout, stderr, err := tc.RunCommandOnNode(0, line, withEnv); err != nil { t.Fatalf("fail to check installation state: %v: %s: %s", err, stdout, stderr) } @@ -1039,12 +1041,14 @@ func TestAirgapUpgradeFromEC18(t *testing.T) { withEnv := map[string]string{"KUBECONFIG": "/var/lib/k0s/pki/admin.conf"} + appVer := fmt.Sprintf("appver-%s-1.8.0-k8s-1.28", os.Getenv("SHORT_SHA")) + t.Logf("%s: downloading airgap files", time.Now().Format(time.RFC3339)) airgapInstallBundlePath := "/tmp/airgap-install-bundle.tar.gz" airgapUpgradeBundlePath := "/tmp/airgap-upgrade-bundle.tar.gz" runInParallel(t, func(t *testing.T) error { - return downloadAirgapBundle(t, "1.8.0+k8s-1.28", airgapInstallBundlePath, os.Getenv("AIRGAP_LICENSE_ID")) + return downloadAirgapBundle(t, appVer, airgapInstallBundlePath, os.Getenv("AIRGAP_LICENSE_ID")) }, func(t *testing.T) error { return downloadAirgapBundle(t, fmt.Sprintf("appver-%s-upgrade", os.Getenv("SHORT_SHA")), airgapUpgradeBundlePath, os.Getenv("AIRGAP_LICENSE_ID")) }, @@ -1150,7 +1154,7 @@ func TestAirgapUpgradeFromEC18(t *testing.T) { "check-airgap-installation-state.sh", // the initially installed version is 1.8.0+k8s-1.28 // the '+' character is problematic in the regex used to validate the version, so we use '.' instead - "1.8.0.k8s-1.28", + appVer, "v1.28.11"} if _, _, err := tc.RunCommandOnNode(0, line, withEnv); err != nil { t.Fatalf("fail to check installation state: %v", err) diff --git a/e2e/scripts/check-airgap-installation-state.sh b/e2e/scripts/check-airgap-installation-state.sh index 8c46c5a010..86eb988550 100755 --- a/e2e/scripts/check-airgap-installation-state.sh +++ b/e2e/scripts/check-airgap-installation-state.sh @@ -43,8 +43,8 @@ main() { exit 1 fi - # if this is the current version - if echo "$version" | grep -E "^(dev|appver)-" ; then + # if this is the current version in CI + if echo "$version" | grep -qvE "(pre-minio-removal|1.8.0-k8s)" ; then validate_data_dirs fi diff --git a/e2e/scripts/check-airgap-post-ha-state.sh b/e2e/scripts/check-airgap-post-ha-state.sh index 7434006e4e..0031a4df83 100755 --- a/e2e/scripts/check-airgap-post-ha-state.sh +++ b/e2e/scripts/check-airgap-post-ha-state.sh @@ -68,8 +68,8 @@ main() { exit 1 fi - # if this is the current version - if echo "$version" | grep -E "^(dev|appver)-" ; then + # if this is the current version in CI + if echo "$version" | grep -qvE "(pre-minio-removal|1.8.0-k8s)" ; then validate_data_dirs fi diff --git a/e2e/scripts/check-installation-state.sh b/e2e/scripts/check-installation-state.sh index f5bef91854..cb05a5da65 100755 --- a/e2e/scripts/check-installation-state.sh +++ b/e2e/scripts/check-installation-state.sh @@ -48,8 +48,8 @@ main() { exit 1 fi - # if this is the current version - if echo "$version" | grep -E "^(dev|appver)-" ; then + # if this is the current version in CI + if echo "$version" | grep -qvE "(pre-minio-removal|1.8.0-k8s)" ; then validate_data_dirs fi diff --git a/e2e/scripts/check-post-ha-state.sh b/e2e/scripts/check-post-ha-state.sh index 314cede3b6..29c8b81c27 100755 --- a/e2e/scripts/check-post-ha-state.sh +++ b/e2e/scripts/check-post-ha-state.sh @@ -61,8 +61,8 @@ main() { exit 1 fi - # if this is the current version - if echo "$version" | grep -E "^(dev|appver)-" ; then + # if this is the current version in CI + if echo "$version" | grep -qvE "(pre-minio-removal|1.8.0-k8s)" ; then validate_data_dirs fi From 8db725a528de6754090d609b2f8ad6ccdf4d991e Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Wed, 23 Oct 2024 15:31:13 -0400 Subject: [PATCH 03/25] noop for new CI From 344667d3010ce63dd1d558137c79ff7228dbe6f4 Mon Sep 17 00:00:00 2001 From: laverya <2318911+laverya@users.noreply.github.com> Date: Wed, 23 Oct 2024 19:51:45 +0000 Subject: [PATCH 04/25] Update image versions --- pkg/config/static/metadata.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/config/static/metadata.yaml b/pkg/config/static/metadata.yaml index 07bbfd15e3..acefe600a5 100644 --- a/pkg/config/static/metadata.yaml +++ b/pkg/config/static/metadata.yaml @@ -14,13 +14,13 @@ images: calico-kube-controllers: repo: proxy.replicated.com/anonymous/replicated/ec-calico-kube-controllers tag: - amd64: 3.28.2-r0-amd64@sha256:835aa9ac495a8ac22819d91fd348175cf44f5b0b059e5780952fcf49dbb96d0e - arm64: 3.28.2-r0-arm64@sha256:ce64374d44e864fbe979e632c50d3c9ce28cdc9279e0b238d188ace01f4986fb + amd64: 3.28.2-r0-amd64@sha256:efcaf23e8003b48549351784122e8615ad5d07df25b4a7e5a16d08f198d545d9 + arm64: 3.28.2-r0-arm64@sha256:e93128389cc1e3a4ca41a54529fdf8f9c36fd1110b8e6754f87fbf269e2b580b calico-node: repo: proxy.replicated.com/anonymous/replicated/ec-calico-node tag: - amd64: 3.28.2-r0-amd64@sha256:757f1e7a28f74f86466cd344adcb722a3f921bd76b64bc1ad71b1f5558a8f6d6 - arm64: 3.28.2-r0-arm64@sha256:602e8cded18058eaac282721bda9e0e865f52e7b0091a8b1e5217a9de911d55f + amd64: 3.28.2-r0-amd64@sha256:fb226e53458fbd6bb50a76ccc49ecb6e0a4540ec567256f03cf55ed48ee99277 + arm64: 3.28.2-r0-arm64@sha256:8559d2161d171fdf07ad51d93f9b94e6440691985433f4d83896b4ccab2cc692 coredns: repo: proxy.replicated.com/anonymous/replicated/ec-coredns tag: @@ -29,8 +29,8 @@ images: kube-proxy: repo: proxy.replicated.com/anonymous/registry.k8s.io/kube-proxy tag: - amd64: v1.30.5-amd64@sha256:55bb386d871536f4e67e6919418c88e4a53641c1e09b537296a2a6a398aa0892 - arm64: v1.30.5-arm64@sha256:61fb79450cc228599006709e4ad1ffb42a4f0decd163a625f17a3eaf5c2af29d + amd64: v1.30.6-amd64@sha256:3c20e8d6b8ce2c885557636263730ff8f1c486dee46096b833608c5403fb1c2a + arm64: v1.30.6-arm64@sha256:c8e462aaf682d0d39593a87d682eb846ebbf665e11206499eaeda00820ab6795 metrics-server: repo: proxy.replicated.com/anonymous/replicated/ec-metrics-server tag: From b76e0b2c8bddb5c45403c2a558f9390a9c992a0a Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Mon, 4 Nov 2024 11:18:54 -0800 Subject: [PATCH 05/25] Trigger Build From e2132ce36ccd5e42419912d7ae7ec7ba78a7eaa8 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Thu, 7 Nov 2024 13:59:36 -0600 Subject: [PATCH 06/25] fix(ci): e2e test fails ntp preflight (#1469) --- dev/distros/entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/distros/entrypoint.sh b/dev/distros/entrypoint.sh index a409f63532..a65c5657f7 100755 --- a/dev/distros/entrypoint.sh +++ b/dev/distros/entrypoint.sh @@ -22,5 +22,8 @@ fi ln -sf /etc/machine-id.persistent /etc/machine-id ln -sf /etc/machine-id.persistent /var/lib/dbus/machine-id +# Sync time +chronyc -a makestep + # Launch the system exec /sbin/init From 87f3258b868cb873418f9bc784b38018a385f46f Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Thu, 7 Nov 2024 16:06:38 -0600 Subject: [PATCH 07/25] fix(ci): collect fallback cluster support bundle in airgap (#1462) * fix(ci): collect fallback cluster support bundle in airgap * f * f * Trigger Build --- e2e/cluster/docker/cluster.go | 3 ++- e2e/cluster/docker/container.go | 9 +++++++++ e2e/cluster/lxd/cluster.go | 4 ++++ e2e/scripts/collect-support-bundle-cluster.sh | 5 +---- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/e2e/cluster/docker/cluster.go b/e2e/cluster/docker/cluster.go index 8b8251eb19..032197a244 100644 --- a/e2e/cluster/docker/cluster.go +++ b/e2e/cluster/docker/cluster.go @@ -42,7 +42,8 @@ func NewCluster(in *ClusterInput) *Cluster { func NewNode(in *ClusterInput, name string) *Container { c := NewContainer(in.T, name). WithImage(fmt.Sprintf("replicated/ec-distro:%s", in.Distro)). - WithScripts() + WithScripts(). + WithTroubleshootDir() if in.K0sDir != "" { in.T.Logf("using k0s dir %s", in.K0sDir) c = c.WithVolume(in.K0sDir) diff --git a/e2e/cluster/docker/container.go b/e2e/cluster/docker/container.go index 96a5d9d760..af41a59b4e 100644 --- a/e2e/cluster/docker/container.go +++ b/e2e/cluster/docker/container.go @@ -111,6 +111,15 @@ func (c *Container) GetScriptPath(script string) string { return fmt.Sprintf("/usr/local/bin/%s", script) } +func (c *Container) WithTroubleshootDir() *Container { + troubleshootPath, err := filepath.Abs("../operator/charts/embedded-cluster-operator/troubleshoot") + if err != nil { + c.t.Fatalf("failed to get absolute path to troubleshoot dir: %v", err) + } + c = c.WithVolume(fmt.Sprintf("%s:%s", troubleshootPath, "/automation/troubleshoot")) + return c +} + func (c *Container) WithVolume(volume string) *Container { c.Volumes = append(c.Volumes, volume) return c diff --git a/e2e/cluster/lxd/cluster.go b/e2e/cluster/lxd/cluster.go index c4199874f1..b619f4de01 100644 --- a/e2e/cluster/lxd/cluster.go +++ b/e2e/cluster/lxd/cluster.go @@ -482,6 +482,10 @@ func CopyDirsToNode(in *ClusterInput, node string) { SourcePath: "playwright", DestPath: "/automation/playwright", }, + { + SourcePath: "../operator/charts/embedded-cluster-operator/troubleshoot", + DestPath: "/automation/troubleshoot", + }, } for _, dir := range dirs { CopyDirToNode(in, node, dir) diff --git a/e2e/scripts/collect-support-bundle-cluster.sh b/e2e/scripts/collect-support-bundle-cluster.sh index 8e4335257a..9c1aa05e60 100755 --- a/e2e/scripts/collect-support-bundle-cluster.sh +++ b/e2e/scripts/collect-support-bundle-cluster.sh @@ -6,10 +6,7 @@ DIR=/usr/local/bin main() { if ! kubectl support-bundle --output cluster.tar.gz --interactive=false --load-cluster-specs ; then - # NOTE: this will fail in airgap but we've already failed above - # TODO: improve this by downloading the spec through the proxy and running with a file path - local url="https://raw.githubusercontent.com/replicatedhq/embedded-cluster-operator/main/charts/embedded-cluster-operator/troubleshoot/cluster-support-bundle.yaml" - if ! kubectl support-bundle --output cluster.tar.gz --interactive=false --load-cluster-specs "$url" ; then + if ! kubectl support-bundle --output cluster.tar.gz --interactive=false --load-cluster-specs "/automation/troubleshoot/cluster-support-bundle.yaml" ; then echo "Failed to collect cluster support bundle" return 1 fi From 8fd7f13d42742d31e071ff2720b685f08dc13fd4 Mon Sep 17 00:00:00 2001 From: replicated-ci-ec Date: Thu, 7 Nov 2024 22:53:31 +0000 Subject: [PATCH 08/25] feat: update adminconsole version (#1471) updated adminconsole version Co-authored-by: emosbaugh <371319+emosbaugh@users.noreply.github.com> --- pkg/addons/adminconsole/static/metadata.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/addons/adminconsole/static/metadata.yaml b/pkg/addons/adminconsole/static/metadata.yaml index 32a43d2139..eade78fbde 100644 --- a/pkg/addons/adminconsole/static/metadata.yaml +++ b/pkg/addons/adminconsole/static/metadata.yaml @@ -5,26 +5,26 @@ # $ make buildtools # $ output/bin/buildtools update addon # -version: 1.120.2 +version: 1.120.3 location: oci://proxy.replicated.com/anonymous/registry.replicated.com/library/admin-console images: kotsadm: repo: proxy.replicated.com/anonymous/kotsadm/kotsadm tag: - amd64: v1.120.2-amd64@sha256:f7631ecee688d58f8cb37ce40b6b9f75d1f2bc6dc81634f310b5ff0dbb7c669a - arm64: v1.120.2-arm64@sha256:120936eb51d2c64e7757c224f7dbeed613b77b3e2c493eef93671e55dac84926 + amd64: v1.120.3-amd64@sha256:884cbaf8213c16bfe2ef12f628f5477a4a75252270282b6451081cd841c5723f + arm64: v1.120.3-arm64@sha256:3d11d7d14bd4305c3fcf64f5a8a52eb1e27fa0bf461232bd63c275c05666487a kotsadm-migrations: repo: proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations tag: - amd64: v1.120.2-amd64@sha256:276ecf058c098b00e8c99b958601536d4bb7460cf075b84a52076ee7ebcc299c - arm64: v1.120.2-arm64@sha256:f5d167a133b655508db577b2f9d91159c95d27cfed8b69f6650fff3125ba2a84 + amd64: v1.120.3-amd64@sha256:c56582c4487b829537bfefb40f57addd0da472c5d919066e585879f99b82e377 + arm64: v1.120.3-arm64@sha256:693354624b06d10c37710bf533543948f78659c2771a0fc75a4b03eb2ee37829 kurl-proxy: repo: proxy.replicated.com/anonymous/kotsadm/kurl-proxy tag: - amd64: v1.120.2-amd64@sha256:754921ed9f0402bb23188f7a90cefae876c2392cd479ee4832d354e559fdeda9 - arm64: v1.120.2-arm64@sha256:ddd218dd1fa5ea93fcc267c376ac236d0adb3a7ff21252155b6b64302f11a0a6 + amd64: v1.120.3-amd64@sha256:9dae75b4c5ba933d2f8ce7206101b9858e4ab0da0b9534f6f9742458a7dd3f04 + arm64: v1.120.3-arm64@sha256:13dd2a2e4474f75c56f041ea8366983802407b225e991469a8e91b7d716113de rqlite: repo: proxy.replicated.com/anonymous/kotsadm/rqlite tag: - amd64: 8.32.6-r0-amd64@sha256:2468442967600e5b5de4ab7818e97f7f417afa8f176a2c8c71cb15de75e0c073 - arm64: 8.32.6-r0-arm64@sha256:47bef1b78f4283e2d5f20aee248e8a562c931263fd85929e9ce83d35ff6f86aa + amd64: 8.32.7-r0-amd64@sha256:2c3e36a6b146311d2cfa6b6d72f3882a8af9ac4b3aaa9f1df3169760db5c02c7 + arm64: 8.32.7-r0-arm64@sha256:a2df1c987aefdaab8e42797623eb27e2c1e707c55c42a29e60a43e71dfd5bdf3 From f8cfdd16230a6886abee24e5a5cf3953500a9c3c Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Thu, 7 Nov 2024 20:36:14 -0300 Subject: [PATCH 09/25] Revert "feat: add preflight for ip forwarding" (#1470) Revert "feat: add preflight for ip forwarding (#1449)" This reverts commit 65f39962a4ef8e71ce5841c44a880349b93e51a2. --- pkg/preflights/host-preflight.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pkg/preflights/host-preflight.yaml b/pkg/preflights/host-preflight.yaml index 4314c81f35..546a45c7b5 100644 --- a/pkg/preflights/host-preflight.yaml +++ b/pkg/preflights/host-preflight.yaml @@ -148,10 +148,6 @@ spec: exclude: '{{ eq .GlobalCIDR.CIDR "" }}' CIDRRangeAlloc: '{{ .GlobalCIDR.CIDR }}' desiredCIDR: {{.GlobalCIDR.Size}} - - run: - collectorName: "kernel-parameters" - command: "sysctl" - args: ["-a"] analyzers: - cpu: checkName: CPU @@ -838,14 +834,3 @@ spec: - pass: when: "a-subnet-is-available" message: Specified CIDR is available. - - textAnalyze: - checkName: IP forwarding - fileName: host-collectors/run-host/kernel-parameters.txt - regex: 'net.ipv4.ip_forward = 1' - outcomes: - - pass: - when: "true" - message: IP forwarding is enabled. - - fail: - when: "false" - message: IP forwarding must be enabled. To enable it, edit /etc/sysctl.conf, add or uncomment the line 'net.ipv4.ip_forward=1', and run 'sudo sysctl -p'. From 8286a4ea6d70741b75d5dd2c681aa7d820bee317 Mon Sep 17 00:00:00 2001 From: Salah Al Saleh Date: Thu, 7 Nov 2024 16:28:00 -0800 Subject: [PATCH 10/25] Fix clock sync flakiness for docker-based clusters (#1472) * Fix clock sync flakiness for debian and ubuntu --- .../dockerfiles/almalinux-8.Dockerfile | 5 ++++- dev/distros/dockerfiles/centos-9.Dockerfile | 5 ++++- .../dockerfiles/debian-bookworm.Dockerfile | 2 +- .../dockerfiles/debian-bullseye.Dockerfile | 2 +- .../dockerfiles/ubuntu-jammy.Dockerfile | 2 +- dev/distros/entrypoint.sh | 20 ++++++++++++++++--- e2e/cluster/docker/container.go | 12 +++++------ 7 files changed, 34 insertions(+), 14 deletions(-) diff --git a/dev/distros/dockerfiles/almalinux-8.Dockerfile b/dev/distros/dockerfiles/almalinux-8.Dockerfile index 2c67a4db80..0579eeced4 100644 --- a/dev/distros/dockerfiles/almalinux-8.Dockerfile +++ b/dev/distros/dockerfiles/almalinux-8.Dockerfile @@ -1,5 +1,8 @@ FROM almalinux:8 +# Only required for systemd-timesyncd +RUN dnf install -y epel-release + # Install necessary packages RUN dnf install -y \ sudo \ @@ -13,7 +16,7 @@ RUN dnf install -y \ ipvsadm \ kmod \ iproute \ - chrony \ + systemd-timesyncd \ expect \ vim \ --allowerasing diff --git a/dev/distros/dockerfiles/centos-9.Dockerfile b/dev/distros/dockerfiles/centos-9.Dockerfile index a54f3133a8..3080ff6a8f 100644 --- a/dev/distros/dockerfiles/centos-9.Dockerfile +++ b/dev/distros/dockerfiles/centos-9.Dockerfile @@ -1,5 +1,8 @@ FROM quay.io/centos/centos:stream9 +# Only required for systemd-timesyncd +RUN dnf install -y epel-release + # Install necessary packages RUN dnf install -y \ sudo \ @@ -13,7 +16,7 @@ RUN dnf install -y \ ipvsadm \ kmod \ iproute \ - chrony \ + systemd-timesyncd \ expect \ vim \ --allowerasing diff --git a/dev/distros/dockerfiles/debian-bookworm.Dockerfile b/dev/distros/dockerfiles/debian-bookworm.Dockerfile index 72b5bba0ae..823e172e64 100644 --- a/dev/distros/dockerfiles/debian-bookworm.Dockerfile +++ b/dev/distros/dockerfiles/debian-bookworm.Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \ ipvsadm \ kmod \ iproute2 \ - chrony \ + systemd-timesyncd \ expect \ vim diff --git a/dev/distros/dockerfiles/debian-bullseye.Dockerfile b/dev/distros/dockerfiles/debian-bullseye.Dockerfile index 7212204c3c..0412ff9171 100644 --- a/dev/distros/dockerfiles/debian-bullseye.Dockerfile +++ b/dev/distros/dockerfiles/debian-bullseye.Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \ ipvsadm \ kmod \ iproute2 \ - chrony \ + systemd-timesyncd \ expect \ vim diff --git a/dev/distros/dockerfiles/ubuntu-jammy.Dockerfile b/dev/distros/dockerfiles/ubuntu-jammy.Dockerfile index 17a4bd659f..02fbaaa8e4 100644 --- a/dev/distros/dockerfiles/ubuntu-jammy.Dockerfile +++ b/dev/distros/dockerfiles/ubuntu-jammy.Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \ ipvsadm \ kmod \ iproute2 \ - chrony \ + systemd-timesyncd \ expect \ vim diff --git a/dev/distros/entrypoint.sh b/dev/distros/entrypoint.sh index a65c5657f7..7c9639bb5e 100755 --- a/dev/distros/entrypoint.sh +++ b/dev/distros/entrypoint.sh @@ -17,13 +17,27 @@ systemctl mask \ # A unique machine ID is required for multi-node clusters in k0s <= v1.29 # https://github.com/k0sproject/k0s/blob/443e28b75d216e120764136b4513e6237cea7cc5/docs/external-runtime-deps.md#a-unique-machine-id-for-multi-node-setups if [ ! -f "/etc/machine-id.persistent" ]; then - dbus-uuidgen --ensure=/etc/machine-id.persistent + tr -dc 'a-z0-9' < /dev/urandom | head -c32 > /etc/machine-id.persistent fi +mkdir -p /var/lib/dbus ln -sf /etc/machine-id.persistent /etc/machine-id ln -sf /etc/machine-id.persistent /var/lib/dbus/machine-id -# Sync time -chronyc -a makestep +# Override timesyncd config to allow it to run in containers +mkdir -p /etc/systemd/system/systemd-timesyncd.service.d/ +cat > /etc/systemd/system/systemd-timesyncd.service.d/override.conf << EOF +[Unit] +ConditionVirtualization= +EOF + +# Wait for systemd then start timesyncd +( + until systemctl is-system-running -q; do + sleep 1 + done + systemctl enable systemd-timesyncd + systemctl start systemd-timesyncd +) & # Launch the system exec /sbin/init diff --git a/e2e/cluster/docker/container.go b/e2e/cluster/docker/container.go index af41a59b4e..1177b7f2d0 100644 --- a/e2e/cluster/docker/container.go +++ b/e2e/cluster/docker/container.go @@ -200,7 +200,7 @@ func (c *Container) WaitForSystemd() { c.t.Fatalf("timeout waiting for systemd to start: %v: %s: %s", err, stdout, stderr) case <-tick: status, _, _ := c.Exec([]string{"systemctl is-system-running"}) - c.t.Logf("systemd stdout: %s", strings.TrimSpace(status)) + c.t.Logf("systemd stdout: %s", status) if strings.TrimSpace(status) == "running" { return } @@ -214,12 +214,12 @@ func (c *Container) WaitForClockSync() { for { select { case <-timeout: - stdout, stderr, err := c.Exec([]string{"chronyc tracking"}) - c.t.Fatalf("timeout waiting for chronyd to start: %v: %s: %s", err, stdout, stderr) + stdout, stderr, err := c.Exec([]string{"timedatectl show -p NTP -p NTPSynchronized"}) + c.t.Fatalf("timeout waiting for clock sync: %v: %s: %s", err, stdout, stderr) case <-tick: - status, _, _ := c.Exec([]string{"chronyc tracking | grep 'Leap status'"}) - c.t.Logf("chronyd stdout: %s", strings.TrimSpace(status)) - if strings.Contains(status, "Normal") { + status, _, _ := c.Exec([]string{"timedatectl show -p NTP -p NTPSynchronized"}) + c.t.Logf("timedatectl stdout: %s", status) + if strings.Contains(status, "NTP=yes") && strings.Contains(status, "NTPSynchronized=yes") { return } } From 5c389b80370cd6181fa8bbc4e46d4b91978520a1 Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Thu, 5 Dec 2024 10:04:18 -0800 Subject: [PATCH 11/25] update kube-proxy image --- pkg/config/static/metadata.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/static/metadata.yaml b/pkg/config/static/metadata.yaml index 1897fd3494..d296b3d35f 100644 --- a/pkg/config/static/metadata.yaml +++ b/pkg/config/static/metadata.yaml @@ -29,8 +29,8 @@ images: kube-proxy: repo: proxy.replicated.com/anonymous/registry.k8s.io/kube-proxy tag: - amd64: v1.30.6-amd64@sha256:3c20e8d6b8ce2c885557636263730ff8f1c486dee46096b833608c5403fb1c2a - arm64: v1.30.6-arm64@sha256:c8e462aaf682d0d39593a87d682eb846ebbf665e11206499eaeda00820ab6795 + amd64: v1.29.11-amd64@sha256:b67dafa088a81248ee2e7ea7fe3c6e3b6194dcf97aee59325bc1da55e9774a9f + arm64: v1.29.11-arm64@sha256:c0797031d981ee4018a53c8ae5d0e6a2735f69875b70481a66bdca49c7005181 metrics-server: repo: proxy.replicated.com/anonymous/replicated/ec-metrics-server tag: From 6ac010725b74073f2cbf082c6b74612c2cfe595c Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Fri, 24 Jan 2025 18:07:19 +0100 Subject: [PATCH 12/25] k0s v1.29.13 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9d3176a3d1..03caf1f000 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ ADMIN_CONSOLE_CHART_REPO_OVERRIDE = ADMIN_CONSOLE_IMAGE_OVERRIDE = ADMIN_CONSOLE_MIGRATIONS_IMAGE_OVERRIDE = ADMIN_CONSOLE_KURL_PROXY_IMAGE_OVERRIDE = -K0S_VERSION = v1.29.10+k0s.0 -K0S_GO_VERSION = v1.29.10+k0s.0 +K0S_VERSION = v1.29.13+k0s.0 +K0S_GO_VERSION = v1.29.13+k0s.0 PREVIOUS_K0S_VERSION ?= v1.28.14+k0s.0-ec.0 PREVIOUS_K0S_GO_VERSION ?= v1.28.14+k0s.0 K0S_BINARY_SOURCE_OVERRIDE = From 4322410a7b040a63082c57542ea73a95f4e9f548 Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Thu, 6 Feb 2025 08:23:51 -0800 Subject: [PATCH 13/25] use 1.29.13 kube-proxy image --- pkg/config/static/metadata.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/static/metadata.yaml b/pkg/config/static/metadata.yaml index 7f0357b816..db256b23c0 100644 --- a/pkg/config/static/metadata.yaml +++ b/pkg/config/static/metadata.yaml @@ -29,8 +29,8 @@ images: kube-proxy: repo: proxy.replicated.com/anonymous/registry.k8s.io/kube-proxy tag: - amd64: v1.29.11-amd64@sha256:b67dafa088a81248ee2e7ea7fe3c6e3b6194dcf97aee59325bc1da55e9774a9f - arm64: v1.29.11-arm64@sha256:c0797031d981ee4018a53c8ae5d0e6a2735f69875b70481a66bdca49c7005181 + amd64: v1.29.13-amd64@sha256:cc92e4bc6006899f0859d7e98c29188699096a12d2440f4ac0a987a7994b0e32 + arm64: v1.29.13-arm64@sha256:48ba80e8f745adbc2282a29d1e7c6411c75db9f87345c5b664b8495de39bad76 metrics-server: repo: proxy.replicated.com/anonymous/replicated/ec-metrics-server tag: From dff33698c4fe8dba5cac0431557a83a042aab2cf Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Fri, 21 Feb 2025 11:23:51 -0800 Subject: [PATCH 14/25] update kube-proxy image --- pkg/config/static/metadata.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/static/metadata.yaml b/pkg/config/static/metadata.yaml index 99828adc57..67fe7f421a 100644 --- a/pkg/config/static/metadata.yaml +++ b/pkg/config/static/metadata.yaml @@ -29,8 +29,8 @@ images: kube-proxy: repo: proxy.replicated.com/anonymous/registry.k8s.io/kube-proxy tag: - amd64: v1.29.13-amd64@sha256:cc92e4bc6006899f0859d7e98c29188699096a12d2440f4ac0a987a7994b0e32 - arm64: v1.29.13-arm64@sha256:48ba80e8f745adbc2282a29d1e7c6411c75db9f87345c5b664b8495de39bad76 + amd64: v1.29.14-amd64@sha256:7fdd27c349e0a737272342fd39a00d51afbd50975765bc580d8e23608369a4f9 + arm64: v1.29.14-arm64@sha256:37ef3e9822cd1d77c857edc97dbbb7f8204c1830ba55ea6f91def8f346f3e4b6 metrics-server: repo: proxy.replicated.com/anonymous/replicated/ec-metrics-server tag: From 8bc8e7f1584638f096a0be942aceb441827026fc Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Mon, 24 Mar 2025 14:33:28 -0700 Subject: [PATCH 15/25] k0s 1.29.14 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d7333254b9..4ee1c8518d 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ ADMIN_CONSOLE_CHART_REPO_OVERRIDE = ADMIN_CONSOLE_IMAGE_OVERRIDE = ADMIN_CONSOLE_MIGRATIONS_IMAGE_OVERRIDE = ADMIN_CONSOLE_KURL_PROXY_IMAGE_OVERRIDE = -K0S_VERSION = v1.29.13+k0s.0 -K0S_GO_VERSION = v1.29.13+k0s.0 +K0S_VERSION = v1.29.14+k0s.0 +K0S_GO_VERSION = v1.29.14+k0s.0 PREVIOUS_K0S_VERSION ?= v1.28.14+k0s.0-ec.0 PREVIOUS_K0S_GO_VERSION ?= v1.28.14+k0s.0 K0S_BINARY_SOURCE_OVERRIDE = From 46652e6a3eb33f597b080f46d272749cfc1a2005 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Tue, 1 Apr 2025 13:05:38 -0700 Subject: [PATCH 16/25] update go mod --- go.sum | 4 ++-- kinds/go.mod | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.sum b/go.sum index 39ed4707c1..00ee4c0856 100644 --- a/go.sum +++ b/go.sum @@ -1234,8 +1234,8 @@ github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0sproject/dig v0.4.0 h1:yBxFUUxNXAMGBg6b7c6ypxdx/o3RmhoI5v5ABOw5tn0= github.com/k0sproject/dig v0.4.0/go.mod h1:rlZ7N7ZEcB4Fi96TPXkZ4dqyAiDWOGLapyL9YpZ7Qz4= -github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b h1:pE04QpLnpve7c+bOn4GmKu/j3IMhVBAAjvK6z7mW+FM= -github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b/go.mod h1:j0xCfV9a+hwiOOr3HJmZb1enwXz8cdkSGDzDRqKSdG0= +github.com/k0sproject/k0s v1.30.10-0.20250117153350-dcf3c22bb568 h1:JSfvTBrsNMWDISDUMVRZV6hP5eRusBS6d0Gv2lA4lSA= +github.com/k0sproject/k0s v1.30.10-0.20250117153350-dcf3c22bb568/go.mod h1:Nmj+slwFht6ile7OHHGiSrcRRGmrA9U9PzjnG9/6gc0= github.com/k0sproject/version v0.6.0 h1:Wi8wu9j+H36+okIQA47o/YHbzNpKeIYj8IjGdJOdqsI= github.com/k0sproject/version v0.6.0/go.mod h1:5/7Js62gDCLBP6mEs0mUcYEEkYneM5qXDKN/hyFlQTM= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= diff --git a/kinds/go.mod b/kinds/go.mod index bff91510d1..8de3d26959 100644 --- a/kinds/go.mod +++ b/kinds/go.mod @@ -1,6 +1,7 @@ module github.com/replicatedhq/embedded-cluster/kinds go 1.24.0 + require ( github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b github.com/stretchr/testify v1.10.0 From 590163416da7d0203cc6278fe370bd7666db061d Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Tue, 8 Apr 2025 13:57:16 -0400 Subject: [PATCH 17/25] f From 1e689bb27208b6262dad260dce813a4bd4a59c24 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Fri, 2 May 2025 10:56:33 -0700 Subject: [PATCH 18/25] make go.mod --- go.mod | 13 +++++++++---- go.sum | 26 ++++++++++++++++---------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index fd3aa067dd..b752108dcd 100644 --- a/go.mod +++ b/go.mod @@ -24,10 +24,11 @@ require ( github.com/google/uuid v1.6.0 github.com/gosimple/slug v1.15.0 github.com/jedib0t/go-pretty/v6 v6.6.7 - github.com/k0sproject/k0s v1.30.10-0.20250117153350-dcf3c22bb568 + github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b github.com/ohler55/ojg v1.26.3 github.com/onsi/ginkgo/v2 v2.23.4 github.com/onsi/gomega v1.37.0 + github.com/ory/dockertest/v3 v3.12.0 github.com/replicatedhq/embedded-cluster/kinds v0.0.0 github.com/replicatedhq/embedded-cluster/utils v0.0.0 github.com/replicatedhq/kotskinds v0.0.0-20250411153224-089dbeb7ba2a @@ -84,6 +85,7 @@ require ( github.com/Masterminds/squirrel v1.5.4 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Microsoft/hcsshim v0.12.9 // indirect + github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/VividCortex/ewma v1.2.0 // indirect github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412 // indirect @@ -107,6 +109,7 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/c9s/goprocinfo v0.0.0-20170724085704-0010a05ce49f // indirect github.com/casbin/govaluate v1.3.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect @@ -115,6 +118,7 @@ require ( github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect github.com/containerd/cgroups/v3 v3.0.5 // indirect github.com/containerd/containerd v1.7.27 // indirect + github.com/containerd/continuity v0.4.5 // indirect github.com/containerd/errdefs v0.3.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect @@ -227,6 +231,7 @@ require ( github.com/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/opencontainers/runc v1.2.3 // indirect github.com/opencontainers/runtime-spec v1.2.1 // indirect github.com/opencontainers/selinux v1.11.1 // indirect github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f // indirect @@ -277,9 +282,9 @@ require ( github.com/zitadel/logging v0.6.1 // indirect github.com/zitadel/oidc/v3 v3.31.0 // indirect github.com/zitadel/schema v1.3.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.17 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.17 // indirect - go.etcd.io/etcd/client/v3 v3.5.17 // indirect + go.etcd.io/etcd/api/v3 v3.5.18 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.18 // indirect + go.etcd.io/etcd/client/v3 v3.5.18 // indirect go.mongodb.org/mongo-driver v1.14.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect diff --git a/go.sum b/go.sum index ad0404542b..702b11eedc 100644 --- a/go.sum +++ b/go.sum @@ -672,6 +672,8 @@ github.com/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6 github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEPuoIWYVvZ8Y= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= @@ -806,8 +808,8 @@ github.com/containerd/cgroups/v3 v3.0.5 h1:44na7Ud+VwyE7LIoJ8JTNQOa549a8543BmzaJ github.com/containerd/cgroups/v3 v3.0.5/go.mod h1:SA5DLYnXO8pTGYiAHXz94qvLQTKfVM5GEVisn4jpins= github.com/containerd/containerd v1.7.27 h1:yFyEyojddO3MIGVER2xJLWoCIn+Up4GaHFquP7hsFII= github.com/containerd/containerd v1.7.27/go.mod h1:xZmPnl75Vc+BLGt4MIfu6bp+fy03gdHAn9bz+FreFR0= -github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII= -github.com/containerd/continuity v0.4.4/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= +github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4= +github.com/containerd/continuity v0.4.5/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4= github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= @@ -1234,8 +1236,8 @@ github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0sproject/dig v0.4.0 h1:yBxFUUxNXAMGBg6b7c6ypxdx/o3RmhoI5v5ABOw5tn0= github.com/k0sproject/dig v0.4.0/go.mod h1:rlZ7N7ZEcB4Fi96TPXkZ4dqyAiDWOGLapyL9YpZ7Qz4= -github.com/k0sproject/k0s v1.30.10-0.20250117153350-dcf3c22bb568 h1:JSfvTBrsNMWDISDUMVRZV6hP5eRusBS6d0Gv2lA4lSA= -github.com/k0sproject/k0s v1.30.10-0.20250117153350-dcf3c22bb568/go.mod h1:Nmj+slwFht6ile7OHHGiSrcRRGmrA9U9PzjnG9/6gc0= +github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b h1:pE04QpLnpve7c+bOn4GmKu/j3IMhVBAAjvK6z7mW+FM= +github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b/go.mod h1:j0xCfV9a+hwiOOr3HJmZb1enwXz8cdkSGDzDRqKSdG0= github.com/k0sproject/version v0.6.0 h1:Wi8wu9j+H36+okIQA47o/YHbzNpKeIYj8IjGdJOdqsI= github.com/k0sproject/version v0.6.0/go.mod h1:5/7Js62gDCLBP6mEs0mUcYEEkYneM5qXDKN/hyFlQTM= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -1403,10 +1405,14 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/opencontainers/runc v1.2.3 h1:fxE7amCzfZflJO2lHXf4y/y8M1BoAqp+FVmG19oYB80= +github.com/opencontainers/runc v1.2.3/go.mod h1:nSxcWUydXrsBZVYNSkTjoQ/N6rcyTtn+1SD5D4+kRIM= github.com/opencontainers/runtime-spec v1.2.1 h1:S4k4ryNgEpxW1dzyqffOmhI1BHYcjzU8lpJfSlR0xww= github.com/opencontainers/runtime-spec v1.2.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8= github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= +github.com/ory/dockertest/v3 v3.12.0 h1:3oV9d0sDzlSQfHtIaB5k6ghUCVMVLpAY8hwrqoCyRCw= +github.com/ory/dockertest/v3 v3.12.0/go.mod h1:aKNDTva3cp8dwOWwb9cWuX84aH5akkxXRvO7KCwWVjE= github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f h1:/UDgs8FGMqwnHagNDPGOlts35QkhAZ8by3DR7nMih7M= github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= @@ -1621,12 +1627,12 @@ github.com/zitadel/oidc/v3 v3.31.0 h1:XQcTVHTYpSkNxjGccEb6pRfrGJdUhkTgXOIzSqRXdo github.com/zitadel/oidc/v3 v3.31.0/go.mod h1:DyE/XClysRK/ozFaZSqlYamKVnTh4l6Ln25ihSNI03w= github.com/zitadel/schema v1.3.0 h1:kQ9W9tvIwZICCKWcMvCEweXET1OcOyGEuFbHs4o5kg0= github.com/zitadel/schema v1.3.0/go.mod h1:NptN6mkBDFvERUCvZHlvWmmME+gmZ44xzwRXwhzsbtc= -go.etcd.io/etcd/api/v3 v3.5.17 h1:cQB8eb8bxwuxOilBpMJAEo8fAONyrdXTHUNcMd8yT1w= -go.etcd.io/etcd/api/v3 v3.5.17/go.mod h1:d1hvkRuXkts6PmaYk2Vrgqbv7H4ADfAKhyJqHNLJCB4= -go.etcd.io/etcd/client/pkg/v3 v3.5.17 h1:XxnDXAWq2pnxqx76ljWwiQ9jylbpC4rvkAeRVOUKKVw= -go.etcd.io/etcd/client/pkg/v3 v3.5.17/go.mod h1:4DqK1TKacp/86nJk4FLQqo6Mn2vvQFBmruW3pP14H/w= -go.etcd.io/etcd/client/v3 v3.5.17 h1:o48sINNeWz5+pjy/Z0+HKpj/xSnBkuVhVvXkjEXbqZY= -go.etcd.io/etcd/client/v3 v3.5.17/go.mod h1:j2d4eXTHWkT2ClBgnnEPm/Wuu7jsqku41v9DZ3OtjQo= +go.etcd.io/etcd/api/v3 v3.5.18 h1:Q4oDAKnmwqTo5lafvB+afbgCDF7E35E4EYV2g+FNGhs= +go.etcd.io/etcd/api/v3 v3.5.18/go.mod h1:uY03Ob2H50077J7Qq0DeehjM/A9S8PhVfbQ1mSaMopU= +go.etcd.io/etcd/client/pkg/v3 v3.5.18 h1:mZPOYw4h8rTk7TeJ5+3udUkfVGBqc+GCjOJYd68QgNM= +go.etcd.io/etcd/client/pkg/v3 v3.5.18/go.mod h1:BxVf2o5wXG9ZJV+/Cu7QNUiJYk4A29sAhoI5tIRsCu4= +go.etcd.io/etcd/client/v3 v3.5.18 h1:nvvYmNHGumkDjZhTHgVU36A9pykGa2K4lAJ0yY7hcXA= +go.etcd.io/etcd/client/v3 v3.5.18/go.mod h1:kmemwOsPU9broExyhYsBxX4spCTDX3yLgPMWtpBXG6E= go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= From 6af6a654b4374da9292b8f96060791e6a252568e Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Tue, 3 Jun 2025 11:03:34 -0700 Subject: [PATCH 19/25] go mod tidy --- go.mod | 4 ---- go.sum | 6 ------ 2 files changed, 10 deletions(-) diff --git a/go.mod b/go.mod index 1a797eb0c5..e6529f6fcd 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,6 @@ require ( github.com/ohler55/ojg v1.26.3 github.com/onsi/ginkgo/v2 v2.23.4 github.com/onsi/gomega v1.37.0 - github.com/ory/dockertest/v3 v3.12.0 github.com/replicatedhq/embedded-cluster/kinds v0.0.0 github.com/replicatedhq/embedded-cluster/utils v0.0.0 github.com/replicatedhq/kotskinds v0.0.0-20250411153224-089dbeb7ba2a @@ -90,7 +89,6 @@ require ( github.com/Masterminds/squirrel v1.5.4 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Microsoft/hcsshim v0.12.9 // indirect - github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/VividCortex/ewma v1.2.0 // indirect github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412 // indirect @@ -114,7 +112,6 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/c9s/goprocinfo v0.0.0-20170724085704-0010a05ce49f // indirect github.com/casbin/govaluate v1.3.0 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect @@ -235,7 +232,6 @@ require ( github.com/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/opencontainers/runc v1.2.3 // indirect github.com/opencontainers/runtime-spec v1.2.1 // indirect github.com/opencontainers/selinux v1.11.1 // indirect github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f // indirect diff --git a/go.sum b/go.sum index 74af7dad73..b55b6db814 100644 --- a/go.sum +++ b/go.sum @@ -674,8 +674,6 @@ github.com/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6 github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEPuoIWYVvZ8Y= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= @@ -1409,14 +1407,10 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/opencontainers/runc v1.2.3 h1:fxE7amCzfZflJO2lHXf4y/y8M1BoAqp+FVmG19oYB80= -github.com/opencontainers/runc v1.2.3/go.mod h1:nSxcWUydXrsBZVYNSkTjoQ/N6rcyTtn+1SD5D4+kRIM= github.com/opencontainers/runtime-spec v1.2.1 h1:S4k4ryNgEpxW1dzyqffOmhI1BHYcjzU8lpJfSlR0xww= github.com/opencontainers/runtime-spec v1.2.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8= github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= -github.com/ory/dockertest/v3 v3.12.0 h1:3oV9d0sDzlSQfHtIaB5k6ghUCVMVLpAY8hwrqoCyRCw= -github.com/ory/dockertest/v3 v3.12.0/go.mod h1:aKNDTva3cp8dwOWwb9cWuX84aH5akkxXRvO7KCwWVjE= github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f h1:/UDgs8FGMqwnHagNDPGOlts35QkhAZ8by3DR7nMih7M= github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= From 0687850c2e87e09a9b318ccf41bf344659e5c690 Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Tue, 3 Jun 2025 11:05:27 -0700 Subject: [PATCH 20/25] operator crds --- .../charts/crds/templates/resources.yaml | 10 ---------- .../bases/embeddedcluster.replicated.com_configs.yaml | 5 ----- .../embeddedcluster.replicated.com_installations.yaml | 5 ----- operator/schemas/config-embeddedcluster-v1beta1.json | 10 ++-------- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/operator/charts/embedded-cluster-operator/charts/crds/templates/resources.yaml b/operator/charts/embedded-cluster-operator/charts/crds/templates/resources.yaml index b8aec7b648..619dbb4737 100644 --- a/operator/charts/embedded-cluster-operator/charts/crds/templates/resources.yaml +++ b/operator/charts/embedded-cluster-operator/charts/crds/templates/resources.yaml @@ -104,21 +104,16 @@ spec: type: string name: description: The repository name. - minLength: 1 type: string password: description: Password for Basic HTTP authentication. type: string url: description: The repository URL. - minLength: 1 type: string username: description: Username for Basic HTTP authentication. type: string - required: - - name - - url type: object type: array type: object @@ -408,21 +403,16 @@ spec: type: string name: description: The repository name. - minLength: 1 type: string password: description: Password for Basic HTTP authentication. type: string url: description: The repository URL. - minLength: 1 type: string username: description: Username for Basic HTTP authentication. type: string - required: - - name - - url type: object type: array type: object diff --git a/operator/config/crd/bases/embeddedcluster.replicated.com_configs.yaml b/operator/config/crd/bases/embeddedcluster.replicated.com_configs.yaml index 5c3d3ab349..c3bb59e325 100644 --- a/operator/config/crd/bases/embeddedcluster.replicated.com_configs.yaml +++ b/operator/config/crd/bases/embeddedcluster.replicated.com_configs.yaml @@ -109,21 +109,16 @@ spec: type: string name: description: The repository name. - minLength: 1 type: string password: description: Password for Basic HTTP authentication. type: string url: description: The repository URL. - minLength: 1 type: string username: description: Username for Basic HTTP authentication. type: string - required: - - name - - url type: object type: array type: object diff --git a/operator/config/crd/bases/embeddedcluster.replicated.com_installations.yaml b/operator/config/crd/bases/embeddedcluster.replicated.com_installations.yaml index 711eb679e6..0f470ba313 100644 --- a/operator/config/crd/bases/embeddedcluster.replicated.com_installations.yaml +++ b/operator/config/crd/bases/embeddedcluster.replicated.com_installations.yaml @@ -170,21 +170,16 @@ spec: type: string name: description: The repository name. - minLength: 1 type: string password: description: Password for Basic HTTP authentication. type: string url: description: The repository URL. - minLength: 1 type: string username: description: Username for Basic HTTP authentication. type: string - required: - - name - - url type: object type: array type: object diff --git a/operator/schemas/config-embeddedcluster-v1beta1.json b/operator/schemas/config-embeddedcluster-v1beta1.json index 3999d3577a..20de5bd3a7 100644 --- a/operator/schemas/config-embeddedcluster-v1beta1.json +++ b/operator/schemas/config-embeddedcluster-v1beta1.json @@ -85,10 +85,6 @@ "items": { "description": "Repository describes single repository entry. Fields map to the CLI flags for the \"helm add\" command", "type": "object", - "required": [ - "name", - "url" - ], "properties": { "caFile": { "description": "CA bundle file to use when verifying HTTPS-enabled servers.", @@ -108,8 +104,7 @@ }, "name": { "description": "The repository name.", - "type": "string", - "minLength": 1 + "type": "string" }, "password": { "description": "Password for Basic HTTP authentication.", @@ -117,8 +112,7 @@ }, "url": { "description": "The repository URL.", - "type": "string", - "minLength": 1 + "type": "string" }, "username": { "description": "Username for Basic HTTP authentication.", From af56adc9a5861b4d42931693997e4d830fedca3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Antunes?= Date: Thu, 5 Jun 2025 13:46:49 +0100 Subject: [PATCH 21/25] chore(lint): fix go lang ci lint for k0s-1-29 (#2247) chore(lint): fix go lang ci lint --- .golangci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 3aef90bae9..cb2d3591eb 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -21,7 +21,9 @@ linters: # Our own extras: - gofmt - - nolintlint # lints nolint directives + # We disable nolintlint on purpose given there's directives only applicable on latest which fail on previous release + # branches + # - nolintlint # lints nolint directives # - revive linters-settings: From 037b3ad9c504615e92279d9054ecd9e1cb91f47c Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Mon, 30 Jun 2025 13:15:41 -0700 Subject: [PATCH 22/25] update crds --- ...cluster.replicated.com_kubernetesinstallations.yaml | 5 ----- ...kubernetesinstallation-embeddedcluster-v1beta1.json | 10 ++-------- pkg/crds/resources.yaml | 10 ---------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/operator/config/crd/bases/embeddedcluster.replicated.com_kubernetesinstallations.yaml b/operator/config/crd/bases/embeddedcluster.replicated.com_kubernetesinstallations.yaml index 35a9a7db3c..44dc740bfe 100644 --- a/operator/config/crd/bases/embeddedcluster.replicated.com_kubernetesinstallations.yaml +++ b/operator/config/crd/bases/embeddedcluster.replicated.com_kubernetesinstallations.yaml @@ -134,21 +134,16 @@ spec: type: string name: description: The repository name. - minLength: 1 type: string password: description: Password for Basic HTTP authentication. type: string url: description: The repository URL. - minLength: 1 type: string username: description: Username for Basic HTTP authentication. type: string - required: - - name - - url type: object type: array type: object diff --git a/operator/schemas/kubernetesinstallation-embeddedcluster-v1beta1.json b/operator/schemas/kubernetesinstallation-embeddedcluster-v1beta1.json index aa105b43ca..ae685812c9 100644 --- a/operator/schemas/kubernetesinstallation-embeddedcluster-v1beta1.json +++ b/operator/schemas/kubernetesinstallation-embeddedcluster-v1beta1.json @@ -111,10 +111,6 @@ "items": { "description": "Repository describes single repository entry. Fields map to the CLI flags for the \"helm add\" command", "type": "object", - "required": [ - "name", - "url" - ], "properties": { "caFile": { "description": "CA bundle file to use when verifying HTTPS-enabled servers.", @@ -134,8 +130,7 @@ }, "name": { "description": "The repository name.", - "type": "string", - "minLength": 1 + "type": "string" }, "password": { "description": "Password for Basic HTTP authentication.", @@ -143,8 +138,7 @@ }, "url": { "description": "The repository URL.", - "type": "string", - "minLength": 1 + "type": "string" }, "username": { "description": "Username for Basic HTTP authentication.", diff --git a/pkg/crds/resources.yaml b/pkg/crds/resources.yaml index e8b53ae965..409e52d98c 100644 --- a/pkg/crds/resources.yaml +++ b/pkg/crds/resources.yaml @@ -104,21 +104,16 @@ spec: type: string name: description: The repository name. - minLength: 1 type: string password: description: Password for Basic HTTP authentication. type: string url: description: The repository URL. - minLength: 1 type: string username: description: Username for Basic HTTP authentication. type: string - required: - - name - - url type: object type: array type: object @@ -408,21 +403,16 @@ spec: type: string name: description: The repository name. - minLength: 1 type: string password: description: Password for Basic HTTP authentication. type: string url: description: The repository URL. - minLength: 1 type: string username: description: Username for Basic HTTP authentication. type: string - required: - - name - - url type: object type: array type: object From b4171f3fd5095c7f836aafaed05e29ddf8d605a2 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Fri, 11 Jul 2025 11:31:49 -0700 Subject: [PATCH 23/25] fix go version --- Makefile | 1 + go.mod | 2 +- go.sum | 4 ++-- kinds/go.mod | 4 +--- kinds/go.sum | 11 ++--------- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 9a03c1078f..f2da27d959 100644 --- a/Makefile +++ b/Makefile @@ -216,6 +216,7 @@ upgrade-release: check-env-EC_VERSION check-env-APP_VERSION .PHONY: go.mod go.mod: Makefile + (cd kinds && go get github.com/k0sproject/k0s@$(K0S_GO_VERSION) && go mod tidy) go get github.com/k0sproject/k0s@$(K0S_GO_VERSION) go mod tidy diff --git a/go.mod b/go.mod index 1c0fa2e89e..fbb898163b 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/gosimple/slug v1.15.0 github.com/jedib0t/go-pretty/v6 v6.6.7 - github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b + github.com/k0sproject/k0s v1.29.15-0.20250228103203-4f3a6d9a007a github.com/ohler55/ojg v1.26.8 github.com/onsi/ginkgo/v2 v2.23.4 github.com/onsi/gomega v1.37.0 diff --git a/go.sum b/go.sum index e3633b8109..6893e3a553 100644 --- a/go.sum +++ b/go.sum @@ -1236,8 +1236,8 @@ github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0sproject/dig v0.4.0 h1:yBxFUUxNXAMGBg6b7c6ypxdx/o3RmhoI5v5ABOw5tn0= github.com/k0sproject/dig v0.4.0/go.mod h1:rlZ7N7ZEcB4Fi96TPXkZ4dqyAiDWOGLapyL9YpZ7Qz4= -github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b h1:pE04QpLnpve7c+bOn4GmKu/j3IMhVBAAjvK6z7mW+FM= -github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b/go.mod h1:j0xCfV9a+hwiOOr3HJmZb1enwXz8cdkSGDzDRqKSdG0= +github.com/k0sproject/k0s v1.29.15-0.20250228103203-4f3a6d9a007a h1:HOG+Mvy9hYNGq2GNG76WWjmlOqjYU07lldIBn9T8ygM= +github.com/k0sproject/k0s v1.29.15-0.20250228103203-4f3a6d9a007a/go.mod h1:L+gguyba4gJJnn5vTylSKbrupLHDziaObjkWLan6KUM= github.com/k0sproject/version v0.6.0 h1:Wi8wu9j+H36+okIQA47o/YHbzNpKeIYj8IjGdJOdqsI= github.com/k0sproject/version v0.6.0/go.mod h1:5/7Js62gDCLBP6mEs0mUcYEEkYneM5qXDKN/hyFlQTM= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= diff --git a/kinds/go.mod b/kinds/go.mod index 9db6495dbe..fc09a05439 100644 --- a/kinds/go.mod +++ b/kinds/go.mod @@ -5,7 +5,7 @@ go 1.24.4 require ( github.com/google/uuid v1.6.0 github.com/k0sproject/dig v0.4.0 - github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b + github.com/k0sproject/k0s v1.29.15-0.20250228103203-4f3a6d9a007a github.com/stretchr/testify v1.10.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -36,8 +36,6 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/vishvananda/netlink v1.3.0 // indirect - github.com/vishvananda/netns v0.0.5 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect diff --git a/kinds/go.sum b/kinds/go.sum index 5a56eb7659..c5f2c28d40 100644 --- a/kinds/go.sum +++ b/kinds/go.sum @@ -34,8 +34,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/k0sproject/dig v0.4.0 h1:yBxFUUxNXAMGBg6b7c6ypxdx/o3RmhoI5v5ABOw5tn0= github.com/k0sproject/dig v0.4.0/go.mod h1:rlZ7N7ZEcB4Fi96TPXkZ4dqyAiDWOGLapyL9YpZ7Qz4= -github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b h1:pE04QpLnpve7c+bOn4GmKu/j3IMhVBAAjvK6z7mW+FM= -github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b/go.mod h1:j0xCfV9a+hwiOOr3HJmZb1enwXz8cdkSGDzDRqKSdG0= +github.com/k0sproject/k0s v1.29.15-0.20250228103203-4f3a6d9a007a h1:HOG+Mvy9hYNGq2GNG76WWjmlOqjYU07lldIBn9T8ygM= +github.com/k0sproject/k0s v1.29.15-0.20250228103203-4f3a6d9a007a/go.mod h1:L+gguyba4gJJnn5vTylSKbrupLHDziaObjkWLan6KUM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -73,11 +73,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/vishvananda/netlink v1.3.0 h1:X7l42GfcV4S6E4vHTsw48qbrV+9PVojNfIhZcwQdrZk= -github.com/vishvananda/netlink v1.3.0/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs= -github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= -github.com/vishvananda/netns v0.0.5 h1:DfiHV+j8bA32MFM7bfEunvT8IAqQ/NzSJHtcmW5zdEY= -github.com/vishvananda/netns v0.0.5/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -117,8 +112,6 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 9d311c034efc00c4e1acfb1e654c7492ad50e363 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Fri, 11 Jul 2025 11:40:49 -0700 Subject: [PATCH 24/25] fix no need for 1.29 to 1.29 backwards compatibility --- pkg/helpers/k0s_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/helpers/k0s_test.go b/pkg/helpers/k0s_test.go index fd548d036c..de02d1c429 100644 --- a/pkg/helpers/k0s_test.go +++ b/pkg/helpers/k0s_test.go @@ -33,10 +33,8 @@ func TestK0sClusterConfigTo129Compat(t *testing.T) { Version: "1.0.0", Values: "values", TargetNS: "targetns", - Timeout: k0sv1beta1.BackwardCompatibleDuration{ - Duration: time.Minute, - }, - Order: 1, + Timeout: time.Minute, // NOTE: this is not needed for 1.29 compat + Order: 1, }, }, }, From cb9a1fb2b4f8b6902a5f936943a14e540ad7e327 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Fri, 11 Jul 2025 11:52:31 -0700 Subject: [PATCH 25/25] fix no need for 1.29 to 1.29 backwards compatibility --- pkg/helpers/k0s_test.go | 68 ----------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 pkg/helpers/k0s_test.go diff --git a/pkg/helpers/k0s_test.go b/pkg/helpers/k0s_test.go deleted file mode 100644 index de02d1c429..0000000000 --- a/pkg/helpers/k0s_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package helpers - -import ( - "testing" - "time" - - k0sv1beta1 "github.com/k0sproject/k0s/pkg/apis/k0s/v1beta1" - "github.com/stretchr/testify/assert" -) - -func TestK0sClusterConfigTo129Compat(t *testing.T) { - type args struct { - clusterConfig *k0sv1beta1.ClusterConfig - } - - tests := []struct { - name string - args args - wantHelmCharts []interface{} - wantErr bool - }{ - { - name: "basic", - args: args{ - clusterConfig: &k0sv1beta1.ClusterConfig{ - Spec: &k0sv1beta1.ClusterSpec{ - Extensions: &k0sv1beta1.ClusterExtensions{ - Helm: &k0sv1beta1.HelmExtensions{ - Charts: []k0sv1beta1.Chart{ - { - Name: "chart", - ChartName: "chartname", - Version: "1.0.0", - Values: "values", - TargetNS: "targetns", - Timeout: time.Minute, // NOTE: this is not needed for 1.29 compat - Order: 1, - }, - }, - }, - }, - }, - }, - }, - wantHelmCharts: []interface{}{ - map[string]interface{}{ - "name": "chart", - "chartname": "chartname", - "version": "1.0.0", - "values": "values", - "namespace": "targetns", - "timeout": time.Minute, - "order": float64(1), - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := K0sClusterConfigTo129Compat(tt.args.clusterConfig) - if (err != nil) != tt.wantErr { - t.Errorf("clusterConfig129Compat() error = %v, wantErr %v", err, tt.wantErr) - return - } - assert.Equal(t, tt.wantHelmCharts, got.UnstructuredContent()["spec"].(map[string]interface{})["extensions"].(map[string]interface{})["helm"].(map[string]interface{})["charts"]) - }) - } -}