github.com/solo-io/service-mesh-hub@v0.9.2/test/data/virtual_meshes.go (about) 1 package data 2 3 import ( 4 "github.com/solo-io/service-mesh-hub/pkg/api/networking.smh.solo.io/v1alpha2" 5 v1 "github.com/solo-io/skv2/pkg/api/core.skv2.solo.io/v1" 6 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 7 ) 8 9 func SelfSignedVirtualMesh(name, namespace string, meshes []*v1.ObjectRef) *v1alpha2.VirtualMesh { 10 return &v1alpha2.VirtualMesh{ 11 ObjectMeta: metav1.ObjectMeta{ 12 Name: name, 13 Namespace: namespace, 14 }, 15 TypeMeta: metav1.TypeMeta{ 16 Kind: "VirtualMesh", 17 APIVersion: v1alpha2.SchemeGroupVersion.String(), 18 }, 19 Spec: v1alpha2.VirtualMeshSpec{ 20 Meshes: meshes, 21 MtlsConfig: &v1alpha2.VirtualMeshSpec_MTLSConfig{ 22 TrustModel: &v1alpha2.VirtualMeshSpec_MTLSConfig_Shared{Shared: &v1alpha2.VirtualMeshSpec_MTLSConfig_SharedTrust{ 23 RootCertificateAuthority: &v1alpha2.VirtualMeshSpec_RootCertificateAuthority{ 24 CaSource: &v1alpha2.VirtualMeshSpec_RootCertificateAuthority_Generated{ 25 Generated: &v1alpha2.VirtualMeshSpec_RootCertificateAuthority_SelfSignedCert{}, 26 }, 27 }, 28 }}, 29 AutoRestartPods: true, 30 }, 31 Federation: &v1alpha2.VirtualMeshSpec_Federation{}, 32 }, 33 } 34 }