mirror of
https://github.com/siderolabs/sidero.git
synced 2025-10-27 14:31:09 +01:00
This cluster has a single controlplane node just for the sake of testing with another cluster in place. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
29 lines
935 B
Go
29 lines
935 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package tests
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
|
|
|
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
|
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
|
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
|
)
|
|
|
|
const (
|
|
managementClusterName = "management-cluster"
|
|
managementClusterLBPort = 10000
|
|
)
|
|
|
|
// TestManagementCluster deploys the management cluster via CAPI.
|
|
func TestManagementCluster(ctx context.Context, metalClient client.Client, cluster talos.Cluster, vmSet *vm.Set, capiManager *capi.Manager) TestFunc {
|
|
return func(t *testing.T) {
|
|
deployCluster(ctx, t, metalClient, cluster, vmSet, capiManager, managementClusterName, defaultServerClassName, managementClusterLBPort, 1, 1)
|
|
}
|
|
}
|