Documentation ¶
Index ¶
- func CheckDestinationRuleCircuitBreaker(destinationRule IstioObject, namespace string, serviceName string, ...) bool
- func CheckVirtualService(virtualService IstioObject, namespace string, serviceName string) bool
- func CheckVirtualServiceSubset(virtualService IstioObject, namespace string, serviceName string, ...) bool
- func ConfigClient() (*rest.Config, error)
- func FilterByDestination(spec map[string]interface{}, namespace string, serviceName string, ...) bool
- func FilterByHost(host string, serviceName string, namespace string) bool
- func FilterByRoute(spec map[string]interface{}, protocols []string, service string, ...) bool
- func FilterByRouteAndSubset(spec map[string]interface{}, protocols []string, service string, ...) bool
- func FilterDeploymentsForService(s *v1.Service, servicePods []v1.Pod, allDepls *v1beta1.DeploymentList) []v1beta1.Deployment
- func FilterPodsForService(s *v1.Service, allPods *v1.PodList) []v1.Pod
- func GatewayNames(gateways []IstioObject) map[string]struct{}
- func GetDestinationRulesSubsets(destinationRules []IstioObject, serviceName, version string) []string
- func GetSelectorAsString(deployment *v1beta1.Deployment) (string, error)
- func NewNotFound(name, group, resource string) error
- func ServiceEntryHostnames(serviceEntries []IstioObject) map[string]struct{}
- func ValidateVirtualServiceGateways(spec map[string]interface{}, gatewayNames map[string]struct{}) bool
- type AppDetails
- type DeploymentDetails
- type DestinationRule
- func (in *DestinationRule) DeepCopy() *DestinationRule
- func (in *DestinationRule) DeepCopyInto(out *DestinationRule)
- func (in *DestinationRule) DeepCopyIstioObject() IstioObject
- func (in *DestinationRule) DeepCopyObject() runtime.Object
- func (in *DestinationRule) GetObjectMeta() meta_v1.ObjectMeta
- func (in *DestinationRule) GetSpec() map[string]interface{}
- func (in *DestinationRule) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *DestinationRule) SetSpec(spec map[string]interface{})
- type DestinationRuleList
- type Gateway
- func (in *Gateway) DeepCopy() *Gateway
- func (in *Gateway) DeepCopyInto(out *Gateway)
- func (in *Gateway) DeepCopyIstioObject() IstioObject
- func (in *Gateway) DeepCopyObject() runtime.Object
- func (in *Gateway) GetObjectMeta() meta_v1.ObjectMeta
- func (in *Gateway) GetSpec() map[string]interface{}
- func (in *Gateway) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *Gateway) SetSpec(spec map[string]interface{})
- type GatewayList
- type IstioClient
- func (in *IstioClient) GetAppDetails(namespace, app string) (AppDetails, error)
- func (in *IstioClient) GetDeployment(namespace, deploymentName string) (*v1beta1.Deployment, error)
- func (in *IstioClient) GetDeploymentDetails(namespace string, deploymentName string) (*DeploymentDetails, error)
- func (in *IstioClient) GetDeploymentSelector(namespace, deploymentName string) (string, error)
- func (in *IstioClient) GetDeployments(namespace string) (*v1beta1.DeploymentList, error)
- func (in *IstioClient) GetDeploymentsBySelector(namespace string, labelSelector string) (*v1beta1.DeploymentList, error)
- func (in *IstioClient) GetDestinationRule(namespace string, destinationrule string) (IstioObject, error)
- func (in *IstioClient) GetDestinationRules(namespace string, serviceName string) ([]IstioObject, error)
- func (in *IstioClient) GetFullServices(namespace string) (*ServiceList, error)
- func (in *IstioClient) GetGateway(namespace string, gateway string) (IstioObject, error)
- func (in *IstioClient) GetGateways(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetIstioDetails(namespace string, serviceName string) (*IstioDetails, error)
- func (in *IstioClient) GetIstioRuleDetails(namespace string, istiorule string) (*IstioRuleDetails, error)
- func (in *IstioClient) GetIstioRules(namespace string) (*IstioRules, error)
- func (in *IstioClient) GetNamespaceAppsDetails(namespace string) (NamespaceApps, error)
- func (in *IstioClient) GetNamespacePods(namespace string) (*v1.PodList, error)
- func (in *IstioClient) GetNamespaces() (*v1.NamespaceList, error)
- func (in *IstioClient) GetPods(namespace, labelSelector string) (*v1.PodList, error)
- func (in *IstioClient) GetQuotaSpec(namespace string, quotaSpecName string) (IstioObject, error)
- func (in *IstioClient) GetQuotaSpecBinding(namespace string, quotaSpecBindingName string) (IstioObject, error)
- func (in *IstioClient) GetQuotaSpecBindings(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetQuotaSpecs(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetService(namespace, serviceName string) (*v1.Service, error)
- func (in *IstioClient) GetServiceDetails(namespace string, serviceName string) (*ServiceDetails, error)
- func (in *IstioClient) GetServiceEntries(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetServiceEntry(namespace string, serviceEntryName string) (IstioObject, error)
- func (in *IstioClient) GetServices(namespace string) (*v1.ServiceList, error)
- func (in *IstioClient) GetServicesByDeploymentSelector(namespace string, deployment *v1beta1.Deployment) ([]v1.Service, error)
- func (in *IstioClient) GetVirtualService(namespace string, virtualservice string) (IstioObject, error)
- func (in *IstioClient) GetVirtualServices(namespace string, serviceName string) ([]IstioObject, error)
- type IstioClientInterface
- type IstioDetails
- type IstioObject
- type IstioObjectList
- type IstioRuleAction
- type IstioRuleDetails
- type IstioRules
- type MockIstioObject
- func (in *MockIstioObject) DeepCopy() *MockIstioObject
- func (in *MockIstioObject) DeepCopyInto(out *MockIstioObject)
- func (in *MockIstioObject) DeepCopyIstioObject() IstioObject
- func (in *MockIstioObject) DeepCopyObject() runtime.Object
- func (in *MockIstioObject) GetObjectMeta() meta_v1.ObjectMeta
- func (in *MockIstioObject) GetSpec() map[string]interface{}
- func (in *MockIstioObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *MockIstioObject) SetSpec(spec map[string]interface{})
- type MockIstioObjectList
- type NamespaceApps
- type OSRouteClient
- type QuotaSpec
- func (in *QuotaSpec) DeepCopy() *QuotaSpec
- func (in *QuotaSpec) DeepCopyInto(out *QuotaSpec)
- func (in *QuotaSpec) DeepCopyIstioObject() IstioObject
- func (in *QuotaSpec) DeepCopyObject() runtime.Object
- func (in *QuotaSpec) GetObjectMeta() meta_v1.ObjectMeta
- func (in *QuotaSpec) GetSpec() map[string]interface{}
- func (in *QuotaSpec) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *QuotaSpec) SetSpec(spec map[string]interface{})
- type QuotaSpecBinding
- func (in *QuotaSpecBinding) DeepCopy() *QuotaSpecBinding
- func (in *QuotaSpecBinding) DeepCopyInto(out *QuotaSpecBinding)
- func (in *QuotaSpecBinding) DeepCopyIstioObject() IstioObject
- func (in *QuotaSpecBinding) DeepCopyObject() runtime.Object
- func (in *QuotaSpecBinding) GetObjectMeta() meta_v1.ObjectMeta
- func (in *QuotaSpecBinding) GetSpec() map[string]interface{}
- func (in *QuotaSpecBinding) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *QuotaSpecBinding) SetSpec(spec map[string]interface{})
- type QuotaSpecBindingList
- type QuotaSpecList
- type ServiceDetails
- type ServiceEntry
- func (in *ServiceEntry) DeepCopy() *ServiceEntry
- func (in *ServiceEntry) DeepCopyInto(out *ServiceEntry)
- func (in *ServiceEntry) DeepCopyIstioObject() IstioObject
- func (in *ServiceEntry) DeepCopyObject() runtime.Object
- func (in *ServiceEntry) GetObjectMeta() meta_v1.ObjectMeta
- func (in *ServiceEntry) GetSpec() map[string]interface{}
- func (in *ServiceEntry) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *ServiceEntry) SetSpec(spec map[string]interface{})
- type ServiceEntryList
- type ServiceList
- type VirtualService
- func (in *VirtualService) DeepCopy() *VirtualService
- func (in *VirtualService) DeepCopyInto(out *VirtualService)
- func (in *VirtualService) DeepCopyIstioObject() IstioObject
- func (in *VirtualService) DeepCopyObject() runtime.Object
- func (in *VirtualService) GetObjectMeta() meta_v1.ObjectMeta
- func (in *VirtualService) GetSpec() map[string]interface{}
- func (in *VirtualService) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *VirtualService) SetSpec(spec map[string]interface{})
- type VirtualServiceList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDestinationRuleCircuitBreaker ¶
func CheckDestinationRuleCircuitBreaker(destinationRule IstioObject, namespace string, serviceName string, version string) bool
CheckDestinationRuleCircuitBreaker returns true if the destinationRule object includes a trafficPolicy configuration on connectionPool or outlierDetection. TrafficPolicy configuration can be defined at service level or per subset defined by a version. It returns false otherwise.
func CheckVirtualService ¶
func CheckVirtualService(virtualService IstioObject, namespace string, serviceName string) bool
CheckVirtualService returns true if virtualService object is defined for the service. It returns false otherwise.
func CheckVirtualServiceSubset ¶ added in v0.6.0
func CheckVirtualServiceSubset(virtualService IstioObject, namespace string, serviceName string, subsets []string) bool
CheckVirtualServiceSubset returns true if virtualService object has defined a route on a service for any subset passed as parameter. It returns false otherwise. TODO: Is this used?
func ConfigClient ¶
ConfigClient return a client with the correct configuration Returns configuration if Kiali is in Cluster when InCluster is true Returns configuration if Kiali is not int Cluster when InCluster is false It returns an error on any problem
func FilterByDestination ¶
func FilterByRoute ¶ added in v0.6.0
func FilterByRouteAndSubset ¶ added in v0.6.0
func FilterDeploymentsForService ¶
func FilterDeploymentsForService(s *v1.Service, servicePods []v1.Pod, allDepls *v1beta1.DeploymentList) []v1beta1.Deployment
FilterDeploymentsForService returns a subpart of deployments list filtered according to pods labels.
func FilterPodsForService ¶
FilterPodsForService returns a subpart of pod list filtered according service selector
func GatewayNames ¶ added in v0.7.0
func GatewayNames(gateways []IstioObject) map[string]struct{}
GatewayNames extracts the gateway names for easier matching
func GetDestinationRulesSubsets ¶
func GetDestinationRulesSubsets(destinationRules []IstioObject, serviceName, version string) []string
GetDestinationRulesSubsets returns an array of subset names where a specific version is defined for a given service
func GetSelectorAsString ¶ added in v0.7.0
func GetSelectorAsString(deployment *v1beta1.Deployment) (string, error)
GetSelectorAsString extracts the Selector used by a Deployment Returns a selector represented as a plain string
func NewNotFound ¶ added in v0.7.0
NewNotFound is a helper method to create a NotFound error similar as used by the kubernetes client. This method helps upper layers to send a explicit NotFound error without querying the backend.
func ServiceEntryHostnames ¶ added in v0.7.0
func ServiceEntryHostnames(serviceEntries []IstioObject) map[string]struct{}
ServiceEntryHostnames returns a list of hostnames defined in the ServiceEntries Specs. Key in the resulting map is the protocol (in lowercase) + hostname exported for test
func ValidateVirtualServiceGateways ¶ added in v0.7.0
func ValidateVirtualServiceGateways(spec map[string]interface{}, gatewayNames map[string]struct{}) bool
ValidateVirtualServiceGateways checks all VirtualService gateways (except mesh, which is reserved word) and checks that they're found from the given list of gatewayNames
Types ¶
type AppDetails ¶ added in v0.6.0
type AppDetails struct { Services []v1.Service Pods []v1.Pod Deployments []v1beta1.Deployment // contains filtered or unexported fields }
AppDetails holds Services, Pods and Deployments having the same "app" label
type DeploymentDetails ¶ added in v0.6.0
type DeploymentDetails struct { Deployment *v1beta1.Deployment `json:"deployment"` Pods *v1.PodList `json:"pods"` Services []v1.Service `json:"services"` }
DeploymentDetails is a wrapper to group full Deployment description, Services and Pods. Used to fetch all details in a single operation instead to invoke individual APIs per each group.
type DestinationRule ¶
type DestinationRule struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
DestinationRule is the generic Kubernetes API object wrapper DestinationRule starts with uppercase as it maps a "kind":"DestinationRule" Istio response.
func (*DestinationRule) DeepCopy ¶
func (in *DestinationRule) DeepCopy() *DestinationRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRule.
func (*DestinationRule) DeepCopyInto ¶
func (in *DestinationRule) DeepCopyInto(out *DestinationRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DestinationRule) DeepCopyIstioObject ¶
func (in *DestinationRule) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*DestinationRule) DeepCopyObject ¶
func (in *DestinationRule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DestinationRule) GetObjectMeta ¶
func (in *DestinationRule) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*DestinationRule) GetSpec ¶
func (in *DestinationRule) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*DestinationRule) SetObjectMeta ¶
func (in *DestinationRule) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*DestinationRule) SetSpec ¶
func (in *DestinationRule) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type DestinationRuleList ¶
type DestinationRuleList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []DestinationRule `json:"items"` }
DestinationRuleList is the generic Kubernetes API list wrapper DestinationRuleList starts with uppercase as it maps a "kind":"DestinationRuleList" Istio response.
func (*DestinationRuleList) DeepCopy ¶
func (in *DestinationRuleList) DeepCopy() *DestinationRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleList.
func (*DestinationRuleList) DeepCopyInto ¶
func (in *DestinationRuleList) DeepCopyInto(out *DestinationRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DestinationRuleList) DeepCopyObject ¶
func (in *DestinationRuleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DestinationRuleList) GetItems ¶
func (in *DestinationRuleList) GetItems() []IstioObject
GetItems from a wrapper
type Gateway ¶
type Gateway struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
Gateway is the generic Kubernetes API object wrapper Gateway starts with uppercase as it maps a "kind":"Gateway" Istio response.
func (*Gateway) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualService.
func (*Gateway) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Gateway) DeepCopyIstioObject ¶
func (in *Gateway) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*Gateway) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Gateway) GetObjectMeta ¶
func (in *Gateway) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*Gateway) SetObjectMeta ¶
func (in *Gateway) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
type GatewayList ¶
type GatewayList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []Gateway `json:"items"` }
GatewayList is the generic Kubernetes API list wrapper GatewayList starts with uppercase as it maps a "kind":"GatewayList" Istio response.
func (*GatewayList) DeepCopy ¶
func (in *GatewayList) DeepCopy() *GatewayList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceList.
func (*GatewayList) DeepCopyInto ¶
func (in *GatewayList) DeepCopyInto(out *GatewayList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GatewayList) DeepCopyObject ¶
func (in *GatewayList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GatewayList) GetItems ¶
func (in *GatewayList) GetItems() []IstioObject
GetItems from a wrapper
type IstioClient ¶
type IstioClient struct { IstioClientInterface // contains filtered or unexported fields }
IstioClient is the client struct for Kubernetes and Istio APIs It hides the way it queries each API
func NewClient ¶
func NewClient() (*IstioClient, error)
NewClient creates a new client to the Kubernetes and Istio APIs. It takes the assumption that Istio is deployed into the cluster. It hides the access to Kubernetes/Openshift credentials. It hides the low level use of the API of Kubernetes and Istio, it should be considered as an implementation detail. It returns an error on any problem.
func (*IstioClient) GetAppDetails ¶ added in v0.6.0
func (in *IstioClient) GetAppDetails(namespace, app string) (AppDetails, error)
TODO I think this method could fail as it is filtering services by app label TODO it should use getServicesByDeployment() instead GetAppDetails returns the app details (services, deployments and pods) for the input app label. It returns an error on any problem.
func (*IstioClient) GetDeployment ¶ added in v0.6.0
func (in *IstioClient) GetDeployment(namespace, deploymentName string) (*v1beta1.Deployment, error)
GetDeployment returns the definition of a specific deployment. It returns an error on any problem.
func (*IstioClient) GetDeploymentDetails ¶ added in v0.6.0
func (in *IstioClient) GetDeploymentDetails(namespace string, deploymentName string) (*DeploymentDetails, error)
func (*IstioClient) GetDeploymentSelector ¶ added in v0.6.0
func (in *IstioClient) GetDeploymentSelector(namespace, deploymentName string) (string, error)
GetDeploymentSelector returns the selector of a deployment given a namespace and a deployment names. It returns an error on any problem. Return all labels listed as a human readable string separated by ','
func (*IstioClient) GetDeployments ¶
func (in *IstioClient) GetDeployments(namespace string) (*v1beta1.DeploymentList, error)
GetDeployments returns a list of deployments for a given namespace. It returns an error on any problem.
func (*IstioClient) GetDeploymentsBySelector ¶ added in v0.7.0
func (in *IstioClient) GetDeploymentsBySelector(namespace string, labelSelector string) (*v1beta1.DeploymentList, error)
GetDeploymentsBySelector returns a list of deployments for a given namespace and a set of labels. It returns an error on any problem.
func (*IstioClient) GetDestinationRule ¶
func (in *IstioClient) GetDestinationRule(namespace string, destinationrule string) (IstioObject, error)
func (*IstioClient) GetDestinationRules ¶
func (in *IstioClient) GetDestinationRules(namespace string, serviceName string) ([]IstioObject, error)
GetDestinationRules returns all DestinationRules for a given namespace. If serviceName param is provided it will filter all DestinationRules having a host defined on a particular service. It returns an error on any problem.
func (*IstioClient) GetFullServices ¶ added in v0.5.0
func (in *IstioClient) GetFullServices(namespace string) (*ServiceList, error)
GetFullServices returns a list of services for a given namespace, along with its pods and deployments. It returns an error on any problem.
func (*IstioClient) GetGateway ¶
func (in *IstioClient) GetGateway(namespace string, gateway string) (IstioObject, error)
func (*IstioClient) GetGateways ¶
func (in *IstioClient) GetGateways(namespace string) ([]IstioObject, error)
GetGateways return all Gateways for a given namespace. It returns an error on any problem.
func (*IstioClient) GetIstioDetails ¶
func (in *IstioClient) GetIstioDetails(namespace string, serviceName string) (*IstioDetails, error)
GetIstioDetails returns Istio details for a given namespace, on this version it collects the VirtualServices and DestinationRules defined for a namespace. If serviceName param is provided, it filters all the Istio objects pointing to a particular service. It returns an error on any problem.
func (*IstioClient) GetIstioRuleDetails ¶
func (in *IstioClient) GetIstioRuleDetails(namespace string, istiorule string) (*IstioRuleDetails, error)
GetIstioRuleDetails returns the handlers and instances details for a given mixer rule. On this version, the following handlers and instances are supported:
- listchecker
- listentry
- denier
- checknothing
func (*IstioClient) GetIstioRules ¶
func (in *IstioClient) GetIstioRules(namespace string) (*IstioRules, error)
GetIstioRules returns a list of mixer rules for a given namespace.
func (*IstioClient) GetNamespaceAppsDetails ¶ added in v0.6.0
func (in *IstioClient) GetNamespaceAppsDetails(namespace string) (NamespaceApps, error)
GetNamespaceAppsDetails returns a map of apps details (services, deployments and pods) in the given namespace. The map key is the app label. Entities without app label are gathered under empty-string-key It returns an error on any problem.
func (*IstioClient) GetNamespacePods ¶
func (in *IstioClient) GetNamespacePods(namespace string) (*v1.PodList, error)
GetNamespacePods returns the pods definitions for a given namespace It returns an error on any problem.
func (*IstioClient) GetNamespaces ¶
func (in *IstioClient) GetNamespaces() (*v1.NamespaceList, error)
GetNamespaces returns a list of all namespaces of the cluster. It returns a list of all namespaces of the cluster. It returns an error on any problem.
func (*IstioClient) GetPods ¶
func (in *IstioClient) GetPods(namespace, labelSelector string) (*v1.PodList, error)
GetPods returns the pods definitions for a given set of labels. It returns an error on any problem.
func (*IstioClient) GetQuotaSpec ¶ added in v0.5.0
func (in *IstioClient) GetQuotaSpec(namespace string, quotaSpecName string) (IstioObject, error)
func (*IstioClient) GetQuotaSpecBinding ¶ added in v0.5.0
func (in *IstioClient) GetQuotaSpecBinding(namespace string, quotaSpecBindingName string) (IstioObject, error)
func (*IstioClient) GetQuotaSpecBindings ¶ added in v0.5.0
func (in *IstioClient) GetQuotaSpecBindings(namespace string) ([]IstioObject, error)
GetQuotaSpecBindings returns all QuotaSpecBindings objects for a given namespace. It returns an error on any problem.
func (*IstioClient) GetQuotaSpecs ¶ added in v0.5.0
func (in *IstioClient) GetQuotaSpecs(namespace string) ([]IstioObject, error)
GetQuotaSpecs returns all QuotaSpecs objects for a given namespace. It returns an error on any problem.
func (*IstioClient) GetService ¶
func (in *IstioClient) GetService(namespace, serviceName string) (*v1.Service, error)
GetService returns the definition of a specific service. It returns an error on any problem.
func (*IstioClient) GetServiceDetails ¶
func (in *IstioClient) GetServiceDetails(namespace string, serviceName string) (*ServiceDetails, error)
GetServiceDetails returns full details for a given service, consisting on service description, endpoints and pods. A service is defined by the namespace and the service name. It returns an error on any problem.
func (*IstioClient) GetServiceEntries ¶ added in v0.5.0
func (in *IstioClient) GetServiceEntries(namespace string) ([]IstioObject, error)
GetServiceEntries return all ServiceEntry objects for a given namespace. It returns an error on any problem.
func (*IstioClient) GetServiceEntry ¶ added in v0.5.0
func (in *IstioClient) GetServiceEntry(namespace string, serviceEntryName string) (IstioObject, error)
func (*IstioClient) GetServices ¶
func (in *IstioClient) GetServices(namespace string) (*v1.ServiceList, error)
GetServices returns a list of services for a given namespace. It returns an error on any problem.
func (*IstioClient) GetServicesByDeploymentSelector ¶ added in v0.7.0
func (in *IstioClient) GetServicesByDeploymentSelector(namespace string, deployment *v1beta1.Deployment) ([]v1.Service, error)
func (*IstioClient) GetVirtualService ¶
func (in *IstioClient) GetVirtualService(namespace string, virtualservice string) (IstioObject, error)
func (*IstioClient) GetVirtualServices ¶
func (in *IstioClient) GetVirtualServices(namespace string, serviceName string) ([]IstioObject, error)
GetVirtualServices return all VirtualServices for a given namespace. If serviceName param is provided it will filter all VirtualServices having a host defined on a particular service. It returns an error on any problem.
type IstioClientInterface ¶
type IstioClientInterface interface { GetNamespaces() (*v1.NamespaceList, error) GetService(namespace string, serviceName string) (*v1.Service, error) GetFullServices(namespace string) (*ServiceList, error) GetNamespaceAppsDetails(namespace string) (NamespaceApps, error) GetAppDetails(namespace, app string) (AppDetails, error) GetServices(namespace string) (*v1.ServiceList, error) GetServiceDetails(namespace string, serviceName string) (*ServiceDetails, error) GetPods(namespace, labelSelector string) (*v1.PodList, error) GetNamespacePods(namespace string) (*v1.PodList, error) GetIstioDetails(namespace string, serviceName string) (*IstioDetails, error) GetGateways(namespace string) ([]IstioObject, error) GetGateway(namespace string, gateway string) (IstioObject, error) GetServiceEntries(namespace string) ([]IstioObject, error) GetServiceEntry(namespace string, serviceEntryName string) (IstioObject, error) GetVirtualServices(namespace string, serviceName string) ([]IstioObject, error) GetVirtualService(namespace string, virtualservice string) (IstioObject, error) GetDestinationRules(namespace string, serviceName string) ([]IstioObject, error) GetDestinationRule(namespace string, destinationrule string) (IstioObject, error) GetIstioRules(namespace string) (*IstioRules, error) GetIstioRuleDetails(namespace string, istiorule string) (*IstioRuleDetails, error) GetQuotaSpecs(namespace string) ([]IstioObject, error) GetQuotaSpec(namespace string, quotaSpecName string) (IstioObject, error) GetQuotaSpecBindings(namespace string) ([]IstioObject, error) GetQuotaSpecBinding(namespace string, quotaSpecBindingName string) (IstioObject, error) GetDeployments(namespace string) (*v1beta1.DeploymentList, error) GetDeploymentsBySelector(namespace string, labelSelector string) (*v1beta1.DeploymentList, error) GetDeployment(namespace string, deploymentName string) (*v1beta1.Deployment, error) GetDeploymentDetails(namespace string, deploymentName string) (*DeploymentDetails, error) GetDeploymentSelector(namespace string, deploymentName string) (string, error) GetServicesByDeploymentSelector(namespace string, deployment *v1beta1.Deployment) ([]v1.Service, error) }
IstioClientInterface for mocks (only mocked function are necessary here)
type IstioDetails ¶
type IstioDetails struct { VirtualServices []IstioObject `json:"virtualservices"` DestinationRules []IstioObject `json:"destinationrules"` ServiceEntries []IstioObject `json:"serviceentries"` Gateways []IstioObject `json:"gateways"` }
IstioDetails is a wrapper to group all Istio objects related to a Service. Used to fetch all Istio information in a single operation instead to invoke individual APIs per each group.
type IstioObject ¶
type IstioObject interface { runtime.Object GetSpec() map[string]interface{} SetSpec(map[string]interface{}) GetObjectMeta() meta_v1.ObjectMeta SetObjectMeta(meta_v1.ObjectMeta) DeepCopyIstioObject() IstioObject }
IstioObject is a k8s wrapper interface for config objects. Taken from istio.io
type IstioObjectList ¶
type IstioObjectList interface { runtime.Object GetItems() []IstioObject }
IstioObjectList is a k8s wrapper interface for list config objects. Taken from istio.io
type IstioRuleAction ¶
type IstioRuleAction struct { Handler IstioObject `json:"handler"` Instances []IstioObject `json:"instances"` }
IstioRuleAction is a wrapper to group a handler object and a list of instances per a specific action.
type IstioRuleDetails ¶
type IstioRuleDetails struct { Rule IstioObject `json:"rule"` Actions []*IstioRuleAction `json:"actions"` }
IstioRuleDetails is a wrapper to group a mixer rule with its actions.
type IstioRules ¶
type IstioRules struct {
Rules []IstioObject `json:"rules"`
}
IstioRules is a wrapper to group all mixer rules related to a Namespace. Rules can have match expressions that may dynamically affect to several services.
type MockIstioObject ¶
type MockIstioObject struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
func (*MockIstioObject) DeepCopy ¶
func (in *MockIstioObject) DeepCopy() *MockIstioObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MockIstioObject.
func (*MockIstioObject) DeepCopyInto ¶
func (in *MockIstioObject) DeepCopyInto(out *MockIstioObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MockIstioObject) DeepCopyIstioObject ¶
func (in *MockIstioObject) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*MockIstioObject) DeepCopyObject ¶
func (in *MockIstioObject) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MockIstioObject) GetObjectMeta ¶
func (in *MockIstioObject) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*MockIstioObject) GetSpec ¶
func (in *MockIstioObject) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*MockIstioObject) SetObjectMeta ¶
func (in *MockIstioObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*MockIstioObject) SetSpec ¶
func (in *MockIstioObject) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type MockIstioObjectList ¶
type MockIstioObjectList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []MockIstioObject `json:"items"` }
MockIstioObjectList is the generic Kubernetes API list wrapper
func (*MockIstioObjectList) DeepCopy ¶
func (in *MockIstioObjectList) DeepCopy() *MockIstioObjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MockIstioObjectList.
func (*MockIstioObjectList) DeepCopyInto ¶
func (in *MockIstioObjectList) DeepCopyInto(out *MockIstioObjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MockIstioObjectList) DeepCopyObject ¶
func (in *MockIstioObjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MockIstioObjectList) GetItems ¶
func (in *MockIstioObjectList) GetItems() []IstioObject
GetItems from a wrapper
type NamespaceApps ¶ added in v0.6.0
type NamespaceApps = map[string]*AppDetails
NamespaceApps is a map of app_name x AppDetails
type OSRouteClient ¶
type OSRouteClient struct {
// contains filtered or unexported fields
}
OSRouteClient is the client struct for OpenShift Routes API over Kubernetes It hides the way it queries each API
func NewOSRouteClient ¶
func NewOSRouteClient() (*OSRouteClient, error)
NewOSRouteClient creates a new client able to fetch OpenShift Routes API.
type QuotaSpec ¶ added in v0.5.0
type QuotaSpec struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
QuotaSpec is the generic Kubernetes API object wrapper QuotaSpec starts with uppercase as it maps a "kind":"QuotaSpec" Istio response.
func (*QuotaSpec) DeepCopy ¶ added in v0.5.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaSpec.
func (*QuotaSpec) DeepCopyInto ¶ added in v0.5.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QuotaSpec) DeepCopyIstioObject ¶ added in v0.5.0
func (in *QuotaSpec) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*QuotaSpec) DeepCopyObject ¶ added in v0.5.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*QuotaSpec) GetObjectMeta ¶ added in v0.5.0
func (in *QuotaSpec) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*QuotaSpec) SetObjectMeta ¶ added in v0.5.0
func (in *QuotaSpec) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
type QuotaSpecBinding ¶ added in v0.5.0
type QuotaSpecBinding struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
QuotaSpecBinding is the generic Kubernetes API object wrapper QuotaSpecBinding starts with uppercase as it maps a "kind":"QuotaSpecBinding" Istio response.
func (*QuotaSpecBinding) DeepCopy ¶ added in v0.5.0
func (in *QuotaSpecBinding) DeepCopy() *QuotaSpecBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaSpecBinding.
func (*QuotaSpecBinding) DeepCopyInto ¶ added in v0.5.0
func (in *QuotaSpecBinding) DeepCopyInto(out *QuotaSpecBinding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QuotaSpecBinding) DeepCopyIstioObject ¶ added in v0.5.0
func (in *QuotaSpecBinding) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*QuotaSpecBinding) DeepCopyObject ¶ added in v0.5.0
func (in *QuotaSpecBinding) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*QuotaSpecBinding) GetObjectMeta ¶ added in v0.5.0
func (in *QuotaSpecBinding) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*QuotaSpecBinding) GetSpec ¶ added in v0.5.0
func (in *QuotaSpecBinding) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*QuotaSpecBinding) SetObjectMeta ¶ added in v0.5.0
func (in *QuotaSpecBinding) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*QuotaSpecBinding) SetSpec ¶ added in v0.5.0
func (in *QuotaSpecBinding) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type QuotaSpecBindingList ¶ added in v0.5.0
type QuotaSpecBindingList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []QuotaSpecBinding `json:"items"` }
QuotaSpecBindingList is the generic Kubernetes API list wrapper QuotaSpecBindingList starts with uppercase as it maps a "kind":"QuotaSpecBindingList" Istio response.
func (*QuotaSpecBindingList) DeepCopy ¶ added in v0.5.0
func (in *QuotaSpecBindingList) DeepCopy() *QuotaSpecBindingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleList.
func (*QuotaSpecBindingList) DeepCopyInto ¶ added in v0.5.0
func (in *QuotaSpecBindingList) DeepCopyInto(out *QuotaSpecBindingList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QuotaSpecBindingList) DeepCopyObject ¶ added in v0.5.0
func (in *QuotaSpecBindingList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*QuotaSpecBindingList) GetItems ¶ added in v0.5.0
func (in *QuotaSpecBindingList) GetItems() []IstioObject
GetItems from a wrapper
type QuotaSpecList ¶ added in v0.5.0
type QuotaSpecList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []QuotaSpec `json:"items"` }
QuotaSpecList is the generic Kubernetes API list wrapper QuotaSpecList starts with uppercase as it maps a "kind":"QuotaSpecList" Istio response.
func (*QuotaSpecList) DeepCopy ¶ added in v0.5.0
func (in *QuotaSpecList) DeepCopy() *QuotaSpecList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleList.
func (*QuotaSpecList) DeepCopyInto ¶ added in v0.5.0
func (in *QuotaSpecList) DeepCopyInto(out *QuotaSpecList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QuotaSpecList) DeepCopyObject ¶ added in v0.5.0
func (in *QuotaSpecList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*QuotaSpecList) GetItems ¶ added in v0.5.0
func (in *QuotaSpecList) GetItems() []IstioObject
GetItems from a wrapper
type ServiceDetails ¶
type ServiceDetails struct { Service *v1.Service `json:"service"` Endpoints *v1.Endpoints `json:"endpoints"` Deployments *v1beta1.DeploymentList `json:"deployments"` Autoscalers *autoscalingV1.HorizontalPodAutoscalerList `json:"autoscalers"` Pods []v1.Pod `json:"pods"` }
ServiceDetails is a wrapper to group full Service description, Endpoints and Pods. Used to fetch all details in a single operation instead to invoke individual APIs per each group.
type ServiceEntry ¶ added in v0.5.0
type ServiceEntry struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
ServiceEntry is the generic Kubernetes API object wrapper ServiceEntry starts with uppercase as it maps a "kind":"ServiceEntry" Istio response.
func (*ServiceEntry) DeepCopy ¶ added in v0.5.0
func (in *ServiceEntry) DeepCopy() *ServiceEntry
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualService.
func (*ServiceEntry) DeepCopyInto ¶ added in v0.5.0
func (in *ServiceEntry) DeepCopyInto(out *ServiceEntry)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceEntry) DeepCopyIstioObject ¶ added in v0.5.0
func (in *ServiceEntry) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*ServiceEntry) DeepCopyObject ¶ added in v0.5.0
func (in *ServiceEntry) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ServiceEntry) GetObjectMeta ¶ added in v0.5.0
func (in *ServiceEntry) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*ServiceEntry) GetSpec ¶ added in v0.5.0
func (in *ServiceEntry) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*ServiceEntry) SetObjectMeta ¶ added in v0.5.0
func (in *ServiceEntry) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*ServiceEntry) SetSpec ¶ added in v0.5.0
func (in *ServiceEntry) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type ServiceEntryList ¶ added in v0.5.0
type ServiceEntryList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []ServiceEntry `json:"items"` }
ServiceEntryList is the generic Kubernetes API list wrapper ServiceEntryList starts with uppercase as it maps a "kind":"ServiceEntryList" Istio response.
func (*ServiceEntryList) DeepCopy ¶ added in v0.5.0
func (in *ServiceEntryList) DeepCopy() *ServiceEntryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceList.
func (*ServiceEntryList) DeepCopyInto ¶ added in v0.5.0
func (in *ServiceEntryList) DeepCopyInto(out *ServiceEntryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceEntryList) DeepCopyObject ¶ added in v0.5.0
func (in *ServiceEntryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ServiceEntryList) GetItems ¶ added in v0.5.0
func (in *ServiceEntryList) GetItems() []IstioObject
GetItems from a wrapper
type ServiceList ¶
type ServiceList struct { Services *v1.ServiceList Pods *v1.PodList Deployments *v1beta1.DeploymentList }
ServiceList holds list of services, pods and deployments
type VirtualService ¶
type VirtualService struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
VirtualService is the generic Kubernetes API object wrapper VirtualService starts with uppercase as it maps a "kind":"VirtualService" Istio response.
func (*VirtualService) DeepCopy ¶
func (in *VirtualService) DeepCopy() *VirtualService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualService.
func (*VirtualService) DeepCopyInto ¶
func (in *VirtualService) DeepCopyInto(out *VirtualService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualService) DeepCopyIstioObject ¶
func (in *VirtualService) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*VirtualService) DeepCopyObject ¶
func (in *VirtualService) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VirtualService) GetObjectMeta ¶
func (in *VirtualService) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*VirtualService) GetSpec ¶
func (in *VirtualService) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*VirtualService) SetObjectMeta ¶
func (in *VirtualService) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*VirtualService) SetSpec ¶
func (in *VirtualService) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type VirtualServiceList ¶
type VirtualServiceList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []VirtualService `json:"items"` }
VirtualServiceList is the generic Kubernetes API list wrapper VirtualServiceList starts with uppercase as it maps a "kind":"VirtualServiceList" Istio response.
func (*VirtualServiceList) DeepCopy ¶
func (in *VirtualServiceList) DeepCopy() *VirtualServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceList.
func (*VirtualServiceList) DeepCopyInto ¶
func (in *VirtualServiceList) DeepCopyInto(out *VirtualServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualServiceList) DeepCopyObject ¶
func (in *VirtualServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VirtualServiceList) GetItems ¶
func (in *VirtualServiceList) GetItems() []IstioObject
GetItems from a wrapper
Source Files ¶
- client.go
- istio_adapters_type.go
- istio_destination_rule_type.go
- istio_details_service.go
- istio_gateway_type.go
- istio_quotaspec_type.go
- istio_quotaspecbinding_type.go
- istio_rule_type.go
- istio_rules_service.go
- istio_serviceentry_type.go
- istio_templates_type.go
- istio_virtual_service_type.go
- kubernetes_service.go
- mock_istio_object_type.go
- os_route_client.go
- types.go