forked from aws/eks-anywhere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
certmanager.go
44 lines (38 loc) · 1.37 KB
/
certmanager.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//go:build e2e
// +build e2e
package e2e
import (
"fmt"
"path/filepath"
"time"
"github.com/aws/eks-anywhere/pkg/kubeconfig"
"github.com/aws/eks-anywhere/pkg/types"
"github.com/aws/eks-anywhere/test/framework"
)
const (
cmPackageName = "cert-manager"
)
func runCertManagerRemoteClusterInstallSimpleFlow(test *framework.MulticlusterE2ETest) {
test.CreateManagementClusterWithConfig()
test.RunInWorkloadClusters(func(e *framework.WorkloadCluster) {
e.GenerateClusterConfig()
e.CreateCluster()
e.VerifyPackageControllerNotInstalled()
test.ManagementCluster.SetPackageBundleActive()
packageName := "cert-manager"
packagePrefix := "test"
packageFile := e.BuildPackageConfigFile(packageName, packagePrefix, EksaPackagesNamespace)
test.ManagementCluster.InstallCuratedPackageFile(packageFile, kubeconfig.FromClusterName(test.ManagementCluster.ClusterName))
e.VerifyCertManagerPackageInstalled(packagePrefix, EksaPackagesNamespace, cmPackageName, withMgmtClusterSetup(test.ManagementCluster))
e.DeleteCluster()
})
time.Sleep(5 * time.Minute)
test.DeleteManagementCluster()
}
func withMgmtClusterSetup(cluster *framework.ClusterE2ETest) *types.Cluster {
return &types.Cluster{
Name: cluster.ClusterName,
KubeconfigFile: filepath.Join(cluster.ClusterName, fmt.Sprintf("%s-eks-a-cluster.kubeconfig", cluster.ClusterName)),
ExistingManagement: true,
}
}