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

Remove difficult label from e2e-mc / Rename upgrade tests to -ci #2625

Merged
merged 3 commits into from
Jul 10, 2024
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
16 changes: 10 additions & 6 deletions dev/remove-fleet
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ ctx=$(kubectl config current-context)

kubectl config use-context "$upstream_ctx"

# Remove controllers
helm uninstall -n cattle-fleet-system fleet

# Remove finalizers, this will prevent deletion of namespace fleet-local from hanging
for res in gitrepos.fleet.cattle.io bundledeployments.fleet.cattle.io bundles.fleet.cattle.io; do
kubectl get "$res" -A --no-headers | while read ns name _; do kubectl patch "$res" -n "$ns" "$name" -p '{"metadata":{"finalizers":[]}}' --type=merge; done
done

helm uninstall -n cattle-fleet-system fleet-crd

# make sure crds are removed
kubectl delete crd gitrepos.fleet.cattle.io bundledeployments.fleet.cattle.io bundles.fleet.cattle.io

kubectl delete ns cattle-fleet-system --now
kubectl delete ns cattle-fleet-clusters-system --now

# This will prevent deletion of namespace fleet-local from hanging
bd_ns=$(kubectl get ns -l fleet.cattle.io/managed=true --no-headers -o=jsonpath={.items[0].metadata.name})
kubectl patch bundledeployment fleet-agent-local -n $bd_ns -p '{"metadata":{"finalizers":[]}}' --type=merge
kubectl patch bundle fleet-agent-local -n fleet-local -p '{"metadata":{"finalizers":[]}}' --type=merge

kubectl delete ns fleet-local --now
kubectl delete ns -l "fleet.cattle.io/managed=true"

Expand All @@ -31,4 +36,3 @@ helm uninstall -n cattle-fleet-system fleet-agent
kubectl delete ns cattle-fleet-system --now

kubectl config use-context "$ctx"

4 changes: 3 additions & 1 deletion e2e/multi-cluster/bundle_namespace_mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import (
"github.com/rancher/fleet/e2e/testenv/kubectl"
)

var _ = Describe("Bundle Namespace Mapping", Label("difficult"), func() {
// This test uses two clusters to demonstrate matching clusters in different
// namespaces. Therefore it's setup and input configuration is difficult.
var _ = Describe("Bundle Namespace Mapping", func() {
var (
k kubectl.Command
kd kubectl.Command
Expand Down
2 changes: 1 addition & 1 deletion e2e/multi-cluster/depends_on_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1"
)

var _ = Describe("Bundle Depends On", Label("difficult"), func() {
var _ = Describe("Bundle Depends On", func() {
var (
k kubectl.Command

Expand Down
3 changes: 2 additions & 1 deletion internal/cmd/cli/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ func Dir(ctx context.Context, client Getter, name, baseDir string, opts *Options
if opts == nil {
opts = &Options{}
}
// the bundleID is a valid helm release name, it's used as a default if a release name is not specified in helm options
// The bundleID is a valid helm release name, it's used as a default if a release name is not specified in helm options.
// It's also used to create the bundle name.
bundleID := filepath.Join(name, baseDir)
bundleID = name2.HelmReleaseName(bundleID)

Expand Down
Loading