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: diff --git a/Makefile b/Makefile index 01a72e6e22..f2da27d959 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.31.8+k0s.0 -K0S_GO_VERSION = v1.31.8+k0s.0 -PREVIOUS_K0S_VERSION ?= v1.30.9+k0s.0 -PREVIOUS_K0S_GO_VERSION ?= v1.30.9+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 = TROUBLESHOOT_VERSION = v0.120.3 @@ -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 22ffc4f9fd..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.31.9-0.20250428141639-26a9908cf691 + 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 7f4957ad92..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.31.9-0.20250428141639-26a9908cf691 h1:/w7R/XMauHygKj7I2Y1dLkPbmXTsxO1mCQxqomDIoMk= -github.com/k0sproject/k0s v1.31.9-0.20250428141639-26a9908cf691/go.mod h1:1aXYSUq/BOQvhIhjeQX9AQs2Yk/kthQh/E1r2rtMcCs= +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= 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 730a493b9d..8dfa33fdc5 100644 --- a/operator/charts/embedded-cluster-operator/charts/crds/templates/resources.yaml +++ b/operator/charts/embedded-cluster-operator/charts/crds/templates/resources.yaml @@ -111,21 +111,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 @@ -428,21 +423,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 0d8b335c43..d5eb227759 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 490262158e..c7bc2ce222 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/config/crd/bases/embeddedcluster.replicated.com_kubernetesinstallations.yaml b/operator/config/crd/bases/embeddedcluster.replicated.com_kubernetesinstallations.yaml index bead7882c7..da248c554e 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/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.", 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/config/static/metadata.yaml b/pkg/config/static/metadata.yaml index 1052aac806..96dd560a1b 100644 --- a/pkg/config/static/metadata.yaml +++ b/pkg/config/static/metadata.yaml @@ -34,8 +34,8 @@ images: kube-proxy: repo: proxy.replicated.com/anonymous/registry.k8s.io/kube-proxy tag: - amd64: v1.31.9-amd64@sha256:a23b69e0843a51719cf652717bf3b2b1f29a635543e668cfec43d228f1e538f9 - arm64: v1.31.9-arm64@sha256:40c69fe60d36ed579ad7363dcf095cdc57e041a4152ba96591243b11f74e7cd9 + amd64: v1.29.15-amd64@sha256:f6074f465fb3700456dccc5915340df4b59a7960c591693182fbd297cbe72b53 + arm64: v1.29.15-arm64@sha256:7e55d1d0d2c095cecd55022878b8e64d88176157c6ed49a89e2ced129d26465e metrics-server: repo: proxy.replicated.com/anonymous/replicated/ec-metrics-server tag: diff --git a/pkg/crds/resources.yaml b/pkg/crds/resources.yaml index 730a493b9d..8dfa33fdc5 100644 --- a/pkg/crds/resources.yaml +++ b/pkg/crds/resources.yaml @@ -111,21 +111,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 @@ -428,21 +423,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/pkg/helpers/k0s_test.go b/pkg/helpers/k0s_test.go deleted file mode 100644 index fd548d036c..0000000000 --- a/pkg/helpers/k0s_test.go +++ /dev/null @@ -1,70 +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: k0sv1beta1.BackwardCompatibleDuration{ - Duration: time.Minute, - }, - 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"]) - }) - } -}