Skip to content

Commit

Permalink
Disable e2e talos 1.3 test because delete node times out
Browse files Browse the repository at this point in the history
  • Loading branch information
choffmeister committed May 8, 2023
1 parent 92a06d9 commit 993d8fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
kubernetes: 1.24.13
- talos: 1.2.9
kubernetes: 1.25.9
- talos: 1.3.7
kubernetes: 1.25.9
- talos: 1.3.7
kubernetes: 1.26.4
# - talos: 1.3.7
# kubernetes: 1.25.9
# - talos: 1.3.7
# kubernetes: 1.26.4
steps:
- uses: actions/setup-go@v2
with:
Expand Down
16 changes: 12 additions & 4 deletions internal/talos.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package internal

import (
"context"
_ "embed"
"fmt"
"net"
"os/exec"
"strings"
"time"

"github.com/airfocusio/hcloud-talos/internal/clients"
"github.com/airfocusio/hcloud-talos/internal/cluster"
Expand Down Expand Up @@ -98,7 +100,7 @@ func TalosKubeconfig(cl *cluster.Cluster, serverIP net.IP) (string, error) {
}

func TalosReset(cl *cluster.Cluster, serverIP net.IP) (string, error) {
return talosctlCmd(cl, "-n", serverIP.String(), "reset", "--system-labels-to-wipe", "STATE", "--system-labels-to-wipe", "EPHEMERAL")
return talosctlCmd(cl, "-n", serverIP.String(), "reset")
}

func TalosPatchFlannelDaemonSet(cl *cluster.Cluster, jsonPatch string) error {
Expand All @@ -115,15 +117,21 @@ func TalosPatchFlannelDaemonSet(cl *cluster.Cluster, jsonPatch string) error {

func talosctlCmd(cl *cluster.Cluster, args ...string) (string, error) {
fullArgs := append([]string{"--talosconfig", "talosconfig"}, args...)
return talosctlCmdRaw(cl.Dir, fullArgs...)
output, err := talosctlCmdRaw(cl.Dir, fullArgs...)
if err != nil {
return "", err
}
return output, nil
}

func talosctlCmdRaw(dir string, args ...string) (string, error) {
cmd := exec.Command(TalosctlBin, args...)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
cmd := exec.CommandContext(ctx, TalosctlBin, args...)
cmd.Dir = dir
output, err := cmd.CombinedOutput()
if err != nil {
return "", fmt.Errorf("talos command %s failed: %w\n%s", strings.Join(args, " "), err, output)
return string(output), fmt.Errorf("talos command %s failed: %w\n%s", strings.Join(args, " "), err, output)
}
return string(output), nil
}

0 comments on commit 993d8fe

Please sign in to comment.