-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(support-bundle): add runHostCollectorsInPod as host remote suppo…
…rt bundle for kots (#1307) * feat(support-bundle): add runHostCollectorsInPod as host remote support bundle for kots * fix merge conflict * fix build fail * upgrade troubleshoot version * add kotsadm label * go tidy * add e2e test * reorder * add host spec restore * add createHostSupportBundle for upgrade * add e2e test * fix upgrade fail in test * fix test * fix restore test fail * reorder check support bundle spec * test resetore * use label to backup * license not licenseFile * fix support bundle spec missing apiVersion * test build * fix dependency * without some C dependencies * without some C dependencies for all go build * without some C dependencies for go vet * test * fix go vet fail * fix go vet fail * fix go lint fail * fix go test fail * fix go vet fail * fix go lint issue --------- Co-authored-by: Ethan Mosbaugh <ethan@replicated.com>
- Loading branch information
Showing
14 changed files
with
1,231 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package e2e | ||
|
||
import ( | ||
"testing" | ||
"time" | ||
|
||
"github.com/replicatedhq/embedded-cluster/e2e/cluster/docker" | ||
) | ||
|
||
func TestHostCollectSupportBundleInCluster(t *testing.T) { | ||
t.Parallel() | ||
|
||
RequireEnvVars(t, []string{"SHORT_SHA"}) | ||
|
||
tc := docker.NewCluster(&docker.ClusterInput{ | ||
T: t, | ||
Nodes: 1, | ||
Distro: "debian-bookworm", | ||
LicensePath: "license.yaml", | ||
ECBinaryPath: "../output/bin/embedded-cluster", | ||
}) | ||
defer tc.Cleanup() | ||
|
||
t.Logf("%s: installing embedded-cluster on node 0", time.Now().Format(time.RFC3339)) | ||
line := []string{"single-node-install.sh", "cli"} | ||
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil { | ||
t.Fatalf("fail to install embedded-cluster: %v: %s: %s", err, stdout, stderr) | ||
} | ||
|
||
line = []string{"collect-support-bundle-host-in-cluster.sh"} | ||
stdout, stderr, err := tc.RunCommandOnNode(0, line) | ||
if err != nil { | ||
t.Fatalf("fail to collect host support bundle: %v: %s: %s", err, stdout, stderr) | ||
} | ||
|
||
t.Logf("%s: test complete", time.Now().Format(time.RFC3339)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
set -euox pipefail | ||
|
||
DIR=/usr/local/bin | ||
. $DIR/common.sh | ||
|
||
main() { | ||
if ! kubectl get cm -n kotsadm embedded-cluster-host-support-bundle -o yaml ; then | ||
echo "Failed to get configmap of remote host support bundle spec for kotsadm" | ||
return 1 | ||
fi | ||
} | ||
|
||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.