Documentation ¶
Overview ¶
Package catalog is a generated GoMock package.
Package catalog implements the MeshCataloger interface, which forms the central component in OSM that transforms outputs from all other components (SMI policies, Kubernetes services, endpoints etc.) into configuration that is consumed by the the proxy control plane component to program sidecar proxies. Reference: https://github.com/openservicemesh/osm/blob/main/DESIGN.md#5-mesh-catalog
Index ¶
- Variables
- func GetPodFromCertificate(cn certificate.CommonName, kubecontroller k8s.Controller) (*v1.Pod, error)
- func GetServiceAccountFromProxyCertificate(cn certificate.CommonName) (service.K8sServiceAccount, error)
- func NewCertCommonNameWithProxyID(proxyUUID uuid.UUID, serviceAccount, namespace string) certificate.CommonName
- type MeshCatalog
- func (mc *MeshCatalog) ExpectProxy(cn certificate.CommonName)
- func (mc *MeshCatalog) GetIngressPoliciesForService(svc service.MeshService) ([]*trafficpolicy.InboundTrafficPolicy, error)
- func (mc *MeshCatalog) GetPortToProtocolMappingForService(svc service.MeshService) (map[uint32]string, error)
- func (mc *MeshCatalog) GetResolvableServiceEndpoints(svc service.MeshService) ([]endpoint.Endpoint, error)
- func (mc *MeshCatalog) GetSMISpec() smi.MeshSpec
- func (mc *MeshCatalog) GetServicesForServiceAccount(sa service.K8sServiceAccount) ([]service.MeshService, error)
- func (mc *MeshCatalog) GetServicesFromEnvoyCertificate(cn certificate.CommonName) ([]service.MeshService, error)
- func (mc *MeshCatalog) GetTargetPortToProtocolMappingForService(svc service.MeshService) (map[uint32]string, error)
- func (mc *MeshCatalog) ListAllowedEndpointsForService(downstreamIdentity service.K8sServiceAccount, upstreamSvc service.MeshService) ([]endpoint.Endpoint, error)
- func (mc *MeshCatalog) ListAllowedInboundServiceAccounts(upstream service.K8sServiceAccount) ([]service.K8sServiceAccount, error)
- func (mc *MeshCatalog) ListAllowedOutboundServiceAccounts(downstream service.K8sServiceAccount) ([]service.K8sServiceAccount, error)
- func (mc *MeshCatalog) ListAllowedOutboundServicesForIdentity(identity service.K8sServiceAccount) []service.MeshService
- func (mc *MeshCatalog) ListConnectedProxies() map[certificate.CommonName]*envoy.Proxy
- func (mc *MeshCatalog) ListDisconnectedProxies() map[certificate.CommonName]time.Time
- func (mc *MeshCatalog) ListEndpointsForService(svc service.MeshService) ([]endpoint.Endpoint, error)
- func (mc *MeshCatalog) ListExpectedProxies() map[certificate.CommonName]time.Time
- func (mc *MeshCatalog) ListInboundTrafficPolicies(upstreamIdentity service.K8sServiceAccount, ...) []*trafficpolicy.InboundTrafficPolicy
- func (mc *MeshCatalog) ListInboundTrafficTargetsWithRoutes(upstream service.K8sServiceAccount) ([]trafficpolicy.TrafficTargetWithRoutes, error)
- func (mc *MeshCatalog) ListMonitoredNamespaces() []string
- func (mc *MeshCatalog) ListOutboundTrafficPolicies(downstreamIdentity service.K8sServiceAccount) []*trafficpolicy.OutboundTrafficPolicy
- func (mc *MeshCatalog) ListSMIPolicies() ([]*split.TrafficSplit, []service.K8sServiceAccount, []*spec.HTTPRouteGroup, ...)
- func (mc *MeshCatalog) ListServiceAccountsForService(svc service.MeshService) ([]service.K8sServiceAccount, error)
- func (mc *MeshCatalog) RegisterProxy(proxy *envoy.Proxy)
- func (mc *MeshCatalog) UnregisterProxy(p *envoy.Proxy)
- type MeshCataloger
- type MockMeshCataloger
- func (m *MockMeshCataloger) EXPECT() *MockMeshCatalogerMockRecorder
- func (m *MockMeshCataloger) ExpectProxy(arg0 certificate.CommonName)
- func (m *MockMeshCataloger) GetIngressPoliciesForService(arg0 service.MeshService) ([]*trafficpolicy.InboundTrafficPolicy, error)
- func (m *MockMeshCataloger) GetPortToProtocolMappingForService(arg0 service.MeshService) (map[uint32]string, error)
- func (m *MockMeshCataloger) GetResolvableServiceEndpoints(arg0 service.MeshService) ([]endpoint.Endpoint, error)
- func (m *MockMeshCataloger) GetSMISpec() smi.MeshSpec
- func (m *MockMeshCataloger) GetServicesForServiceAccount(arg0 service.K8sServiceAccount) ([]service.MeshService, error)
- func (m *MockMeshCataloger) GetServicesFromEnvoyCertificate(arg0 certificate.CommonName) ([]service.MeshService, error)
- func (m *MockMeshCataloger) GetTargetPortToProtocolMappingForService(arg0 service.MeshService) (map[uint32]string, error)
- func (m *MockMeshCataloger) ListAllowedEndpointsForService(arg0 service.K8sServiceAccount, arg1 service.MeshService) ([]endpoint.Endpoint, error)
- func (m *MockMeshCataloger) ListAllowedInboundServiceAccounts(arg0 service.K8sServiceAccount) ([]service.K8sServiceAccount, error)
- func (m *MockMeshCataloger) ListAllowedOutboundServiceAccounts(arg0 service.K8sServiceAccount) ([]service.K8sServiceAccount, error)
- func (m *MockMeshCataloger) ListAllowedOutboundServicesForIdentity(arg0 service.K8sServiceAccount) []service.MeshService
- func (m *MockMeshCataloger) ListEndpointsForService(arg0 service.MeshService) ([]endpoint.Endpoint, error)
- func (m *MockMeshCataloger) ListInboundTrafficPolicies(arg0 service.K8sServiceAccount, arg1 []service.MeshService) []*trafficpolicy.InboundTrafficPolicy
- func (m *MockMeshCataloger) ListInboundTrafficTargetsWithRoutes(arg0 service.K8sServiceAccount) ([]trafficpolicy.TrafficTargetWithRoutes, error)
- func (m *MockMeshCataloger) ListMonitoredNamespaces() []string
- func (m *MockMeshCataloger) ListOutboundTrafficPolicies(arg0 service.K8sServiceAccount) []*trafficpolicy.OutboundTrafficPolicy
- func (m *MockMeshCataloger) ListSMIPolicies() ([]*v1alpha2.TrafficSplit, []service.K8sServiceAccount, ...)
- func (m *MockMeshCataloger) ListServiceAccountsForService(arg0 service.MeshService) ([]service.K8sServiceAccount, error)
- func (m *MockMeshCataloger) RegisterProxy(arg0 *envoy.Proxy)
- func (m *MockMeshCataloger) UnregisterProxy(arg0 *envoy.Proxy)
- type MockMeshCatalogerMockRecorder
- func (mr *MockMeshCatalogerMockRecorder) ExpectProxy(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) GetIngressPoliciesForService(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) GetPortToProtocolMappingForService(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) GetResolvableServiceEndpoints(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) GetSMISpec() *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) GetServicesForServiceAccount(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) GetServicesFromEnvoyCertificate(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) GetTargetPortToProtocolMappingForService(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListAllowedEndpointsForService(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListAllowedInboundServiceAccounts(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListAllowedOutboundServiceAccounts(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListAllowedOutboundServicesForIdentity(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListEndpointsForService(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListInboundTrafficPolicies(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListInboundTrafficTargetsWithRoutes(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListMonitoredNamespaces() *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListOutboundTrafficPolicies(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListSMIPolicies() *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) ListServiceAccountsForService(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) RegisterProxy(arg0 interface{}) *gomock.Call
- func (mr *MockMeshCatalogerMockRecorder) UnregisterProxy(arg0 interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidCertificateCN is an error for when a certificate has a CommonName, which does not match expected string format. ErrInvalidCertificateCN = errors.New("invalid cn") // ErrMoreThanOnePodForCertificate is an error for when OSM finds more than one pod for a given xDS certificate. There should always be exactly one Pod for a given xDS certificate. ErrMoreThanOnePodForCertificate = errors.New("found more than one pod for xDS certificate") // ErrDidNotFindPodForCertificate is an error for when OSM cannot not find a pod for the given xDS certificate. ErrDidNotFindPodForCertificate = errors.New("did not find pod for certificate") // ErrServiceAccountDoesNotMatchCertificate is an error for when the service account of a Pod does not match the xDS certificate. ErrServiceAccountDoesNotMatchCertificate = errors.New("service account does not match certificate") // ErrNamespaceDoesNotMatchCertificate is an error for when the namespace of the Pod does not match the xDS certificate. ErrNamespaceDoesNotMatchCertificate = errors.New("namespace does not match certificate") // ErrServiceNotFoundForAnyProvider is an error for when OSM cannot find a service for the given service account. ErrServiceNotFoundForAnyProvider = errors.New("no service found for service account with any of the mesh supported providers") // ErrNoTrafficSpecFoundForTrafficPolicy is an error for when OSM cannot find a traffic spec for the given traffic policy. ErrNoTrafficSpecFoundForTrafficPolicy = errors.New("no traffic spec found for the traffic policy") // ErrServiceNotFound is an error for when OSM cannot find a service. ErrServiceNotFound = errors.New("service not found") )
Functions ¶
func GetPodFromCertificate ¶
func GetPodFromCertificate(cn certificate.CommonName, kubecontroller k8s.Controller) (*v1.Pod, error)
GetPodFromCertificate returns the Kubernetes Pod object for a given certificate.
func GetServiceAccountFromProxyCertificate ¶ added in v0.6.0
func GetServiceAccountFromProxyCertificate(cn certificate.CommonName) (service.K8sServiceAccount, error)
GetServiceAccountFromProxyCertificate returns the ServiceAccount information encoded in the certificate CN
func NewCertCommonNameWithProxyID ¶
func NewCertCommonNameWithProxyID(proxyUUID uuid.UUID, serviceAccount, namespace string) certificate.CommonName
NewCertCommonNameWithProxyID returns a newly generated CommonName for a certificate of the form: <ProxyUUID>.<serviceAccount>.<namespace>
Types ¶
type MeshCatalog ¶
type MeshCatalog struct {
// contains filtered or unexported fields
}
MeshCatalog is the struct for the service catalog
func NewFakeMeshCatalog ¶
func NewFakeMeshCatalog(kubeClient kubernetes.Interface) *MeshCatalog
NewFakeMeshCatalog creates a new struct implementing catalog.MeshCataloger interface used for testing.
func NewMeshCatalog ¶
func NewMeshCatalog(kubeController k8s.Controller, kubeClient kubernetes.Interface, meshSpec smi.MeshSpec, certManager certificate.Manager, ingressMonitor ingress.Monitor, stop <-chan struct{}, cfg configurator.Configurator, endpointsProviders ...endpoint.Provider) *MeshCatalog
NewMeshCatalog creates a new service catalog
func (*MeshCatalog) ExpectProxy ¶
func (mc *MeshCatalog) ExpectProxy(cn certificate.CommonName)
ExpectProxy catalogs the fact that a certificate was issued for an Envoy proxy and this is expected to connect to XDS.
func (*MeshCatalog) GetIngressPoliciesForService ¶ added in v0.8.0
func (mc *MeshCatalog) GetIngressPoliciesForService(svc service.MeshService) ([]*trafficpolicy.InboundTrafficPolicy, error)
GetIngressPoliciesForService returns a list of inbound traffic policies for a service as defined in observed ingress k8s resources.
func (*MeshCatalog) GetPortToProtocolMappingForService ¶ added in v0.6.0
func (mc *MeshCatalog) GetPortToProtocolMappingForService(svc service.MeshService) (map[uint32]string, error)
GetPortToProtocolMappingForService returns a mapping of the service's ports to their corresponding application protocol, where the ports returned are the ones used by downstream clients in their requests. This can be different from the ports actually exposed by the application binary, ie. 'spec.ports[].port' instead of 'spec.ports[].targetPort' for a Kubernetes service.
func (*MeshCatalog) GetResolvableServiceEndpoints ¶ added in v0.4.0
func (mc *MeshCatalog) GetResolvableServiceEndpoints(svc service.MeshService) ([]endpoint.Endpoint, error)
GetResolvableServiceEndpoints returns the resolvable set of endpoint over which a service is accessible using its FQDN
func (*MeshCatalog) GetSMISpec ¶
func (mc *MeshCatalog) GetSMISpec() smi.MeshSpec
GetSMISpec returns a MeshCatalog's SMI Spec
func (*MeshCatalog) GetServicesForServiceAccount ¶ added in v0.4.0
func (mc *MeshCatalog) GetServicesForServiceAccount(sa service.K8sServiceAccount) ([]service.MeshService, error)
GetServicesForServiceAccount returns a list of services corresponding to a service account
func (*MeshCatalog) GetServicesFromEnvoyCertificate ¶ added in v0.4.0
func (mc *MeshCatalog) GetServicesFromEnvoyCertificate(cn certificate.CommonName) ([]service.MeshService, error)
GetServicesFromEnvoyCertificate returns a list of services the given Envoy is a member of based on the certificate provided, which is a cert issued to an Envoy for XDS communication (not Envoy-to-Envoy).
func (*MeshCatalog) GetTargetPortToProtocolMappingForService ¶ added in v0.7.0
func (mc *MeshCatalog) GetTargetPortToProtocolMappingForService(svc service.MeshService) (map[uint32]string, error)
GetTargetPortToProtocolMappingForService returns a mapping of the service's ports to their corresponding application protocol. The ports returned are the actual ports on which the application exposes the service derived from the service's endpoints, ie. 'spec.ports[].targetPort' instead of 'spec.ports[].port' for a Kubernetes service. The function ensures the port:protocol mapping is the same across different endpoint providers for the service, and returns an error otherwise.
func (*MeshCatalog) ListAllowedEndpointsForService ¶ added in v0.8.0
func (mc *MeshCatalog) ListAllowedEndpointsForService(downstreamIdentity service.K8sServiceAccount, upstreamSvc service.MeshService) ([]endpoint.Endpoint, error)
ListAllowedEndpointsForService returns only those endpoints for a service that belong to the allowed outbound service accounts for the given downstream identity
func (*MeshCatalog) ListAllowedInboundServiceAccounts ¶ added in v0.6.0
func (mc *MeshCatalog) ListAllowedInboundServiceAccounts(upstream service.K8sServiceAccount) ([]service.K8sServiceAccount, error)
ListAllowedInboundServiceAccounts lists the downstream service accounts that can connect to the given upstream service account
func (*MeshCatalog) ListAllowedOutboundServiceAccounts ¶ added in v0.6.0
func (mc *MeshCatalog) ListAllowedOutboundServiceAccounts(downstream service.K8sServiceAccount) ([]service.K8sServiceAccount, error)
ListAllowedOutboundServiceAccounts lists the upstream service accounts the given downstream service account can connect to
func (*MeshCatalog) ListAllowedOutboundServicesForIdentity ¶ added in v0.7.0
func (mc *MeshCatalog) ListAllowedOutboundServicesForIdentity(identity service.K8sServiceAccount) []service.MeshService
ListAllowedOutboundServicesForIdentity list the services the given service account is allowed to initiate outbound connections to
func (*MeshCatalog) ListConnectedProxies ¶
func (mc *MeshCatalog) ListConnectedProxies() map[certificate.CommonName]*envoy.Proxy
ListConnectedProxies lists the Envoy proxies already connected and the time they first connected.
func (*MeshCatalog) ListDisconnectedProxies ¶
func (mc *MeshCatalog) ListDisconnectedProxies() map[certificate.CommonName]time.Time
ListDisconnectedProxies lists the Envoy proxies disconnected and the time last seen.
func (*MeshCatalog) ListEndpointsForService ¶
func (mc *MeshCatalog) ListEndpointsForService(svc service.MeshService) ([]endpoint.Endpoint, error)
ListEndpointsForService returns the list of provider endpoints corresponding to a service
func (*MeshCatalog) ListExpectedProxies ¶
func (mc *MeshCatalog) ListExpectedProxies() map[certificate.CommonName]time.Time
ListExpectedProxies lists the Envoy proxies yet to connect and the time their XDS certificate was issued.
func (*MeshCatalog) ListInboundTrafficPolicies ¶ added in v0.8.0
func (mc *MeshCatalog) ListInboundTrafficPolicies(upstreamIdentity service.K8sServiceAccount, upstreamServices []service.MeshService) []*trafficpolicy.InboundTrafficPolicy
ListInboundTrafficPolicies returns all inbound traffic policies 1. from service discovery for permissive mode 2. for the given service account and upstream services from SMI Traffic Target and Traffic Split
func (*MeshCatalog) ListInboundTrafficTargetsWithRoutes ¶ added in v0.7.0
func (mc *MeshCatalog) ListInboundTrafficTargetsWithRoutes(upstream service.K8sServiceAccount) ([]trafficpolicy.TrafficTargetWithRoutes, error)
ListInboundTrafficTargetsWithRoutes returns a list traffic target objects composed of its routes for the given destination service account
func (*MeshCatalog) ListMonitoredNamespaces ¶ added in v0.1.0
func (mc *MeshCatalog) ListMonitoredNamespaces() []string
ListMonitoredNamespaces returns all namespaces that the mesh is monitoring.
func (*MeshCatalog) ListOutboundTrafficPolicies ¶ added in v0.8.0
func (mc *MeshCatalog) ListOutboundTrafficPolicies(downstreamIdentity service.K8sServiceAccount) []*trafficpolicy.OutboundTrafficPolicy
ListOutboundTrafficPolicies returns all outbound traffic policies 1. from service discovery for permissive mode 2. for the given service account from SMI Traffic Target and Traffic Split
func (*MeshCatalog) ListSMIPolicies ¶
func (mc *MeshCatalog) ListSMIPolicies() ([]*split.TrafficSplit, []service.K8sServiceAccount, []*spec.HTTPRouteGroup, []*access.TrafficTarget)
ListSMIPolicies returns all policies OSM is aware of.
func (*MeshCatalog) ListServiceAccountsForService ¶ added in v0.6.0
func (mc *MeshCatalog) ListServiceAccountsForService(svc service.MeshService) ([]service.K8sServiceAccount, error)
ListServiceAccountsForService lists the service accounts associated with the given service
func (*MeshCatalog) RegisterProxy ¶
func (mc *MeshCatalog) RegisterProxy(proxy *envoy.Proxy)
RegisterProxy implements MeshCatalog and registers a newly connected proxy.
func (*MeshCatalog) UnregisterProxy ¶
func (mc *MeshCatalog) UnregisterProxy(p *envoy.Proxy)
UnregisterProxy unregisters the given proxy from the catalog.
type MeshCataloger ¶
type MeshCataloger interface { // GetSMISpec returns the SMI spec GetSMISpec() smi.MeshSpec // ListInboundTrafficPolicies returns all inbound traffic policies related to the given service account and inbound services ListInboundTrafficPolicies(service.K8sServiceAccount, []service.MeshService) []*trafficpolicy.InboundTrafficPolicy // ListOutboundTrafficPolicies returns all outbound traffic policies related to the given service account ListOutboundTrafficPolicies(service.K8sServiceAccount) []*trafficpolicy.OutboundTrafficPolicy // ListAllowedOutboundServicesForIdentity list the services the given service account is allowed to initiate outbound connections to ListAllowedOutboundServicesForIdentity(service.K8sServiceAccount) []service.MeshService // ListAllowedInboundServiceAccounts lists the downstream service accounts that can connect to the given service account ListAllowedInboundServiceAccounts(service.K8sServiceAccount) ([]service.K8sServiceAccount, error) // ListAllowedOutboundServiceAccounts lists the upstream service accounts the given service account can connect to ListAllowedOutboundServiceAccounts(service.K8sServiceAccount) ([]service.K8sServiceAccount, error) // ListServiceAccountsForService lists the service accounts associated with the given service ListServiceAccountsForService(service.MeshService) ([]service.K8sServiceAccount, error) // ListSMIPolicies lists SMI policies. ListSMIPolicies() ([]*split.TrafficSplit, []service.K8sServiceAccount, []*spec.HTTPRouteGroup, []*access.TrafficTarget) // ListEndpointsForService returns the list of individual instance endpoint backing a service ListEndpointsForService(service.MeshService) ([]endpoint.Endpoint, error) // ListAllowedEndpointsForService returns the list of endpoints backing a service and its allowed service accounts ListAllowedEndpointsForService(service.K8sServiceAccount, service.MeshService) ([]endpoint.Endpoint, error) // GetResolvableServiceEndpoints returns the resolvable set of endpoint over which a service is accessible using its FQDN. // These are the endpoint destinations we'd expect client applications sends the traffic towards to, when attempting to // reach a specific service. // If no LB/virtual IPs are assigned to the service, GetResolvableServiceEndpoints will return ListEndpointsForService GetResolvableServiceEndpoints(service.MeshService) ([]endpoint.Endpoint, error) // ExpectProxy catalogs the fact that a certificate was issued for an Envoy proxy and this is expected to connect to XDS. ExpectProxy(certificate.CommonName) // GetServicesFromEnvoyCertificate returns a list of services the given Envoy is a member of based on the certificate provided, which is a cert issued to an Envoy for XDS communication (not Envoy-to-Envoy). GetServicesFromEnvoyCertificate(certificate.CommonName) ([]service.MeshService, error) // RegisterProxy registers a newly connected proxy with the service mesh catalog. RegisterProxy(*envoy.Proxy) // UnregisterProxy unregisters an existing proxy from the service mesh catalog UnregisterProxy(*envoy.Proxy) // GetServicesForServiceAccount returns a list of services corresponding to a service account GetServicesForServiceAccount(service.K8sServiceAccount) ([]service.MeshService, error) // GetIngressPoliciesForService returns the inbound traffic policies associated with an ingress service GetIngressPoliciesForService(service.MeshService) ([]*trafficpolicy.InboundTrafficPolicy, error) // ListMonitoredNamespaces lists namespaces monitored by the control plane ListMonitoredNamespaces() []string // GetTargetPortToProtocolMappingForService returns a mapping of the service's ports to their corresponding application protocol. // The ports returned are the actual ports on which the application exposes the service derived from the service's endpoints, // ie. 'spec.ports[].targetPort' instead of 'spec.ports[].port' for a Kubernetes service. GetTargetPortToProtocolMappingForService(service.MeshService) (map[uint32]string, error) // GetTargetPortToProtocolMappingForService returns a mapping of the service's ports to their corresponding application protocol, // where the ports returned are the ones used by downstream clients in their requests. This can be different from the ports // actually exposed by the application binary, ie. 'spec.ports[].port' instead of 'spec.ports[].targetPort' for a Kubernetes service. GetPortToProtocolMappingForService(service.MeshService) (map[uint32]string, error) // ListInboundTrafficTargetsWithRoutes returns a list traffic target objects composed of its routes for the given destination service account ListInboundTrafficTargetsWithRoutes(service.K8sServiceAccount) ([]trafficpolicy.TrafficTargetWithRoutes, error) }
MeshCataloger is the mechanism by which the Service Mesh controller discovers all Envoy proxies connected to the catalog.
type MockMeshCataloger ¶ added in v0.4.1
type MockMeshCataloger struct {
// contains filtered or unexported fields
}
MockMeshCataloger is a mock of MeshCataloger interface
func NewMockMeshCataloger ¶ added in v0.4.1
func NewMockMeshCataloger(ctrl *gomock.Controller) *MockMeshCataloger
NewMockMeshCataloger creates a new mock instance
func (*MockMeshCataloger) EXPECT ¶ added in v0.4.1
func (m *MockMeshCataloger) EXPECT() *MockMeshCatalogerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockMeshCataloger) ExpectProxy ¶ added in v0.4.1
func (m *MockMeshCataloger) ExpectProxy(arg0 certificate.CommonName)
ExpectProxy mocks base method
func (*MockMeshCataloger) GetIngressPoliciesForService ¶ added in v0.8.0
func (m *MockMeshCataloger) GetIngressPoliciesForService(arg0 service.MeshService) ([]*trafficpolicy.InboundTrafficPolicy, error)
GetIngressPoliciesForService mocks base method
func (*MockMeshCataloger) GetPortToProtocolMappingForService ¶ added in v0.6.0
func (m *MockMeshCataloger) GetPortToProtocolMappingForService(arg0 service.MeshService) (map[uint32]string, error)
GetPortToProtocolMappingForService mocks base method
func (*MockMeshCataloger) GetResolvableServiceEndpoints ¶ added in v0.4.1
func (m *MockMeshCataloger) GetResolvableServiceEndpoints(arg0 service.MeshService) ([]endpoint.Endpoint, error)
GetResolvableServiceEndpoints mocks base method
func (*MockMeshCataloger) GetSMISpec ¶ added in v0.4.1
func (m *MockMeshCataloger) GetSMISpec() smi.MeshSpec
GetSMISpec mocks base method
func (*MockMeshCataloger) GetServicesForServiceAccount ¶ added in v0.4.1
func (m *MockMeshCataloger) GetServicesForServiceAccount(arg0 service.K8sServiceAccount) ([]service.MeshService, error)
GetServicesForServiceAccount mocks base method
func (*MockMeshCataloger) GetServicesFromEnvoyCertificate ¶ added in v0.4.1
func (m *MockMeshCataloger) GetServicesFromEnvoyCertificate(arg0 certificate.CommonName) ([]service.MeshService, error)
GetServicesFromEnvoyCertificate mocks base method
func (*MockMeshCataloger) GetTargetPortToProtocolMappingForService ¶ added in v0.7.0
func (m *MockMeshCataloger) GetTargetPortToProtocolMappingForService(arg0 service.MeshService) (map[uint32]string, error)
GetTargetPortToProtocolMappingForService mocks base method
func (*MockMeshCataloger) ListAllowedEndpointsForService ¶ added in v0.8.0
func (m *MockMeshCataloger) ListAllowedEndpointsForService(arg0 service.K8sServiceAccount, arg1 service.MeshService) ([]endpoint.Endpoint, error)
ListAllowedEndpointsForService mocks base method
func (*MockMeshCataloger) ListAllowedInboundServiceAccounts ¶ added in v0.6.0
func (m *MockMeshCataloger) ListAllowedInboundServiceAccounts(arg0 service.K8sServiceAccount) ([]service.K8sServiceAccount, error)
ListAllowedInboundServiceAccounts mocks base method
func (*MockMeshCataloger) ListAllowedOutboundServiceAccounts ¶ added in v0.6.0
func (m *MockMeshCataloger) ListAllowedOutboundServiceAccounts(arg0 service.K8sServiceAccount) ([]service.K8sServiceAccount, error)
ListAllowedOutboundServiceAccounts mocks base method
func (*MockMeshCataloger) ListAllowedOutboundServicesForIdentity ¶ added in v0.7.0
func (m *MockMeshCataloger) ListAllowedOutboundServicesForIdentity(arg0 service.K8sServiceAccount) []service.MeshService
ListAllowedOutboundServicesForIdentity mocks base method
func (*MockMeshCataloger) ListEndpointsForService ¶ added in v0.4.1
func (m *MockMeshCataloger) ListEndpointsForService(arg0 service.MeshService) ([]endpoint.Endpoint, error)
ListEndpointsForService mocks base method
func (*MockMeshCataloger) ListInboundTrafficPolicies ¶ added in v0.8.0
func (m *MockMeshCataloger) ListInboundTrafficPolicies(arg0 service.K8sServiceAccount, arg1 []service.MeshService) []*trafficpolicy.InboundTrafficPolicy
ListInboundTrafficPolicies mocks base method
func (*MockMeshCataloger) ListInboundTrafficTargetsWithRoutes ¶ added in v0.7.0
func (m *MockMeshCataloger) ListInboundTrafficTargetsWithRoutes(arg0 service.K8sServiceAccount) ([]trafficpolicy.TrafficTargetWithRoutes, error)
ListInboundTrafficTargetsWithRoutes mocks base method
func (*MockMeshCataloger) ListMonitoredNamespaces ¶ added in v0.4.1
func (m *MockMeshCataloger) ListMonitoredNamespaces() []string
ListMonitoredNamespaces mocks base method
func (*MockMeshCataloger) ListOutboundTrafficPolicies ¶ added in v0.8.0
func (m *MockMeshCataloger) ListOutboundTrafficPolicies(arg0 service.K8sServiceAccount) []*trafficpolicy.OutboundTrafficPolicy
ListOutboundTrafficPolicies mocks base method
func (*MockMeshCataloger) ListSMIPolicies ¶ added in v0.4.1
func (m *MockMeshCataloger) ListSMIPolicies() ([]*v1alpha2.TrafficSplit, []service.K8sServiceAccount, []*v1alpha4.HTTPRouteGroup, []*v1alpha3.TrafficTarget)
ListSMIPolicies mocks base method
func (*MockMeshCataloger) ListServiceAccountsForService ¶ added in v0.6.0
func (m *MockMeshCataloger) ListServiceAccountsForService(arg0 service.MeshService) ([]service.K8sServiceAccount, error)
ListServiceAccountsForService mocks base method
func (*MockMeshCataloger) RegisterProxy ¶ added in v0.4.1
func (m *MockMeshCataloger) RegisterProxy(arg0 *envoy.Proxy)
RegisterProxy mocks base method
func (*MockMeshCataloger) UnregisterProxy ¶ added in v0.4.1
func (m *MockMeshCataloger) UnregisterProxy(arg0 *envoy.Proxy)
UnregisterProxy mocks base method
type MockMeshCatalogerMockRecorder ¶ added in v0.4.1
type MockMeshCatalogerMockRecorder struct {
// contains filtered or unexported fields
}
MockMeshCatalogerMockRecorder is the mock recorder for MockMeshCataloger
func (*MockMeshCatalogerMockRecorder) ExpectProxy ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) ExpectProxy(arg0 interface{}) *gomock.Call
ExpectProxy indicates an expected call of ExpectProxy
func (*MockMeshCatalogerMockRecorder) GetIngressPoliciesForService ¶ added in v0.8.0
func (mr *MockMeshCatalogerMockRecorder) GetIngressPoliciesForService(arg0 interface{}) *gomock.Call
GetIngressPoliciesForService indicates an expected call of GetIngressPoliciesForService
func (*MockMeshCatalogerMockRecorder) GetPortToProtocolMappingForService ¶ added in v0.6.0
func (mr *MockMeshCatalogerMockRecorder) GetPortToProtocolMappingForService(arg0 interface{}) *gomock.Call
GetPortToProtocolMappingForService indicates an expected call of GetPortToProtocolMappingForService
func (*MockMeshCatalogerMockRecorder) GetResolvableServiceEndpoints ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) GetResolvableServiceEndpoints(arg0 interface{}) *gomock.Call
GetResolvableServiceEndpoints indicates an expected call of GetResolvableServiceEndpoints
func (*MockMeshCatalogerMockRecorder) GetSMISpec ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) GetSMISpec() *gomock.Call
GetSMISpec indicates an expected call of GetSMISpec
func (*MockMeshCatalogerMockRecorder) GetServicesForServiceAccount ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) GetServicesForServiceAccount(arg0 interface{}) *gomock.Call
GetServicesForServiceAccount indicates an expected call of GetServicesForServiceAccount
func (*MockMeshCatalogerMockRecorder) GetServicesFromEnvoyCertificate ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) GetServicesFromEnvoyCertificate(arg0 interface{}) *gomock.Call
GetServicesFromEnvoyCertificate indicates an expected call of GetServicesFromEnvoyCertificate
func (*MockMeshCatalogerMockRecorder) GetTargetPortToProtocolMappingForService ¶ added in v0.7.0
func (mr *MockMeshCatalogerMockRecorder) GetTargetPortToProtocolMappingForService(arg0 interface{}) *gomock.Call
GetTargetPortToProtocolMappingForService indicates an expected call of GetTargetPortToProtocolMappingForService
func (*MockMeshCatalogerMockRecorder) ListAllowedEndpointsForService ¶ added in v0.8.0
func (mr *MockMeshCatalogerMockRecorder) ListAllowedEndpointsForService(arg0, arg1 interface{}) *gomock.Call
ListAllowedEndpointsForService indicates an expected call of ListAllowedEndpointsForService
func (*MockMeshCatalogerMockRecorder) ListAllowedInboundServiceAccounts ¶ added in v0.6.0
func (mr *MockMeshCatalogerMockRecorder) ListAllowedInboundServiceAccounts(arg0 interface{}) *gomock.Call
ListAllowedInboundServiceAccounts indicates an expected call of ListAllowedInboundServiceAccounts
func (*MockMeshCatalogerMockRecorder) ListAllowedOutboundServiceAccounts ¶ added in v0.6.0
func (mr *MockMeshCatalogerMockRecorder) ListAllowedOutboundServiceAccounts(arg0 interface{}) *gomock.Call
ListAllowedOutboundServiceAccounts indicates an expected call of ListAllowedOutboundServiceAccounts
func (*MockMeshCatalogerMockRecorder) ListAllowedOutboundServicesForIdentity ¶ added in v0.7.0
func (mr *MockMeshCatalogerMockRecorder) ListAllowedOutboundServicesForIdentity(arg0 interface{}) *gomock.Call
ListAllowedOutboundServicesForIdentity indicates an expected call of ListAllowedOutboundServicesForIdentity
func (*MockMeshCatalogerMockRecorder) ListEndpointsForService ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) ListEndpointsForService(arg0 interface{}) *gomock.Call
ListEndpointsForService indicates an expected call of ListEndpointsForService
func (*MockMeshCatalogerMockRecorder) ListInboundTrafficPolicies ¶ added in v0.8.0
func (mr *MockMeshCatalogerMockRecorder) ListInboundTrafficPolicies(arg0, arg1 interface{}) *gomock.Call
ListInboundTrafficPolicies indicates an expected call of ListInboundTrafficPolicies
func (*MockMeshCatalogerMockRecorder) ListInboundTrafficTargetsWithRoutes ¶ added in v0.7.0
func (mr *MockMeshCatalogerMockRecorder) ListInboundTrafficTargetsWithRoutes(arg0 interface{}) *gomock.Call
ListInboundTrafficTargetsWithRoutes indicates an expected call of ListInboundTrafficTargetsWithRoutes
func (*MockMeshCatalogerMockRecorder) ListMonitoredNamespaces ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) ListMonitoredNamespaces() *gomock.Call
ListMonitoredNamespaces indicates an expected call of ListMonitoredNamespaces
func (*MockMeshCatalogerMockRecorder) ListOutboundTrafficPolicies ¶ added in v0.8.0
func (mr *MockMeshCatalogerMockRecorder) ListOutboundTrafficPolicies(arg0 interface{}) *gomock.Call
ListOutboundTrafficPolicies indicates an expected call of ListOutboundTrafficPolicies
func (*MockMeshCatalogerMockRecorder) ListSMIPolicies ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) ListSMIPolicies() *gomock.Call
ListSMIPolicies indicates an expected call of ListSMIPolicies
func (*MockMeshCatalogerMockRecorder) ListServiceAccountsForService ¶ added in v0.6.0
func (mr *MockMeshCatalogerMockRecorder) ListServiceAccountsForService(arg0 interface{}) *gomock.Call
ListServiceAccountsForService indicates an expected call of ListServiceAccountsForService
func (*MockMeshCatalogerMockRecorder) RegisterProxy ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) RegisterProxy(arg0 interface{}) *gomock.Call
RegisterProxy indicates an expected call of RegisterProxy
func (*MockMeshCatalogerMockRecorder) UnregisterProxy ¶ added in v0.4.1
func (mr *MockMeshCatalogerMockRecorder) UnregisterProxy(arg0 interface{}) *gomock.Call
UnregisterProxy indicates an expected call of UnregisterProxy