Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump k0sctl to v0.15.5 #3432

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-west-1
TF_VERSION: 1.2.2
K0SCTL_VERSION: 0.13.2
K0SCTL_VERSION: 0.15.5
KUBECONFIG: ${{ github.workspace }}/kubeconfig

name: "K8s Network Conformance Testing"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ostests-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
k0sctl-version:
type: string
description: The k0sctl version to use when bootstrapping the test cluster.
default: 0.15.0 # k0sproject/k0sctl#495
default: 0.15.5
secrets:
aws-access-key-id:
description: The AWS access key ID to use when provisioning test resources.
Expand Down
1 change: 1 addition & 0 deletions hack/ostests/modules/os/os_alpine_3_17_userdata.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ rc-update add cgroups boot

# k0sctl currently doesn't support BusyBox/doas properly.
apk add coreutils sudo && apk del doas
apk add bash # Remove after https://github.com/k0sproject/rig/pull/94
echo 'alpine ALL=(ALL:ALL) NOPASSWD: ALL' >/etc/sudoers.d/alpine-all-access
15 changes: 12 additions & 3 deletions inttest/k0sctl/k0sctl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ import (
"net/http"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"sync"
"testing"

"github.com/stretchr/testify/suite"
"golang.org/x/exp/slices"
"sigs.k8s.io/yaml"

"github.com/k0sproject/k0s/inttest/common"
)

const k0sctlVersion = "v0.13.0"
const k0sctlVersion = "v0.15.5"

type K0sctlSuite struct {
common.FootlooseSuite
Expand Down Expand Up @@ -121,6 +123,7 @@ func (s *K0sctlSuite) k0sctlInitConfig() map[string]interface{} {
if err != nil {
s.FailNow("ssh connection failed", "%s", err)
}
ssh.Disconnect()
args := []string{"init", "--controller-count", fmt.Sprintf("%d", s.ControllerCount), "--key-path", ssh.KeyPath, "--user", ssh.User}
args = append(args, addresses...)
cmd := exec.Command("./k0sctl", args...)
Expand All @@ -139,9 +142,10 @@ func (s *K0sctlSuite) k0sctlApply(cfg map[string]interface{}) {
plain, err := yaml.Marshal(cfg)
s.Require().NoError(err)

cacheHome := s.T().TempDir()
s.T().Logf("Applying k0sctl config:\n%s", plain)
cmd := exec.Command("./k0sctl", "apply", "--config", "-")
cmd.Env = s.k0sctlEnv
cmd.Env = append(slices.Clone(s.k0sctlEnv), fmt.Sprintf("XDG_CACHE_HOME=%s", cacheHome))
cmd.Stdin = bytes.NewReader(plain)

stdout, err := cmd.StdoutPipe()
Expand Down Expand Up @@ -173,7 +177,12 @@ func (s *K0sctlSuite) k0sctlApply(cfg map[string]interface{}) {

err = cmd.Wait()
wg.Wait()
s.Require().NoError(err)
log, logErr := os.ReadFile(filepath.Join(cacheHome, "k0sctl", "k0sctl.log"))
if !s.NoError(logErr) {
log = []byte{}
}

s.Require().NoError(err, string(log))
}

func (s *K0sctlSuite) TestK0sGetsUp() {
Expand Down