Documentation ¶
Index ¶
- Constants
- func AddNodesForCluster(kubeClient *kubernetes.Clientset, ...)
- func BuildAndCreateTestClusterset(mgmtAmkoClient *akov1.Clientset)
- func BuildAndCreateTestKubeConfig(k8sClient1, k8sClient2, mgmtClient *kubernetes.Clientset)
- func BuildTestNamespace(name string) *corev1.Namespace
- func BuildTestTenantSecretObj(kubeCfgData []byte) *corev1.Secret
- func CreateTestNamespacesInMemberClusters(k8sClient1 *kubernetes.Clientset, k8sClient2 *kubernetes.Clientset)
- func IsServiceImportExpected(ctx context.Context, mgmtClient *akov1.Clientset, svc *corev1.Service, ...) string
- func UpdateTestSvcPort(ctx context.Context, k8sClient *kubernetes.Clientset, ns, svcName string, ...)
- func UpdateTestSvcType(ctx context.Context, k8sClient *kubernetes.Clientset, ns, svcName string, ...)
- func VerifyServiceImport(ctx context.Context, cname string, mgmtClient *akov1.Clientset, ...)
- func VerifyServiceImportNotExists(ctx context.Context, cname string, mgmtClient *akov1.Clientset, ...)
- type ClusterData
- type ClusterServerData
- type ClustersKubeConfig
- type ContextData
- type KubeContextData
- type UserData
- type UserID
Constants ¶
View Source
const ( MemberCluster1 = "cluster1" MemberCluster2 = "cluster2" TestGSLBSecret = "gslb-config-secret" TestMemberClusterSecret = "tenant-clusters-secret" AMKOCRDs = "../../helm/amko/crds" TestClustersetName = "test-clusterset" )
View Source
const ( Cluster1TestSvc = "cluster1-svc1" Cluster1TestNS = "blue" Cluster1TestSvcPort = 80 Cluster1TestNodePort = 31000 Cluster1TestSvc2 = "cluster1-svc2" Cluster1TestNS2 = "red" Cluster1TestSvcPort2 = 443 Cluster1TestNodePort2 = 31001 Cluster1Node1 = "10.10.10.10" Cluster1Node2 = "10.10.10.11" Cluster1Node1Name = "cluster1-node1" Cluster1Node2Name = "cluster2-node2" )
member cluster 1's constants:
View Source
const ( Cluster2TestSvc = "cluster2-svc1" Cluster2TestSvcPort = 90 Cluster2TestNS = "green" Cluster2TestNodePort = 32000 Cluster2TestSvc2 = "cluster2-svc2" Cluster2TestNS2 = "yellow" Cluster2TestSvcPort2 = 8443 Cluster2TestNodePort2 = 32001 Cluster2Node1 = "10.10.20.10" Cluster2Node2 = "10.10.20.11" Cluster2Node1Name = "cluster2-node1" Cluster2Node2Name = "cluster2-node2" )
member cluster 2's constants:
View Source
const KubeConfigData = `
apiVersion: v1
clusters: []
contexts: []
kind: Config
preferences: {}
users: []
`
Variables ¶
This section is empty.
Functions ¶
func AddNodesForCluster ¶
func AddNodesForCluster(kubeClient *kubernetes.Clientset, node1IP, node2IP, node1Name, node2Name string)
func BuildAndCreateTestKubeConfig ¶
func BuildAndCreateTestKubeConfig(k8sClient1, k8sClient2, mgmtClient *kubernetes.Clientset)
func BuildTestNamespace ¶
func CreateTestNamespacesInMemberClusters ¶
func CreateTestNamespacesInMemberClusters(k8sClient1 *kubernetes.Clientset, k8sClient2 *kubernetes.Clientset)
func IsServiceImportExpected ¶
func UpdateTestSvcPort ¶
func UpdateTestSvcType ¶
func VerifyServiceImport ¶
func VerifyServiceImport(ctx context.Context, cname string, mgmtClient *akov1.Clientset, obj *corev1.Service, kubeClient *kubernetes.Clientset, newMCIObj *akovmwarecomv1alpha1.MultiClusterIngress, nodes []string, excludePorts []int32)
Types ¶
type ClusterData ¶
type ClusterData struct { Cluster ClusterServerData `yaml:"cluster"` Name string `yaml:"name"` }
type ClusterServerData ¶
type ClustersKubeConfig ¶
type ClustersKubeConfig struct { APIVersion string `yaml:"apiVersion"` Clusters []ClusterData `yaml:"clusters"` Contexts []KubeContextData `yaml:"contexts"` Kind string `yaml:"kind"` Users []UserData `yaml:"users"` }
type ContextData ¶
type KubeContextData ¶
type KubeContextData struct { Context ContextData `yaml:"context"` Name string `yaml:"name"` }
Click to show internal directories.
Click to hide internal directories.