Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into k0s-1-29
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Nov 4, 2024
2 parents 24ee05f + f5a887b commit 7d5c69c
Show file tree
Hide file tree
Showing 77 changed files with 1,735 additions and 367 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ jobs:
run: |
make unit-tests
dryrun-tests:
name: Dryrun tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: "**/*.sum"
- name: Dryrun tests
run: |
make dryrun-tests
check-operator-crds:
name: Check operator CRDs
runs-on: ubuntu-latest
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@ static: pkg/goods/bins/k0s \
pkg/goods/bins/fio \
pkg/goods/internal/bins/kubectl-kots

.PHONY: static-dryrun
static-dryrun:
@mkdir -p pkg/goods/bins pkg/goods/internal/bins
@touch pkg/goods/bins/k0s \
pkg/goods/bins/kubectl-preflight \
pkg/goods/bins/kubectl-support_bundle \
pkg/goods/bins/local-artifact-mirror \
pkg/goods/bins/fio \
pkg/goods/internal/bins/kubectl-kots

.PHONY: embedded-cluster-linux-amd64
embedded-cluster-linux-amd64: export OS = linux
embedded-cluster-linux-amd64: export ARCH = amd64
Expand Down Expand Up @@ -250,6 +260,10 @@ e2e-tests: embedded-release
e2e-test:
go test -timeout 60m -ldflags="$(LD_FLAGS)" -v ./e2e -run ^$(TEST_NAME)$$

.PHONY: dryrun-tests
dryrun-tests: static-dryrun
@./scripts/dryrun-tests.sh

.PHONY: build-ttl.sh
build-ttl.sh:
$(MAKE) -C local-artifact-mirror build-ttl.sh \
Expand Down
23 changes: 3 additions & 20 deletions cmd/embedded-cluster/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ package main

import (
"context"
"fmt"
"os"
"os/signal"
"path"
"syscall"

"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"

"github.com/replicatedhq/embedded-cluster/pkg/cmd"
"github.com/replicatedhq/embedded-cluster/pkg/logging"
)

Expand All @@ -22,25 +21,9 @@ func main() {
)
defer cancel()
logging.SetupLogging()

name := path.Base(os.Args[0])
var app = &cli.App{
Name: name,
Usage: fmt.Sprintf("Install and manage %s", name),
Suggest: true,
Commands: []*cli.Command{
installCommand(),
shellCommand(),
nodeCommands,
versionCommand,
joinCommand,
resetCommand(),
materializeCommand(),
updateCommand(),
restoreCommand(),
adminConsoleCommand(),
supportBundleCommand(),
},
}
app := cmd.NewApp(name)
if err := app.RunContext(ctx, os.Args); err != nil {
logrus.Fatal(err)
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/local-artifact-mirror/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"time"

ecv1beta1 "github.com/replicatedhq/embedded-cluster/kinds/apis/v1beta1"
cmdutil "github.com/replicatedhq/embedded-cluster/pkg/cmd/util"
"github.com/replicatedhq/embedded-cluster/pkg/defaults"
"github.com/urfave/cli/v2"
k8snet "k8s.io/utils/net"
Expand Down Expand Up @@ -53,7 +54,7 @@ var serveCommand = &cli.Command{
provider = defaults.NewProvider(c.String("data-dir"))
} else {
var err error
provider, err = defaults.NewProviderFromFilesystem()
provider, err = cmdutil.NewProviderFromFilesystem()
if err != nil {
panic(fmt.Errorf("unable to get provider from filesystem: %w", err))
}
Expand Down
3 changes: 3 additions & 0 deletions e2e/cluster/docker/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ func (c *Cluster) WaitForReady() {
func (c *Cluster) Cleanup(envs ...map[string]string) {
c.generateSupportBundle(envs...)
c.copyPlaywrightReport()
c.Destroy()
}

func (c *Cluster) Destroy() {
for _, node := range c.Nodes {
node.Destroy()
}
Expand Down
42 changes: 21 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/apparentlymart/go-cidr v1.1.0
github.com/aws/aws-sdk-go v1.55.5
github.com/aws/aws-sdk-go-v2 v1.32.2
github.com/aws/aws-sdk-go-v2/config v1.28.0
github.com/aws/aws-sdk-go-v2/credentials v1.17.41
github.com/aws/aws-sdk-go-v2/service/s3 v1.66.1
github.com/aws/aws-sdk-go-v2 v1.32.3
github.com/aws/aws-sdk-go-v2/config v1.28.1
github.com/aws/aws-sdk-go-v2/credentials v1.17.42
github.com/aws/aws-sdk-go-v2/service/s3 v1.66.2
github.com/bombsimon/logrusr/v4 v4.1.0
github.com/canonical/lxd v0.0.0-20241030172432-dee0d04b56ee
github.com/containers/image/v5 v5.32.2
github.com/coreos/go-systemd/v22 v22.5.0
github.com/creack/pty v1.1.23
github.com/creack/pty v1.1.24
github.com/distribution/reference v0.6.0
github.com/evanphx/json-patch v5.9.0+incompatible
github.com/fatih/color v1.18.0
Expand All @@ -25,13 +25,13 @@ require (
github.com/jedib0t/go-pretty/v6 v6.6.1
github.com/k0sproject/dig v0.2.0
github.com/k0sproject/k0s v1.30.6-0.20240930094415-0fb1b4751cf8
github.com/ohler55/ojg v1.24.1
github.com/onsi/ginkgo/v2 v2.20.2
github.com/onsi/gomega v1.34.2
github.com/ohler55/ojg v1.25.0
github.com/onsi/ginkgo/v2 v2.21.0
github.com/onsi/gomega v1.35.1
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-20240814191029-3f677ee409a0
github.com/replicatedhq/troubleshoot v0.107.4
github.com/replicatedhq/troubleshoot v0.107.5
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
Expand Down Expand Up @@ -78,18 +78,18 @@ require (
github.com/ahmetalpbalkan/go-cursor v0.0.0-20131010032410-8136607ea412 // indirect
github.com/andybalholm/brotli v1.0.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 // indirect
github.com/aws/smithy-go v1.22.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
Expand Down Expand Up @@ -142,7 +142,7 @@ require (
github.com/google/go-containerregistry v0.20.0 // indirect
github.com/google/go-intervals v0.0.2 // indirect
github.com/google/go-querystring v1.1.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.7 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
Expand Down Expand Up @@ -267,7 +267,7 @@ require (
k8s.io/apiserver v0.31.2 // indirect
k8s.io/cli-runtime v0.31.2 // indirect
k8s.io/component-base v0.31.2 // indirect
k8s.io/kubelet v0.31.1 // indirect
k8s.io/kubelet v0.31.2 // indirect
k8s.io/metrics v0.31.2 // indirect
oras.land/oras-go v1.2.6 // indirect
periph.io/x/host/v3 v3.8.2 // indirect
Expand Down
Loading

0 comments on commit 7d5c69c

Please sign in to comment.