Skip to content

Commit

Permalink
EC v2 to v2 upgrades (#5060)
Browse files Browse the repository at this point in the history
* EC v2 to v2 upgrades
  • Loading branch information
sgalsaleh authored Dec 19, 2024
1 parent 0b5c8e4 commit 8338617
Show file tree
Hide file tree
Showing 48 changed files with 2,398 additions and 232 deletions.
4 changes: 2 additions & 2 deletions cmd/imagedeps/tag-finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sort"
"strings"

semver "github.com/Masterminds/semver/v3"
"github.com/Masterminds/semver"
"github.com/google/go-github/v39/github"
"github.com/heroku/docker-registry-client/registry"
"golang.org/x/oauth2"
Expand Down Expand Up @@ -183,7 +183,7 @@ func getLatestTagFromRegistry(imageUri string, getTags getTagsFn, match filterFn
if match(tag) {
v, err := semver.NewVersion(tag)
if err != nil {
return "", err
return "", fmt.Errorf("parse semver %q: %w", tag, err)
}
versions = append(versions, v)
}
Expand Down
6 changes: 4 additions & 2 deletions dev/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ function ec_patch() {
}

function ec_build_and_load() {
force=$2

# Build the image
if docker images | grep -q "$(image $1)"; then
if [ -z "$force" ] && docker images | grep -q "$(image $1)"; then
echo "$(image $1) image already exists, skipping build..."
else
echo "Building $1..."
Expand All @@ -104,7 +106,7 @@ function ec_build_and_load() {
fi

# Load the image into the embedded cluster
if docker exec $(ec_node) k0s ctr images ls | grep -q "$(image $1)"; then
if [ -z "$force" ] && docker exec $(ec_node) k0s ctr images ls | grep -q "$(image $1)"; then
echo "$(image $1) image already loaded in embedded cluster, skipping import..."
else
echo "Loading "$(image $1)" image into embedded cluster..."
Expand Down
2 changes: 1 addition & 1 deletion dev/scripts/up-ec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ec_build_and_load "$component"

# Use the dev image for kotsadm migrations
if [ "$component" == "kotsadm" ]; then
ec_build_and_load "kotsadm-migrations"
ec_build_and_load "kotsadm-migrations" true
fi

# The kotsadm dev image does not have a web component, and kotsadm-web service does not exist in embedded cluster.
Expand Down
50 changes: 27 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
module github.com/replicatedhq/kots

go 1.23.0
go 1.23.2

toolchain go1.23.4

require (
cloud.google.com/go/storage v1.45.0
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
github.com/Azure/go-autorest/autorest v0.11.29
github.com/Azure/go-autorest/autorest/adal v0.9.24
github.com/Masterminds/semver v1.5.0
github.com/Masterminds/semver/v3 v3.3.0
github.com/Masterminds/semver/v3 v3.3.1
github.com/Masterminds/sprig/v3 v3.3.0
github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412
github.com/aws/aws-sdk-go v1.55.5
Expand Down Expand Up @@ -39,8 +41,8 @@ require (
github.com/mholt/archiver/v3 v3.5.1
github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a
github.com/mitchellh/hashstructure v1.1.0
github.com/onsi/ginkgo/v2 v2.20.2
github.com/onsi/gomega v1.34.2
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.36.1
github.com/open-policy-agent/opa v0.68.0
github.com/opencontainers/image-spec v1.1.0
github.com/ory/dockertest/v3 v3.10.0
Expand All @@ -49,7 +51,7 @@ require (
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
github.com/replicatedhq/embedded-cluster/kinds v1.15.0
github.com/replicatedhq/embedded-cluster/kinds v1.15.1-0.20241217212717-16e5694e39aa
github.com/replicatedhq/kotskinds v0.0.0-20240718194123-1018dd404e95
github.com/replicatedhq/kurlkinds v1.5.0
github.com/replicatedhq/troubleshoot v0.107.5
Expand All @@ -63,7 +65,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
github.com/tj/go-spin v1.1.0
github.com/vmware-tanzu/velero v1.14.1
go.uber.org/multierr v1.11.0
Expand All @@ -76,19 +78,19 @@ require (
gopkg.in/ini.v1 v1.67.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.16.2
k8s.io/api v0.31.2
k8s.io/apimachinery v0.31.2
helm.sh/helm/v3 v3.16.3
k8s.io/api v0.31.3
k8s.io/apimachinery v0.31.3
k8s.io/cli-runtime v0.31.2
k8s.io/client-go v0.31.2
k8s.io/client-go v0.31.3
k8s.io/cluster-bootstrap v0.31.2
k8s.io/helm v2.17.0+incompatible
k8s.io/kubelet v0.31.2
k8s.io/metrics v0.31.2
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6
oras.land/oras-go/v2 v2.5.0
sigs.k8s.io/application v0.8.3
sigs.k8s.io/controller-runtime v0.19.1
sigs.k8s.io/controller-runtime v0.19.3
sigs.k8s.io/kustomize/api v0.18.0
sigs.k8s.io/kustomize/kyaml v0.18.1
sigs.k8s.io/yaml v1.4.0
Expand Down Expand Up @@ -148,16 +150,16 @@ require (
github.com/chzyer/readline v1.5.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/cgroups/v3 v3.0.3 // indirect
github.com/containerd/containerd v1.7.21 // indirect
github.com/containerd/containerd v1.7.23 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
github.com/containerd/errdefs v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
github.com/containers/ocicrypt v1.2.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cyberphone/json-canonicalization v0.0.0-20231217050601-ba74d44ecf5f // indirect
github.com/cyphar/filepath-securejoin v0.3.1 // indirect
github.com/cyphar/filepath-securejoin v0.3.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/docker/cli v27.1.1+incompatible // indirect
Expand Down Expand Up @@ -214,7 +216,7 @@ require (
github.com/google/go-intervals v0.0.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
Expand Down Expand Up @@ -249,7 +251,7 @@ require (
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/k0sproject/k0s v1.29.9-0.20240821114611-d76eb6bb05a7 // indirect
github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
Expand Down Expand Up @@ -364,13 +366,13 @@ require (
go.opentelemetry.io/otel/trace v1.31.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/genproto v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
Expand All @@ -379,9 +381,9 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/apiextensions-apiserver v0.31.2 // indirect
k8s.io/apiserver v0.31.2 // indirect
k8s.io/component-base v0.31.2 // indirect
k8s.io/apiextensions-apiserver v0.31.3 // indirect
k8s.io/apiserver v0.31.3 // indirect
k8s.io/component-base v0.31.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f // indirect
k8s.io/kubectl v0.31.1 // indirect
Expand Down Expand Up @@ -422,6 +424,8 @@ require (
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/tchap/go-patricia/v2 v2.3.1 // 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
go.opentelemetry.io/contrib/bridges/prometheus v0.54.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.29.0 // indirect
Expand Down
Loading

0 comments on commit 8338617

Please sign in to comment.