Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigClient() (*rest.Config, error)
- func DestinationRuleHasMTLSEnabledForHost(expectedHost string, destinationRule IstioObject) (bool, string)
- func DestinationRuleHasMeshWideMTLSEnabled(destinationRule IstioObject) (bool, string)
- func DestinationRuleHasNamespaceWideMTLSEnabled(namespace string, destinationRule IstioObject) (bool, string)
- func FilterByHost(host, serviceName, namespace string) bool
- func FilterByRoute(spec map[string]interface{}, protocols []string, service string, ...) bool
- func FilterPodsForController(controllerName string, controllerType string, allPods []core_v1.Pod) []core_v1.Pod
- func FilterPodsForEndpoints(endpoints *core_v1.Endpoints, unfiltered []core_v1.Pod) []core_v1.Pod
- func FilterPodsForSelector(selector labels.Selector, allPods []core_v1.Pod) []core_v1.Pod
- func FilterPodsForService(s *core_v1.Service, allPods []core_v1.Pod) []core_v1.Pod
- func FilterServicesForSelector(selector labels.Selector, allServices []core_v1.Service) []core_v1.Service
- func GatewayNames(gateways [][]IstioObject) map[string]struct{}
- func GetKialiToken() (string, error)
- func HasMatchingServiceEntries(service string, serviceEntries map[string][]string) bool
- func HasMatchingServices(service string, services []core_v1.Service) bool
- func HasMatchingWorkloads(service string, workloadList []map[string]string) bool
- func MatchPortNameRule(portName, protocol string) bool
- func MatchPortNameWithValidProtocols(portName string) bool
- func NewNotFound(name, group, resource string) error
- func ParseTwoPartHost(host Host) (string, string)
- func PolicyHasMTLSEnabled(policy IstioObject) (bool, string)
- func PolicyHasStrictMTLS(policy IstioObject) bool
- func ServiceEntryHostnames(serviceEntries []IstioObject) map[string][]string
- func ValidatePort(portDef interface{}) bool
- type ClientFactory
- type GenericIstioObject
- func (in *GenericIstioObject) DeepCopy() *GenericIstioObject
- func (in *GenericIstioObject) DeepCopyInto(out *GenericIstioObject)
- func (in *GenericIstioObject) DeepCopyIstioObject() IstioObject
- func (in *GenericIstioObject) DeepCopyObject() runtime.Object
- func (in *GenericIstioObject) GetObjectMeta() meta_v1.ObjectMeta
- func (in *GenericIstioObject) GetSpec() map[string]interface{}
- func (in *GenericIstioObject) GetTypeMeta() meta_v1.TypeMeta
- func (in *GenericIstioObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *GenericIstioObject) SetSpec(spec map[string]interface{})
- func (in *GenericIstioObject) SetTypeMeta(typemeta meta_v1.TypeMeta)
- type GenericIstioObjectList
- type Host
- type IstioClient
- func (in *IstioClient) CreateIstioObject(api, namespace, resourceType, json string) (IstioObject, error)
- func (in *IstioClient) CreateIter8Experiment(namespace string, json string) (Iter8Experiment, error)
- func (in *IstioClient) DeleteIstioObject(api, namespace, resourceType, name string) error
- func (in *IstioClient) GetAdapter(namespace, adapterType, adapterName string) (IstioObject, error)
- func (in *IstioClient) GetAdapters(namespace, labelSelector string) ([]IstioObject, error)
- func (in *IstioClient) GetAuthorizationDetails(namespace string) (*RBACDetails, error)
- func (in *IstioClient) GetAuthorizationPolicies(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetAuthorizationPolicy(namespace string, name string) (IstioObject, error)
- func (in *IstioClient) GetClusterRbacConfig(name string) (IstioObject, error)
- func (in *IstioClient) GetClusterRbacConfigs() ([]IstioObject, error)
- func (in *IstioClient) GetCronJobs(namespace string) ([]batch_v1beta1.CronJob, error)
- func (in *IstioClient) GetDeployment(namespace, deploymentName string) (*apps_v1.Deployment, error)
- func (in *IstioClient) GetDeploymentConfig(namespace, deploymentconfigName string) (*osapps_v1.DeploymentConfig, error)
- func (in *IstioClient) GetDeploymentConfigs(namespace string) ([]osapps_v1.DeploymentConfig, error)
- func (in *IstioClient) GetDeployments(namespace string) ([]apps_v1.Deployment, error)
- func (in *IstioClient) GetDeploymentsByLabel(namespace string, labelSelector string) ([]apps_v1.Deployment, error)
- func (in *IstioClient) GetDestinationRule(namespace string, destinationrule string) (IstioObject, error)
- func (in *IstioClient) GetDestinationRules(namespace string, serviceName string) ([]IstioObject, error)
- func (in *IstioClient) GetEndpoints(namespace, serviceName string) (*core_v1.Endpoints, error)
- func (in *IstioClient) GetGateway(namespace string, gateway string) (IstioObject, error)
- func (in *IstioClient) GetGateways(namespace string) ([]IstioObject, error)
- func (client *IstioClient) GetIstioConfigApi() *rest.RESTClient
- func (client *IstioClient) GetIstioNetworkingApi() *rest.RESTClient
- func (client *IstioClient) GetIstioRbacApi() *rest.RESTClient
- func (in *IstioClient) GetIstioRule(namespace string, istiorule string) (IstioObject, error)
- func (in *IstioClient) GetIstioRules(namespace string, labelSelector string) ([]IstioObject, error)
- func (client *IstioClient) GetIstioSecurityApi() *rest.RESTClient
- func (in *IstioClient) GetIter8Experiment(namespace string, name string) (Iter8Experiment, error)
- func (in *IstioClient) GetIter8Experiments(namespace string) ([]Iter8Experiment, error)
- func (in *IstioClient) GetJobs(namespace string) ([]batch_v1.Job, error)
- func (client *IstioClient) GetK8sApi() *kube.Clientset
- func (in *IstioClient) GetMeshPolicies() ([]IstioObject, error)
- func (in *IstioClient) GetMeshPolicy(policyName string) (IstioObject, error)
- func (in *IstioClient) GetNamespace(namespace string) (*core_v1.Namespace, error)
- func (in *IstioClient) GetNamespaces(labelSelector string) ([]core_v1.Namespace, error)
- func (in *IstioClient) GetPod(namespace, name string) (*core_v1.Pod, error)
- func (in *IstioClient) GetPodLogs(namespace, name string, opts *core_v1.PodLogOptions) (*PodLogs, error)
- func (in *IstioClient) GetPods(namespace, labelSelector string) ([]core_v1.Pod, error)
- func (in *IstioClient) GetPolicies(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetPolicy(namespace string, policyName string) (IstioObject, error)
- func (in *IstioClient) GetProject(name string) (*osproject_v1.Project, error)
- func (in *IstioClient) GetProjects(labelSelector string) ([]osproject_v1.Project, 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) GetRbacConfig(namespace string, name string) (IstioObject, error)
- func (in *IstioClient) GetRbacConfigs(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetReplicaSets(namespace string) ([]apps_v1.ReplicaSet, error)
- func (in *IstioClient) GetReplicationControllers(namespace string) ([]core_v1.ReplicationController, error)
- func (in *IstioClient) GetRoute(namespace, name string) (*osroutes_v1.Route, error)
- func (in *IstioClient) GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error)
- func (in *IstioClient) GetServerVersion() (*version.Info, error)
- func (in *IstioClient) GetService(namespace, serviceName string) (*core_v1.Service, error)
- func (in *IstioClient) GetServiceEntries(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetServiceEntry(namespace string, serviceEntryName string) (IstioObject, error)
- func (in *IstioClient) GetServiceMeshPolicies(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetServiceMeshPolicy(namespace string, name string) (IstioObject, error)
- func (in *IstioClient) GetServiceMeshRbacConfig(namespace string, name string) (IstioObject, error)
- func (in *IstioClient) GetServiceMeshRbacConfigs(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetServiceRole(namespace string, name string) (IstioObject, error)
- func (in *IstioClient) GetServiceRoleBinding(namespace string, name string) (IstioObject, error)
- func (in *IstioClient) GetServiceRoleBindings(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetServiceRoles(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetServices(namespace string, selectorLabels map[string]string) ([]core_v1.Service, error)
- func (in *IstioClient) GetSidecar(namespace string, sidecar string) (IstioObject, error)
- func (in *IstioClient) GetSidecars(namespace string) ([]IstioObject, error)
- func (in *IstioClient) GetStatefulSet(namespace string, statefulsetName string) (*apps_v1.StatefulSet, error)
- func (in *IstioClient) GetStatefulSets(namespace string) ([]apps_v1.StatefulSet, error)
- func (in *IstioClient) GetTemplate(namespace, templateType, templateName string) (IstioObject, error)
- func (in *IstioClient) GetTemplates(namespace, labelSelector string) ([]IstioObject, error)
- func (client *IstioClient) GetToken() string
- func (in *IstioClient) GetVirtualService(namespace string, virtualservice string) (IstioObject, error)
- func (in *IstioClient) GetVirtualServices(namespace string, serviceName string) ([]IstioObject, error)
- func (in *IstioClient) IsIter8Api() bool
- func (in *IstioClient) IsMaistraApi() bool
- func (in *IstioClient) IsOpenShift() bool
- func (in *IstioClient) UpdateIstioObject(api, namespace, resourceType, name, jsonPatch string) (IstioObject, error)
- type IstioClientInterface
- type IstioDetails
- type IstioObject
- type IstioObjectList
- type Iter8ClientInterface
- type Iter8Experiment
- type Iter8ExperimentList
- type Iter8ExperimentMetrics
- type Iter8ExperimentObject
- func (in *Iter8ExperimentObject) DeepCopy() *Iter8ExperimentObject
- func (in *Iter8ExperimentObject) DeepCopyInto(out *Iter8ExperimentObject)
- func (in *Iter8ExperimentObject) DeepCopyIter8Object() Iter8Experiment
- func (in *Iter8ExperimentObject) DeepCopyObject() runtime.Object
- func (in *Iter8ExperimentObject) GetMetrics() Iter8ExperimentMetrics
- func (in *Iter8ExperimentObject) GetObjectMeta() meta_v1.ObjectMeta
- func (in *Iter8ExperimentObject) GetSpec() Iter8ExperimentSpec
- func (in *Iter8ExperimentObject) GetStatus() Iter8ExperimentStatus
- func (in *Iter8ExperimentObject) GetTypeMeta() meta_v1.TypeMeta
- func (in *Iter8ExperimentObject) SetMetrics(metrics Iter8ExperimentMetrics)
- func (in *Iter8ExperimentObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *Iter8ExperimentObject) SetSpec(spec Iter8ExperimentSpec)
- func (in *Iter8ExperimentObject) SetStatus(status Iter8ExperimentStatus)
- func (in *Iter8ExperimentObject) SetTypeMeta(typemeta meta_v1.TypeMeta)
- type Iter8ExperimentObjectList
- type Iter8ExperimentSpec
- type Iter8ExperimentStatus
- type MTLSDetails
- type PodLogs
- type RBACDetails
- type ServiceDetails
- type ServiceList
Constants ¶
const ( // Kubernetes Controllers CronJobType = "CronJob" DeploymentType = "Deployment" DeploymentConfigType = "DeploymentConfig" JobType = "Job" PodType = "Pod" ReplicationControllerType = "ReplicationController" ReplicaSetType = "ReplicaSet" ServiceType = "Service" StatefulSetType = "StatefulSet" DestinationRules = "destinationrules" DestinationRuleType = "DestinationRule" DestinationRuleTypeList = "DestinationRuleList" Gateways = "gateways" GatewayType = "Gateway" GatewayTypeList = "GatewayList" Sidecars = "sidecars" SidecarType = "Sidecar" SidecarTypeList = "SidecarList" Serviceentries = "serviceentries" ServiceentryType = "ServiceEntry" ServiceentryTypeList = "ServiceEntryList" VirtualServices = "virtualservices" VirtualServiceType = "VirtualService" VirtualServiceTypeList = "VirtualServiceList" )
Variables ¶
var ( ConfigGroupVersion = schema.GroupVersion{ Group: "config.istio.io", Version: "v1alpha2", } ApiConfigVersion = ConfigGroupVersion.Group + "/" + ConfigGroupVersion.Version NetworkingGroupVersion = schema.GroupVersion{ Group: "networking.istio.io", Version: "v1alpha3", } ApiNetworkingVersion = NetworkingGroupVersion.Group + "/" + NetworkingGroupVersion.Version AuthenticationGroupVersion = schema.GroupVersion{ Group: "authentication.istio.io", Version: "v1alpha1", } ApiAuthenticationVersion = AuthenticationGroupVersion.Group + "/" + AuthenticationGroupVersion.Version RbacGroupVersion = schema.GroupVersion{ Group: "rbac.istio.io", Version: "v1alpha1", } ApiRbacVersion = RbacGroupVersion.Group + "/" + RbacGroupVersion.Version MaistraAuthenticationGroupVersion = schema.GroupVersion{ Group: "authentication.maistra.io", Version: "v1", } ApiMaistraAuthenticationVersion = MaistraAuthenticationGroupVersion.Group + "/" + MaistraAuthenticationGroupVersion.Version MaistraRbacGroupVersion = schema.GroupVersion{ Group: "rbac.maistra.io", Version: "v1", } ApiMaistraRbacVersion = MaistraRbacGroupVersion.Group + "/" + MaistraRbacGroupVersion.Version SecurityGroupVersion = schema.GroupVersion{ Group: "security.istio.io", Version: "v1beta1", } ApiSecurityVersion = SecurityGroupVersion.Group + "/" + SecurityGroupVersion.Version // We will add a new extesion API in a similar way as we added the Kubernetes + Istio APIs Iter8GroupVersion = schema.GroupVersion{ Group: "iter8.tools", Version: "v1alpha1", } ApiIter8Version = Iter8GroupVersion.Group + "/" + Iter8GroupVersion.Version PluralType = map[string]string{ Gateways: GatewayType, VirtualServices: VirtualServiceType, DestinationRules: DestinationRuleType, Serviceentries: ServiceentryType, Sidecars: SidecarType, // contains filtered or unexported fields } )
var KialiToken string
Functions ¶
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 DestinationRuleHasMTLSEnabledForHost ¶ added in v0.16.0
func DestinationRuleHasMTLSEnabledForHost(expectedHost string, destinationRule IstioObject) (bool, string)
func DestinationRuleHasMeshWideMTLSEnabled ¶ added in v0.16.0
func DestinationRuleHasMeshWideMTLSEnabled(destinationRule IstioObject) (bool, string)
func DestinationRuleHasNamespaceWideMTLSEnabled ¶ added in v0.16.0
func DestinationRuleHasNamespaceWideMTLSEnabled(namespace string, destinationRule IstioObject) (bool, string)
func FilterByHost ¶
func FilterByRoute ¶ added in v0.6.0
func FilterPodsForController ¶ added in v0.9.0
func FilterPodsForEndpoints ¶ added in v0.8.0
FilterPodsForEndpoints performs a second pass was selector may return too many data This case happens when a "nil" selector (such as one of default/kubernetes service) is used
func FilterPodsForSelector ¶ added in v0.9.0
func FilterPodsForService ¶
FilterPodsForService returns a subpart of pod list filtered according service selector
func FilterServicesForSelector ¶ added in v0.9.0
func GatewayNames ¶ added in v0.7.0
func GatewayNames(gateways [][]IstioObject) map[string]struct{}
GatewayNames extracts the gateway names for easier matching
func GetKialiToken ¶ added in v0.21.0
func HasMatchingServiceEntries ¶ added in v1.15.0
func HasMatchingServices ¶ added in v1.15.0
func HasMatchingWorkloads ¶ added in v1.15.0
func MatchPortNameRule ¶ added in v0.19.0
func MatchPortNameWithValidProtocols ¶ added in v0.19.0
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 ParseTwoPartHost ¶ added in v1.15.0
func PolicyHasMTLSEnabled ¶ added in v0.16.0
func PolicyHasMTLSEnabled(policy IstioObject) (bool, string)
func PolicyHasStrictMTLS ¶ added in v0.17.0
func PolicyHasStrictMTLS(policy IstioObject) bool
func ServiceEntryHostnames ¶ added in v0.7.0
func ServiceEntryHostnames(serviceEntries []IstioObject) map[string][]string
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 ValidatePort ¶ added in v0.15.0
func ValidatePort(portDef interface{}) bool
ValidaPort parses the Istio Port definition and validates the naming scheme
Types ¶
type ClientFactory ¶ added in v0.16.0
type ClientFactory interface {
GetClient(token string) (IstioClientInterface, error)
}
ClientFactory interface for the clientFactory object
func GetClientFactory ¶ added in v0.17.0
func GetClientFactory() (ClientFactory, error)
GetClientFactory returns the client factory. Creates a new one if necessary
type GenericIstioObject ¶ added in v0.11.0
type GenericIstioObject struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
GenericIstioObject is a type to test Istio types defined by Istio as a Kubernetes extension.
func (*GenericIstioObject) DeepCopy ¶ added in v0.11.0
func (in *GenericIstioObject) DeepCopy() *GenericIstioObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericIstioObject.
func (*GenericIstioObject) DeepCopyInto ¶ added in v0.11.0
func (in *GenericIstioObject) DeepCopyInto(out *GenericIstioObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GenericIstioObject) DeepCopyIstioObject ¶ added in v0.11.0
func (in *GenericIstioObject) DeepCopyIstioObject() IstioObject
DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (*GenericIstioObject) DeepCopyObject ¶ added in v0.11.0
func (in *GenericIstioObject) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GenericIstioObject) GetObjectMeta ¶ added in v0.11.0
func (in *GenericIstioObject) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*GenericIstioObject) GetSpec ¶ added in v0.11.0
func (in *GenericIstioObject) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*GenericIstioObject) GetTypeMeta ¶ added in v0.16.0
func (in *GenericIstioObject) GetTypeMeta() meta_v1.TypeMeta
GetTypeMeta from a wrapper
func (*GenericIstioObject) SetObjectMeta ¶ added in v0.11.0
func (in *GenericIstioObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*GenericIstioObject) SetSpec ¶ added in v0.11.0
func (in *GenericIstioObject) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
func (*GenericIstioObject) SetTypeMeta ¶ added in v0.16.0
func (in *GenericIstioObject) SetTypeMeta(typemeta meta_v1.TypeMeta)
SetObjectMeta for a wrapper
type GenericIstioObjectList ¶ added in v0.11.0
type GenericIstioObjectList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []GenericIstioObject `json:"items"` }
GenericIstioObjectList is the generic Kubernetes API list wrapper
func (*GenericIstioObjectList) DeepCopy ¶ added in v0.11.0
func (in *GenericIstioObjectList) DeepCopy() *GenericIstioObjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericIstioObjectList.
func (*GenericIstioObjectList) DeepCopyInto ¶ added in v0.11.0
func (in *GenericIstioObjectList) DeepCopyInto(out *GenericIstioObjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GenericIstioObjectList) DeepCopyObject ¶ added in v0.11.0
func (in *GenericIstioObjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GenericIstioObjectList) GetItems ¶ added in v0.11.0
func (in *GenericIstioObjectList) GetItems() []IstioObject
GetItems from a wrapper
type Host ¶ added in v0.15.0
type Host struct { Service string Namespace string Cluster string // CompleteInput is true when Service, Namespace and Cluster fields are present. // It is true for simple service names and FQDN services. // It is false for service.namespace format and service entries. CompleteInput bool }
Host represents the FQDN format for Istio hostnames
func GetHost ¶ added in v1.12.0
GetHost parses hostName and returns a Host struct. It considers Namespaces in the cluster to be more accurate when deciding if the hostName is a ServiceEntry or a service.namespace host definition.
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 NewClientFromConfig ¶ added in v0.9.0
func NewClientFromConfig(config *rest.Config) (*IstioClient, error)
NewClientFromConfig 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) CreateIstioObject ¶ added in v0.14.0
func (in *IstioClient) CreateIstioObject(api, namespace, resourceType, json string) (IstioObject, error)
CreateIstioObject creates an Istio object
func (*IstioClient) CreateIter8Experiment ¶ added in v1.15.0
func (in *IstioClient) CreateIter8Experiment(namespace string, json string) (Iter8Experiment, error)
func (*IstioClient) DeleteIstioObject ¶ added in v0.9.1
func (in *IstioClient) DeleteIstioObject(api, namespace, resourceType, name string) error
DeleteIstioObject deletes an Istio object from either config api or networking api
func (*IstioClient) GetAdapter ¶ added in v0.11.0
func (in *IstioClient) GetAdapter(namespace, adapterType, adapterName string) (IstioObject, error)
func (*IstioClient) GetAdapters ¶ added in v0.11.0
func (in *IstioClient) GetAdapters(namespace, labelSelector string) ([]IstioObject, error)
func (*IstioClient) GetAuthorizationDetails ¶ added in v0.17.0
func (in *IstioClient) GetAuthorizationDetails(namespace string) (*RBACDetails, error)
GetAuthorizationDetails returns ServiceRoles, ServiceRoleBindings and ClusterRbacDetails
func (*IstioClient) GetAuthorizationPolicies ¶ added in v1.12.0
func (in *IstioClient) GetAuthorizationPolicies(namespace string) ([]IstioObject, error)
func (*IstioClient) GetAuthorizationPolicy ¶ added in v1.12.0
func (in *IstioClient) GetAuthorizationPolicy(namespace string, name string) (IstioObject, error)
func (*IstioClient) GetClusterRbacConfig ¶ added in v0.15.0
func (in *IstioClient) GetClusterRbacConfig(name string) (IstioObject, error)
func (*IstioClient) GetClusterRbacConfigs ¶ added in v0.15.0
func (in *IstioClient) GetClusterRbacConfigs() ([]IstioObject, error)
func (*IstioClient) GetCronJobs ¶ added in v0.9.0
func (in *IstioClient) GetCronJobs(namespace string) ([]batch_v1beta1.CronJob, error)
func (*IstioClient) GetDeployment ¶ added in v0.6.0
func (in *IstioClient) GetDeployment(namespace, deploymentName string) (*apps_v1.Deployment, error)
GetDeployment returns the definition of a specific deployment. It returns an error on any problem.
func (*IstioClient) GetDeploymentConfig ¶ added in v0.9.0
func (in *IstioClient) GetDeploymentConfig(namespace, deploymentconfigName string) (*osapps_v1.DeploymentConfig, error)
GetDeployment returns the definition of a specific deployment. It returns an error on any problem.
func (*IstioClient) GetDeploymentConfigs ¶ added in v0.9.0
func (in *IstioClient) GetDeploymentConfigs(namespace string) ([]osapps_v1.DeploymentConfig, error)
GetDeployments returns an array of deployments for a given namespace. An empty labelSelector will fetch all Deployments for a namespace. It returns an error on any problem.
func (*IstioClient) GetDeployments ¶
func (in *IstioClient) GetDeployments(namespace string) ([]apps_v1.Deployment, error)
GetDeployments returns an array of deployments for a given namespace. It returns an error on any problem.
func (*IstioClient) GetDeploymentsByLabel ¶ added in v0.20.0
func (in *IstioClient) GetDeploymentsByLabel(namespace string, labelSelector string) ([]apps_v1.Deployment, error)
GetDeployments returns an array of deployments for a given namespace and a set of labels. An empty labelSelector will fetch all Deployments for a namespace. 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) GetEndpoints ¶ added in v0.8.0
func (in *IstioClient) GetEndpoints(namespace, serviceName string) (*core_v1.Endpoints, error)
GetEndpoints return the list of endpoint of a specific service. 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) GetIstioConfigApi ¶ added in v0.9.0
func (client *IstioClient) GetIstioConfigApi() *rest.RESTClient
GetIstioConfigApi returns the istio config rest client
func (*IstioClient) GetIstioNetworkingApi ¶ added in v0.9.0
func (client *IstioClient) GetIstioNetworkingApi() *rest.RESTClient
GetIstioNetworkingApi returns the istio config rest client
func (*IstioClient) GetIstioRbacApi ¶ added in v0.15.0
func (client *IstioClient) GetIstioRbacApi() *rest.RESTClient
GetIstioRbacApi returns the istio rbac rest client
func (*IstioClient) GetIstioRule ¶ added in v0.11.0
func (in *IstioClient) GetIstioRule(namespace string, istiorule string) (IstioObject, error)
func (*IstioClient) GetIstioRules ¶
func (in *IstioClient) GetIstioRules(namespace string, labelSelector string) ([]IstioObject, error)
GetIstioRules returns a list of mixer rules for a given namespace.
func (*IstioClient) GetIstioSecurityApi ¶ added in v1.12.0
func (client *IstioClient) GetIstioSecurityApi() *rest.RESTClient
GetIstioSecurityApi returns the istio security rest client
func (*IstioClient) GetIter8Experiment ¶ added in v1.15.0
func (in *IstioClient) GetIter8Experiment(namespace string, name string) (Iter8Experiment, error)
func (*IstioClient) GetIter8Experiments ¶ added in v1.15.0
func (in *IstioClient) GetIter8Experiments(namespace string) ([]Iter8Experiment, error)
func (*IstioClient) GetJobs ¶ added in v0.9.0
func (in *IstioClient) GetJobs(namespace string) ([]batch_v1.Job, error)
func (*IstioClient) GetK8sApi ¶ added in v0.9.0
func (client *IstioClient) GetK8sApi() *kube.Clientset
GetK8sApi returns the clientset referencing all K8s rest clients
func (*IstioClient) GetMeshPolicies ¶ added in v0.15.0
func (in *IstioClient) GetMeshPolicies() ([]IstioObject, error)
func (*IstioClient) GetMeshPolicy ¶ added in v0.15.0
func (in *IstioClient) GetMeshPolicy(policyName string) (IstioObject, error)
func (*IstioClient) GetNamespace ¶ added in v0.9.1
func (in *IstioClient) GetNamespace(namespace string) (*core_v1.Namespace, error)
GetNamespace fetches and returns the specified namespace definition from the cluster
func (*IstioClient) GetNamespaces ¶
func (in *IstioClient) GetNamespaces(labelSelector string) ([]core_v1.Namespace, 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) GetPod ¶ added in v0.18.0
func (in *IstioClient) GetPod(namespace, name string) (*core_v1.Pod, error)
GetPod returns the pod definitions for a given pod name. It returns an error on any problem.
func (*IstioClient) GetPodLogs ¶ added in v0.18.0
func (in *IstioClient) GetPodLogs(namespace, name string, opts *core_v1.PodLogOptions) (*PodLogs, error)
GetPod returns the pod definitions for a given pod name. It returns an error on any problem.
func (*IstioClient) GetPods ¶
func (in *IstioClient) GetPods(namespace, labelSelector string) ([]core_v1.Pod, error)
GetPods returns the pods definitions for a given set of labels. An empty labelSelector will fetch all pods found per a namespace. It returns an error on any problem.
func (*IstioClient) GetPolicies ¶ added in v0.14.0
func (in *IstioClient) GetPolicies(namespace string) ([]IstioObject, error)
func (*IstioClient) GetPolicy ¶ added in v0.14.0
func (in *IstioClient) GetPolicy(namespace string, policyName string) (IstioObject, error)
func (*IstioClient) GetProject ¶ added in v0.9.1
func (in *IstioClient) GetProject(name string) (*osproject_v1.Project, error)
GetProject fetches and returns the definition of the project with the specified name by querying the cluster API. GetProject will fail if the underlying cluster is not Openshift.
func (*IstioClient) GetProjects ¶ added in v0.8.0
func (in *IstioClient) GetProjects(labelSelector string) ([]osproject_v1.Project, error)
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) GetRbacConfig ¶ added in v0.16.0
func (in *IstioClient) GetRbacConfig(namespace string, name string) (IstioObject, error)
func (*IstioClient) GetRbacConfigs ¶ added in v0.16.0
func (in *IstioClient) GetRbacConfigs(namespace string) ([]IstioObject, error)
func (*IstioClient) GetReplicaSets ¶ added in v0.9.0
func (in *IstioClient) GetReplicaSets(namespace string) ([]apps_v1.ReplicaSet, error)
func (*IstioClient) GetReplicationControllers ¶ added in v0.9.0
func (in *IstioClient) GetReplicationControllers(namespace string) ([]core_v1.ReplicationController, error)
func (*IstioClient) GetRoute ¶ added in v0.20.0
func (in *IstioClient) GetRoute(namespace, name string) (*osroutes_v1.Route, error)
GetRoute returns the external URL endpoint of a specific route name. It returns an error on any problem.
func (*IstioClient) GetSelfSubjectAccessReview ¶ added in v0.9.1
func (in *IstioClient) GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error)
GetSelfSubjectAccessReview provides information on Kiali permissions
func (*IstioClient) GetServerVersion ¶ added in v0.20.0
func (in *IstioClient) GetServerVersion() (*version.Info, error)
GetServerVersion fetches and returns information about the version Kubernetes that is running
func (*IstioClient) GetService ¶
func (in *IstioClient) GetService(namespace, serviceName string) (*core_v1.Service, error)
GetService returns the definition of a specific service. 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) GetServiceMeshPolicies ¶ added in v1.0.4
func (in *IstioClient) GetServiceMeshPolicies(namespace string) ([]IstioObject, error)
func (*IstioClient) GetServiceMeshPolicy ¶ added in v1.0.4
func (in *IstioClient) GetServiceMeshPolicy(namespace string, name string) (IstioObject, error)
func (*IstioClient) GetServiceMeshRbacConfig ¶ added in v1.0.4
func (in *IstioClient) GetServiceMeshRbacConfig(namespace string, name string) (IstioObject, error)
func (*IstioClient) GetServiceMeshRbacConfigs ¶ added in v1.0.4
func (in *IstioClient) GetServiceMeshRbacConfigs(namespace string) ([]IstioObject, error)
func (*IstioClient) GetServiceRole ¶ added in v0.15.0
func (in *IstioClient) GetServiceRole(namespace string, name string) (IstioObject, error)
func (*IstioClient) GetServiceRoleBinding ¶ added in v0.15.0
func (in *IstioClient) GetServiceRoleBinding(namespace string, name string) (IstioObject, error)
func (*IstioClient) GetServiceRoleBindings ¶ added in v0.15.0
func (in *IstioClient) GetServiceRoleBindings(namespace string) ([]IstioObject, error)
func (*IstioClient) GetServiceRoles ¶ added in v0.15.0
func (in *IstioClient) GetServiceRoles(namespace string) ([]IstioObject, error)
func (*IstioClient) GetServices ¶
func (in *IstioClient) GetServices(namespace string, selectorLabels map[string]string) ([]core_v1.Service, error)
GetServices returns a list of services for a given namespace. If selectorLabels is defined the list of services is filtered for those that matches Services selector labels. It returns an error on any problem.
func (*IstioClient) GetSidecar ¶ added in v0.21.0
func (in *IstioClient) GetSidecar(namespace string, sidecar string) (IstioObject, error)
func (*IstioClient) GetSidecars ¶ added in v0.21.0
func (in *IstioClient) GetSidecars(namespace string) ([]IstioObject, error)
GetSidecars return all Sidecars for a given namespace. It returns an error on any problem
func (*IstioClient) GetStatefulSet ¶ added in v0.9.0
func (in *IstioClient) GetStatefulSet(namespace string, statefulsetName string) (*apps_v1.StatefulSet, error)
func (*IstioClient) GetStatefulSets ¶ added in v0.9.0
func (in *IstioClient) GetStatefulSets(namespace string) ([]apps_v1.StatefulSet, error)
func (*IstioClient) GetTemplate ¶ added in v0.11.0
func (in *IstioClient) GetTemplate(namespace, templateType, templateName string) (IstioObject, error)
func (*IstioClient) GetTemplates ¶ added in v0.11.0
func (in *IstioClient) GetTemplates(namespace, labelSelector string) ([]IstioObject, error)
func (*IstioClient) GetToken ¶ added in v1.9.0
func (client *IstioClient) GetToken() string
GetToken returns the BearerToken used from the config
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.
func (*IstioClient) IsIter8Api ¶ added in v1.15.0
func (in *IstioClient) IsIter8Api() bool
func (*IstioClient) IsMaistraApi ¶ added in v1.0.4
func (in *IstioClient) IsMaistraApi() bool
func (*IstioClient) IsOpenShift ¶ added in v0.8.0
func (in *IstioClient) IsOpenShift() bool
func (*IstioClient) UpdateIstioObject ¶ added in v0.12.0
func (in *IstioClient) UpdateIstioObject(api, namespace, resourceType, name, jsonPatch string) (IstioObject, error)
UpdateIstioObject updates an Istio object from either config api or networking api
type IstioClientInterface ¶
type IstioClientInterface interface { CreateIstioObject(api, namespace, resourceType, json string) (IstioObject, error) DeleteIstioObject(api, namespace, resourceType, name string) error GetAdapter(namespace, adapterType, adapterName string) (IstioObject, error) GetAdapters(namespace, labelSelector string) ([]IstioObject, error) GetAuthorizationDetails(namespace string) (*RBACDetails, error) GetCronJobs(namespace string) ([]batch_v1beta1.CronJob, error) GetDeployment(namespace string, deploymentName string) (*apps_v1.Deployment, error) GetDeployments(namespace string) ([]apps_v1.Deployment, error) GetDeploymentsByLabel(namespace string, labelSelector string) ([]apps_v1.Deployment, error) GetDeploymentConfig(namespace string, deploymentconfigName string) (*osapps_v1.DeploymentConfig, error) GetDeploymentConfigs(namespace string) ([]osapps_v1.DeploymentConfig, error) GetDestinationRule(namespace string, destinationrule string) (IstioObject, error) GetDestinationRules(namespace string, serviceName string) ([]IstioObject, error) GetEndpoints(namespace string, serviceName string) (*core_v1.Endpoints, error) GetGateway(namespace string, gateway string) (IstioObject, error) GetGateways(namespace string) ([]IstioObject, error) GetIstioRule(namespace string, istiorule string) (IstioObject, error) GetIstioRules(namespace string, labelSelector string) ([]IstioObject, error) GetJobs(namespace string) ([]batch_v1.Job, error) GetNamespace(namespace string) (*core_v1.Namespace, error) GetNamespaces(labelSelector string) ([]core_v1.Namespace, error) GetPod(namespace, name string) (*core_v1.Pod, error) GetPodLogs(namespace, name string, opts *core_v1.PodLogOptions) (*PodLogs, error) GetPods(namespace, labelSelector string) ([]core_v1.Pod, error) GetProject(project string) (*osproject_v1.Project, error) GetProjects(labelSelector string) ([]osproject_v1.Project, error) GetQuotaSpec(namespace string, quotaSpecName string) (IstioObject, error) GetQuotaSpecs(namespace string) ([]IstioObject, error) GetQuotaSpecBinding(namespace string, quotaSpecBindingName string) (IstioObject, error) GetQuotaSpecBindings(namespace string) ([]IstioObject, error) GetReplicationControllers(namespace string) ([]core_v1.ReplicationController, error) GetReplicaSets(namespace string) ([]apps_v1.ReplicaSet, error) GetRoute(namespace string, name string) (*osroutes_v1.Route, error) GetSidecar(namespace string, sidecar string) (IstioObject, error) GetSidecars(namespace string) ([]IstioObject, error) GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error) GetService(namespace string, serviceName string) (*core_v1.Service, error) GetServices(namespace string, selectorLabels map[string]string) ([]core_v1.Service, error) GetServiceEntries(namespace string) ([]IstioObject, error) GetServiceEntry(namespace string, serviceEntryName string) (IstioObject, error) GetStatefulSet(namespace string, statefulsetName string) (*apps_v1.StatefulSet, error) GetStatefulSets(namespace string) ([]apps_v1.StatefulSet, error) GetTemplate(namespace, templateType, templateName string) (IstioObject, error) GetTemplates(namespace, labelSelector string) ([]IstioObject, error) GetPolicy(namespace string, policyName string) (IstioObject, error) GetPolicies(namespace string) ([]IstioObject, error) GetMeshPolicy(policyName string) (IstioObject, error) GetMeshPolicies() ([]IstioObject, error) GetClusterRbacConfig(name string) (IstioObject, error) GetClusterRbacConfigs() ([]IstioObject, error) GetRbacConfig(namespace string, name string) (IstioObject, error) GetRbacConfigs(namespace string) ([]IstioObject, error) GetServiceMeshPolicy(namespace string, name string) (IstioObject, error) GetServiceMeshPolicies(namespace string) ([]IstioObject, error) GetServiceMeshRbacConfig(namespace string, name string) (IstioObject, error) GetServiceMeshRbacConfigs(namespace string) ([]IstioObject, error) GetServiceRole(namespace string, name string) (IstioObject, error) GetServiceRoles(namespace string) ([]IstioObject, error) GetServiceRoleBinding(namespace string, name string) (IstioObject, error) GetServiceRoleBindings(namespace string) ([]IstioObject, error) GetAuthorizationPolicy(namespace string, name string) (IstioObject, error) GetAuthorizationPolicies(namespace string) ([]IstioObject, error) GetServerVersion() (*version.Info, error) GetToken() string GetVirtualService(namespace string, virtualservice string) (IstioObject, error) GetVirtualServices(namespace string, serviceName string) ([]IstioObject, error) IsMaistraApi() bool IsOpenShift() bool UpdateIstioObject(api, namespace, resourceType, name, jsonPatch string) (IstioObject, error) Iter8ClientInterface }
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"` Sidecars []IstioObject `json:"sidecars"` }
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{}) GetTypeMeta() meta_v1.TypeMeta SetTypeMeta(meta_v1.TypeMeta) GetObjectMeta() meta_v1.ObjectMeta SetObjectMeta(meta_v1.ObjectMeta) DeepCopyIstioObject() IstioObject }
IstioObject is a k8s wrapper interface for config objects. Taken from istio.io
func FilterDestinationRules ¶ added in v1.9.0
func FilterDestinationRules(allDr []IstioObject, namespace string, serviceName string) []IstioObject
func FilterVirtualServices ¶ added in v1.9.0
func FilterVirtualServices(allVs []IstioObject, namespace string, serviceName string) []IstioObject
type IstioObjectList ¶
type IstioObjectList interface { runtime.Object GetItems() []IstioObject }
IstioObjectList is a k8s wrapper interface for list config objects. Taken from istio.io
type Iter8ClientInterface ¶ added in v1.15.0
type Iter8ClientInterface interface { CreateIter8Experiment(namespace string, json string) (Iter8Experiment, error) GetIter8Experiment(namespace string, name string) (Iter8Experiment, error) GetIter8Experiments(namespace string) ([]Iter8Experiment, error) IsIter8Api() bool }
type Iter8Experiment ¶ added in v1.15.0
type Iter8Experiment interface { runtime.Object GetSpec() Iter8ExperimentSpec SetSpec(Iter8ExperimentSpec) GetMetrics() Iter8ExperimentMetrics SetMetrics(Iter8ExperimentMetrics) GetStatus() Iter8ExperimentStatus SetStatus(Iter8ExperimentStatus) GetTypeMeta() meta_v1.TypeMeta SetTypeMeta(meta_v1.TypeMeta) GetObjectMeta() meta_v1.ObjectMeta SetObjectMeta(meta_v1.ObjectMeta) DeepCopyIter8Object() Iter8Experiment }
Iter8Experiment is a dynamic object to map Iter8 Experiments
type Iter8ExperimentList ¶ added in v1.15.0
type Iter8ExperimentList interface { runtime.Object GetItems() []Iter8Experiment }
type Iter8ExperimentMetrics ¶ added in v1.15.0
type Iter8ExperimentMetrics map[string]struct { AbsentValue string `json:"absent_value"` IsCounter bool `json:"is_counter"` QueryTemplate string `json:"query_template"` SampleSizeTemplate string `json:"sample_size_template"` }
metrics:
iter8_latency: absent_value: None is_counter: false query_template: (sum(increase(istio_request_duration_seconds_sum{source_workload_namespace!='knative-serving',reporter='source'}[$interval]$offset_str)) by ($entity_labels)) / (sum(increase(istio_request_duration_seconds_count{source_workload_namespace!='knative-serving',reporter='source'}[$interval]$offset_str)) by ($entity_labels)) sample_size_template: sum(increase(istio_requests_total{source_workload_namespace!='knative-serving',reporter='source'}[$interval]$offset_str)) by ($entity_labels)
type Iter8ExperimentObject ¶ added in v1.15.0
type Iter8ExperimentObject struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec Iter8ExperimentSpec `json:"spec"` Metrics Iter8ExperimentMetrics `json:"metrics"` Status Iter8ExperimentStatus `json:"status"` }
func (*Iter8ExperimentObject) DeepCopy ¶ added in v1.15.0
func (in *Iter8ExperimentObject) DeepCopy() *Iter8ExperimentObject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericIstioObject.
func (*Iter8ExperimentObject) DeepCopyInto ¶ added in v1.15.0
func (in *Iter8ExperimentObject) DeepCopyInto(out *Iter8ExperimentObject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Iter8ExperimentObject) DeepCopyIter8Object ¶ added in v1.15.0
func (in *Iter8ExperimentObject) DeepCopyIter8Object() Iter8Experiment
func (*Iter8ExperimentObject) DeepCopyObject ¶ added in v1.15.0
func (in *Iter8ExperimentObject) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Iter8ExperimentObject) GetMetrics ¶ added in v1.15.0
func (in *Iter8ExperimentObject) GetMetrics() Iter8ExperimentMetrics
func (*Iter8ExperimentObject) GetObjectMeta ¶ added in v1.15.0
func (in *Iter8ExperimentObject) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*Iter8ExperimentObject) GetSpec ¶ added in v1.15.0
func (in *Iter8ExperimentObject) GetSpec() Iter8ExperimentSpec
GetSpec from a wrapper
func (*Iter8ExperimentObject) GetStatus ¶ added in v1.15.0
func (in *Iter8ExperimentObject) GetStatus() Iter8ExperimentStatus
func (*Iter8ExperimentObject) GetTypeMeta ¶ added in v1.15.0
func (in *Iter8ExperimentObject) GetTypeMeta() meta_v1.TypeMeta
GetTypeMeta from a wrapper
func (*Iter8ExperimentObject) SetMetrics ¶ added in v1.15.0
func (in *Iter8ExperimentObject) SetMetrics(metrics Iter8ExperimentMetrics)
SetSpec for a wrapper
func (*Iter8ExperimentObject) SetObjectMeta ¶ added in v1.15.0
func (in *Iter8ExperimentObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*Iter8ExperimentObject) SetSpec ¶ added in v1.15.0
func (in *Iter8ExperimentObject) SetSpec(spec Iter8ExperimentSpec)
SetSpec for a wrapper
func (*Iter8ExperimentObject) SetStatus ¶ added in v1.15.0
func (in *Iter8ExperimentObject) SetStatus(status Iter8ExperimentStatus)
SetStatus for a wrapper
func (*Iter8ExperimentObject) SetTypeMeta ¶ added in v1.15.0
func (in *Iter8ExperimentObject) SetTypeMeta(typemeta meta_v1.TypeMeta)
SetObjectMeta for a wrapper
type Iter8ExperimentObjectList ¶ added in v1.15.0
type Iter8ExperimentObjectList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []Iter8ExperimentObject `json:"items"` }
func (*Iter8ExperimentObjectList) DeepCopy ¶ added in v1.15.0
func (in *Iter8ExperimentObjectList) DeepCopy() *Iter8ExperimentObjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericIstioObjectList.
func (*Iter8ExperimentObjectList) DeepCopyInto ¶ added in v1.15.0
func (in *Iter8ExperimentObjectList) DeepCopyInto(out *Iter8ExperimentObjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Iter8ExperimentObjectList) DeepCopyObject ¶ added in v1.15.0
func (in *Iter8ExperimentObjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Iter8ExperimentObjectList) GetItems ¶ added in v1.15.0
func (in *Iter8ExperimentObjectList) GetItems() []Iter8Experiment
GetItems from a wrapper
type Iter8ExperimentSpec ¶ added in v1.15.0
type Iter8ExperimentSpec struct { TargetService struct { ApiVersion string `json:"apiVersion"` Name string `json:"name"` Namespace string `json:"namespace"` Baseline string `json:"baseline"` Candidate string `json:"candidate"` } `json:"targetService"` RoutingReference struct { ApiVersion string `json:"apiVersion"` Kind string `json:"kind"` Name string `json:"name"` } `json:"routingReference"` Analysis struct { AnalyticsService string `json:"analyticsService"` GrafanaEndpoint string `json:"grafanaEndpoint"` SuccessCriteria []struct { MetricName string `json:"metricName"` SampleSize int `json:"sampleSize"` Tolerance float64 `json:"tolerance"` ToleranceType string `json:"toleranceType"` MinMax struct { Min float64 `json:"min"` Max float64 `json:"max"` } `json:"min_max"` StopOnFailure bool `json:"stopOnFailure"` } `json:"successCriteria"` } `json:"analysis"` TrafficControl struct { Interval string `json:"interval"` MaxIterations int `json:"maxIterations"` MaxTrafficPercentage float64 `json:"maxTrafficPercentage"` Strategy string `json:"strategy"` TrafficStepSize float64 `json:"trafficStepSize"` Confidence float64 `json:"confidence"` OnSuccess string `json:"onSuccess"` } `json:"trafficControl"` Assessment string `json:"assessment"` Cleanup string `json:"cleanup"` }
https://github.com/iter8-tools/docs/blob/master/doc_files/iter8_crd.md
spec:
# targetService specifies the reference to experiment targets targetService: # apiVersion of the target service (required) # options: # v1: indicates that the target service is a Kubernetes service # serving.knative.dev/v1alpha1: indicates that the target service is a Knative service apiVersion: v1 # name of target service (required) # identifies either a Kubernetes service or a Knative service name: reviews # the baseline and candidate versions of the target service (required) # for Kubernetes, these two components refer to names of deployments # for Knative, they are names of revisions baseline: reviews-v3 candidate: reviews-v5 # routingReference is a reference to an existing Istio VirtualService (optional) # this should be used only if an Istio VirtualService has already been defined for the target Kubernetes service routingReference: apiversion: networking.istio.io/v1alpha3 kind: VirtualService name: reviews-external # analysis contains the parameters for configuring the analytics service analysis: # analyticsService specifies analytics service endpoint (optional) # default value is http://iter8-analytics.iter8 analyticsService: http://iter8-analytics.iter8 # endpoint to Grafana dashboard (optional) # default is http://localhost:3000 grafanaEndpoint: http://localhost:3000 # successCriteria is a list of criteria for assessing the candidate version (optional) # if the list is empty, the controller will not rely on the analytics service successCriteria: # metricName: name of the metric to which this criterion applies (required) # the name should match the name of an iter8 metric or that of a user-defined custom metric # names of metrics supported by iter8 out of the box: # iter8_latency: mean latency of the service # iter8_error_rate: mean error rate (~5** HTTP Status codes) of the service # iter8_error_count: total error count (~5** HTTP Status codes) of the service - metricName: iter8_latency # minimum number of data points required to make a decision based on this criterion (optional) # default is 10 # Used by the check and increment alogorithm. # Ignored by other algorithms. sampleSize: 100 # the metric value for the candidate version defining this success criterion (required) # it can be an absolute threshold or one relative to the baseline version, depending on the # attribute toleranceType described next tolerance: 0.2 # indicates if the tolerance value above should be interpreted as an absolute threshold or # a threshold relative to the baseline (required) # options: # threshold: the metric value for the candidate must be below the tolerance value above # delta: the tolerance value above indicates the percentage within which the candidate metric value can deviate # from the baseline metric value toleranceType: threshold # The range of possible metric values (optional) # Used by bayesian routing algorithms if available. # Ignored by other algorithms. min_max: # The minimum possible value for the metric min: 0.0 # The maximum possible value for the metric max: 1.0 # indicates whether or not the experiment must finish if this criterion is not satisfied (optional) # default is false stopOnFailure: false # trafficControl controls the experiment durarion and how the controller should change the traffic split trafficControl: # frequency with which the controller calls the analytics service # it corresponds to the duration of each "iteration" of the experiment interval: 30s # maximum number of iterations for this experiment (optional) # the duration of an experiment is defined by maxIterations * internal # default is 100 maxIterations: 6 # the maximum traffic percentage to send to the candidate during an experiment (optional) # default is 50 maxTrafficPercentage: 80 # strategy used to analyze the candidate and shift the traffic (optional) # except for the strategy increment_without_check, the analytics service is called # at each iteration and responds with the appropriate traffic split which the controller honors # options: # check_and_increment # epsilon_greedy # posterior_bayesian_routing # optimistic_bayesian_routing # increment_without_check: increase traffic to candidate by trafficStepSize at each iteration without calling analytics # default is check_and_increment strategy: check_and_increment # the maximum traffic increment per iteration (optional) # default is 2.0 trafficStepSize: 20 # The required confidence in the recommeded traffic split (optional) # default is 0.95 # Used by bayesian routing algorithms # Ignored by other algorithms confidence: 0.9 # determines how the traffic must be split at the end of the experiment (optional) # options: # baseline: all traffic goes to the baseline version # candidate: all traffic goes to the candidate version # both: traffic is split across baseline and candidate # default is candidate onSuccess: candidate # a flag that allows the user to terminate an ongoing experiment (optional) # options: # override_success: terminate the experiment indicating that the candidate succeeded # override_failure: abort the experiment indicating that the candidate failed # default is the empty string assessment: "" # indicates whether or not iter8 should perform a clean-up action at the end of the experiment (optional) # if no action is specified, nothing is done to clean up at the end # if used, the currently supported actions are: # delete: at the end of the experiment, the version that ends up with no traffic (if any) is deleted cleanup:
type Iter8ExperimentStatus ¶ added in v1.15.0
type Iter8ExperimentStatus struct { AnalysisState map[string]interface{} `json:"analysisState"` Assestment struct { Conclusions []string `json:"conclusions"` } `json:"assessment"` Conditions []struct { LastTransitionTime string `json:"lastTransitionTime"` Message string `json:"message"` Reason string `json:"reason"` Status string `json:"status"` Type string `json:"type"` } `json:"conditions"` CurrentIteration int `json:"currentIteration"` StartTimeStamp string `json:"startTimestamp"` EndTimestamp string `json:"endTimestamp"` GrafanaURL string `json:"grafanaURL"` LastIncrementTime string `json:"lastIncrementTime"` Message string `json:"message"` Phase string `json:"phase"` TrafficSplitPercentage struct { Baseline int `json:"baseline"` Candidate int `json:"candidate"` } `json:"trafficSplitPercentage"` }
status:
# the last analysis state analysisState: {} # assessment returned from the analytics service assessment: conclusions: - The experiment needs to be aborted - All success criteria were not met # list of boolean conditions describing the status of the experiment # for each condition, if the status is "False", the reason field will give detailed explanations # lastTransitionTime records the time when the last change happened to the corresponding condition # when a condition is not set, its status will be "Unknown" conditions: # AnalyticsServiceNormal is "True" when the controller can get an interpretable response from the analytics service - lastTransitionTime: "2019-12-20T05:38:37Z" status: "True" type: AnalyticsServiceNormal # ExperimentCompleted tells whether the experiment is completed or not - lasv1alpha1.Phase tTransitionTime: "2019-12-20T05:39:37Z" status: "True" type: ExperimentCompleted # ExperimentSucceeded indicates whether the experiment succeeded or not when it is completed - lastTransitionTime: "2019-12-20T05:39:37Z" message: Aborted reason: ExperimentFailed status: "False" type: ExperimentSucceeded # MetricsSynced states whether the referenced metrics have been retrieved from the ConfigMap and stored in the metrics section - lastTransitionTime: "2019-12-20T05:38:22Z" status: "True" type: MetricsSynced # Ready records the status of the latest-updated condition - lastTransitionTime: "2019-12-20T05:39:37Z" message: Aborted reason: ExperimentFailed status: "False" type: Ready # RoutingRulesReady indicates whether the routing rules are successfully created/updated - lastTransitionTime: "2019-12-20T05:38:22Z" tatus: "True" type: RoutingRulesReady # TargetsProvided is "True" when both the baseline and the candidate versions of the targetService are detected by the controller; otherwise, missing elements will be shown in the reason field - lastTransitionTime: "2019-12-20T05:38:37Z" status: "True" type: TargetsProvided # the current experiment's iteration currentIteration: 2 # Unix timestamp in milliseconds corresponding to when the experiment started startTimestamp: "1576820317351" # Unix timestamp in milliseconds corresponding to when the experiment finished endTimestamp: "1576820377696" # The url to he Grafana dashboard pertaining to this experiment grafanaURL: http://localhost:3000/d/eXPEaNnZz/iter8-application-metrics?var-namespace=bookinfo-iter8&var-service=reviews&var-baseline=reviews-v3&var-candidate=reviews-v5&from=1576820317351&to=1576820377696 # the time when the previous iteration was completed lastIncrementTime: "2019-12-20T05:39:07Z" # this is the message to be shown in the STATUS column for the `kubectl` printer, which summarizes the experiment situation message: 'ExperimentFailed: Aborted' # the experiment's current phase # values could be: Initializing, Progressing, Pause, Completed phase: Completed # the current traffic split trafficSplitPercentage: baseline: 100 candidate: 0
type MTLSDetails ¶ added in v0.15.0
type MTLSDetails struct { DestinationRules []IstioObject `json:"destinationrules"` MeshPolicies []IstioObject `json:"meshpolicies"` ServiceMeshPolicies []IstioObject `json:"servicemeshpolicies"` Policies []IstioObject `json:"policies"` }
MTLSDetails is a wrapper to group all Istio objects related to non-local mTLS configurations
type RBACDetails ¶ added in v0.17.0
type RBACDetails struct { ClusterRbacConfigs []IstioObject `json:"clusterrbacconfigs"` ServiceMeshRbacConfigs []IstioObject `json:"servicemeshrbacconfigs"` ServiceRoles []IstioObject `json:"serviceroles"` ServiceRoleBindings []IstioObject `json:"servicerolebindings"` AuthorizationPolicies []IstioObject `json:"authorizationpolicies"` }
RBACDetails is a wrapper for objects related to Istio RBAC (Role Based Access Control)
type ServiceDetails ¶
type ServiceDetails struct { Service *core_v1.Service `json:"service"` Endpoints *core_v1.Endpoints `json:"endpoints"` Deployments *apps_v1.DeploymentList `json:"deployments"` Autoscalers *autoscaling_v1.HorizontalPodAutoscalerList `json:"autoscalers"` Pods []core_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 ServiceList ¶
type ServiceList struct { Services *core_v1.ServiceList Pods *core_v1.PodList Deployments *apps_v1.DeploymentList }
ServiceList holds list of services, pods and deployments