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 HasMatchingVirtualServices(host Host, virtualServices []IstioObject) bool
- func HasMatchingWorkloads(service string, workloadList []labels.Set) bool
- func HostWithinWildcardHost(subdomain, wildcardDomain 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 PeerAuthnHasMTLSEnabled(peerAuthn IstioObject) (bool, string)
- func PeerAuthnHasStrictMTLS(peerAuthn IstioObject) bool
- func ServiceEntryHostnames(serviceEntries []IstioObject) map[string][]string
- func UseRemoteCreds(remoteSecret *RemoteSecret) (*rest.Config, error)
- func ValidatePort(portDef interface{}) bool
- type ClientFactory
- type ClientInterface
- type CounterMetric
- type ExperimentAction
- 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) GetStatus() map[string]interface{}
- func (in *GenericIstioObject) GetTypeMeta() meta_v1.TypeMeta
- func (in *GenericIstioObject) HasMatchLabelsSelector() bool
- func (in *GenericIstioObject) HasWorkloadSelectorLabels() bool
- func (in *GenericIstioObject) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *GenericIstioObject) SetSpec(spec map[string]interface{})
- func (in *GenericIstioObject) SetStatus(status map[string]interface{})
- func (in *GenericIstioObject) SetTypeMeta(typemeta meta_v1.TypeMeta)
- type GenericIstioObjectList
- type HTTPMatchRequest
- type Host
- type IstioClientInterface
- type IstioDetails
- type IstioMeshConfig
- type IstioObject
- func FilterDestinationRules(allDr []IstioObject, namespace string, serviceName string) []IstioObject
- func FilterIstioObjectsForSelector(selector labels.Selector, allObjects []IstioObject) []IstioObject
- func FilterIstioObjectsForWorkloadSelector(workloadSelector string, allObjects []IstioObject) []IstioObject
- func FilterVirtualServices(allVs []IstioObject, namespace string, serviceName string) []IstioObject
- type IstioObjectList
- type Iter8ClientInterface
- type Iter8CriterionAssessment
- type Iter8Duration
- type Iter8Experiment
- type Iter8ExperimentAction
- type Iter8ExperimentCRD
- 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) GetObjectMeta() meta_v1.ObjectMeta
- func (in *Iter8ExperimentObject) GetSpec() Iter8ExperimentSpec
- func (in *Iter8ExperimentObject) GetStatus() Iter8ExperimentStatus
- func (in *Iter8ExperimentObject) GetTypeMeta() meta_v1.TypeMeta
- 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 Iter8Host
- type Iter8Networking
- type Iter8Threshold
- type Iter8VersionAssessment
- type K8SClient
- func (in *K8SClient) CreateIstioObject(api, namespace, resourceType, json string) (IstioObject, error)
- func (in *K8SClient) CreateIter8Experiment(namespace string, json string) (Iter8Experiment, error)
- func (in *K8SClient) DeleteIstioObject(api, namespace, resourceType, name string) error
- func (in *K8SClient) DeleteIter8Experiment(namespace string, name string) error
- func (in *K8SClient) GetConfigMap(namespace, configName string) (*core_v1.ConfigMap, error)
- func (in *K8SClient) GetCronJobs(namespace string) ([]batch_v1beta1.CronJob, error)
- func (in *K8SClient) GetDeployment(namespace, deploymentName string) (*apps_v1.Deployment, error)
- func (in *K8SClient) GetDeploymentConfig(namespace, deploymentconfigName string) (*osapps_v1.DeploymentConfig, error)
- func (in *K8SClient) GetDeploymentConfigs(namespace string) ([]osapps_v1.DeploymentConfig, error)
- func (in *K8SClient) GetDeployments(namespace string) ([]apps_v1.Deployment, error)
- func (in *K8SClient) GetDeploymentsByLabel(namespace string, labelSelector string) ([]apps_v1.Deployment, error)
- func (in *K8SClient) GetEndpoints(namespace, serviceName string) (*core_v1.Endpoints, error)
- func (client *K8SClient) GetIstioConfigApi() *rest.RESTClient
- func (client *K8SClient) GetIstioNetworkingApi() *rest.RESTClient
- func (in *K8SClient) GetIstioObject(namespace, resourceType, name string) (IstioObject, error)
- func (in *K8SClient) GetIstioObjects(namespace, resourceType, labelSelector string) ([]IstioObject, error)
- func (client *K8SClient) GetIstioRbacApi() *rest.RESTClient
- func (client *K8SClient) GetIstioSecurityApi() *rest.RESTClient
- func (in *K8SClient) GetIter8Experiment(namespace string, name string) (Iter8Experiment, error)
- func (in *K8SClient) GetIter8Experiments(namespace string) ([]Iter8Experiment, error)
- func (in *K8SClient) GetJobs(namespace string) ([]batch_v1.Job, error)
- func (client *K8SClient) GetK8sApi() *kube.Clientset
- func (in *K8SClient) GetNamespace(namespace string) (*core_v1.Namespace, error)
- func (in *K8SClient) GetNamespaces(labelSelector string) ([]core_v1.Namespace, error)
- func (in *K8SClient) GetPod(namespace, name string) (*core_v1.Pod, error)
- func (in *K8SClient) GetPodLogs(namespace, name string, opts *core_v1.PodLogOptions) (*PodLogs, error)
- func (in *K8SClient) GetPods(namespace, labelSelector string) ([]core_v1.Pod, error)
- func (in *K8SClient) GetProject(name string) (*osproject_v1.Project, error)
- func (in *K8SClient) GetProjects(labelSelector string) ([]osproject_v1.Project, error)
- func (in *K8SClient) GetReplicaSets(namespace string) ([]apps_v1.ReplicaSet, error)
- func (in *K8SClient) GetReplicationControllers(namespace string) ([]core_v1.ReplicationController, error)
- func (in *K8SClient) GetRoute(namespace, name string) (*osroutes_v1.Route, error)
- func (in *K8SClient) GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error)
- func (in *K8SClient) GetServerVersion() (*version.Info, error)
- func (in *K8SClient) GetService(namespace, serviceName string) (*core_v1.Service, error)
- func (in *K8SClient) GetServices(namespace string, selectorLabels map[string]string) ([]core_v1.Service, error)
- func (in *K8SClient) GetStatefulSet(namespace string, statefulsetName string) (*apps_v1.StatefulSet, error)
- func (in *K8SClient) GetStatefulSets(namespace string) ([]apps_v1.StatefulSet, error)
- func (client *K8SClient) GetToken() string
- func (in *K8SClient) IsIter8Api() bool
- func (in *K8SClient) IsMaistraApi() bool
- func (in *K8SClient) IsMixerDisabled() bool
- func (in *K8SClient) IsOpenShift() bool
- func (in *K8SClient) Iter8MetricMap() ([]string, error)
- func (in *K8SClient) UpdateIstioObject(api, namespace, resourceType, name, jsonPatch string) (IstioObject, error)
- func (in *K8SClient) UpdateIter8Experiment(namespace string, name string, json string) (Iter8Experiment, error)
- func (in *K8SClient) UpdateNamespace(namespace string, jsonPatch string) (*core_v1.Namespace, error)
- func (in *K8SClient) UpdateProject(name string, jsonPatch string) (*osproject_v1.Project, error)
- func (in *K8SClient) UpdateWorkload(namespace string, workloadName string, workloadType string, jsonPatch string) error
- type K8SClientInterface
- type MTLSDetails
- type OSClientInterface
- type PodLogs
- type RBACDetails
- type RatioMetric
- type RemoteSecret
- type RemoteSecretCluster
- type RemoteSecretClusterListItem
- type ServiceDetails
- type ServiceList
- type StringMatch
Constants ¶
const ( // Kubernetes Controllers ConfigMapType = "ConfigMap" 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" EnvoyFilters = "envoyfilters" EnvoyFilterType = "EnvoyFilter" EnvoyFilterTypeList = "EnvoyFilterList" Sidecars = "sidecars" SidecarType = "Sidecar" SidecarTypeList = "SidecarList" ServiceEntries = "serviceentries" ServiceEntryType = "ServiceEntry" ServiceentryTypeList = "ServiceEntryList" VirtualServices = "virtualservices" VirtualServiceType = "VirtualService" VirtualServiceTypeList = "VirtualServiceList" WorkloadEntries = "workloadentries" WorkloadEntryType = "WorkloadEntry" WorkloadEntryTypeList = "WorkloadEntryList" QuotaSpecs = "quotaspecs" QuotaSpecType = "QuotaSpec" QuotaSpecTypeList = "QuotaSpecList" QuotaSpecBindings = "quotaspecbindings" QuotaSpecBindingType = "QuotaSpecBinding" QuotaSpecBindingTypeList = "QuotaSpecBindingList" Policies = "policies" PolicyType = "Policy" PolicyTypeList = "PolicyList" MeshPolicies = "meshpolicies" MeshPolicyType = "MeshPolicy" MeshPolicyTypeList = "MeshPolicyList" // Rbac ClusterRbacConfigs = "clusterrbacconfigs" ClusterRbacConfigType = "ClusterRbacConfig" ClusterRbacConfigTypeList = "ClusterRbacConfigList" RbacConfigs = "rbacconfigs" RbacConfigType = "RbacConfig" RbacConfigTypeList = "RbacConfigList" ServiceRoles = "serviceroles" ServiceRoleType = "ServiceRole" ServiceRoleTypeList = "ServiceRoleList" ServiceRoleBindings = "servicerolebindings" ServiceRoleBindingType = "ServiceRoleBinding" ServiceRoleBindingTypeList = "ServiceRoleBindingList" // Authorization PeerAuthentications AuthorizationPolicies = "authorizationpolicies" AuthorizationPoliciesType = "AuthorizationPolicy" AuthorizationPoliciesTypeList = "AuthorizationPolicyList" // Peer Authentications PeerAuthentications = "peerauthentications" PeerAuthenticationsType = "PeerAuthentication" PeerAuthenticationsTypeList = "PeerAuthenticationList" // Request Authentications RequestAuthentications = "requestauthentications" RequestAuthenticationsType = "RequestAuthentication" RequestAuthenticationsTypeList = "RequestAuthenticationList" // AttributeManifest AttributeManifests = "attributemanifests" AttributeManifestType = "attributemanifest" AttributeManifestTypeList = "attributemanifestList" // HttpApiSpecBinding HttpApiSpecBindings = "httpapispecbindings" HttpApiSpecBindingType = "HTTPAPISpecBinding" HttpApiSpecBindingTypeList = "HTTPAPISpecBindingList" // HttpApiSpec HttpApiSpecs = "httpapispecs" HttpApiSpecType = "HTTPAPISpec" HttpApiSpecTypeList = "HTTPAPISpecList" Rules = "rules" RuleType = "rule" RuleTypeList = "ruleList" Adapters = "adapters" AdapterType = "adapter" AdapterTypeList = "adapterList" Handlers = "handlers" HandlerType = "handler" HandlerTypeList = "handlerList" Instances = "instances" InstanceType = "instance" InstanceTypeList = "instanceList" Templates = "templates" TemplateType = "template" TemplateTypeList = "templateList" Iter8Experiments = "experiments" Iter8ExperimentType = "Experiment" Iter8ExperimentTypeList = "ExperimentList" Iter8ConfigMap = "iter8config-metrics" )
const DefaultServiceAccountPath = "/var/run/secrets/kubernetes.io/serviceaccount/token"
const RemoteSecretData = "/kiali-remote-secret/kiali"
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: "v1alpha2", } ApiIter8Version = Iter8GroupVersion.Group + "/" + Iter8GroupVersion.Version // A map to get the plural for a Istio type using the singlar type PluralType = map[string]string{ Gateways: GatewayType, VirtualServices: VirtualServiceType, DestinationRules: DestinationRuleType, ServiceEntries: ServiceEntryType, Sidecars: SidecarType, WorkloadEntries: WorkloadEntryType, EnvoyFilters: EnvoyFilterType, Rules: RuleType, QuotaSpecs: QuotaSpecType, QuotaSpecBindings: QuotaSpecBindingType, AttributeManifests: AttributeManifestType, HttpApiSpecBindings: HttpApiSpecBindingType, HttpApiSpecs: HttpApiSpecType, Adapters: AdapterType, Handlers: HandlerType, Instances: InstanceType, Templates: TemplateType, Policies: PolicyType, MeshPolicies: MeshPolicyType, ClusterRbacConfigs: ClusterRbacConfigType, RbacConfigs: RbacConfigType, ServiceRoles: ServiceRoleType, ServiceRoleBindings: ServiceRoleBindingType, AuthorizationPolicies: AuthorizationPoliciesType, PeerAuthentications: PeerAuthenticationsType, RequestAuthentications: RequestAuthenticationsType, Iter8Experiments: Iter8ExperimentType, } ResourceTypesToAPI = map[string]string{ DestinationRules: NetworkingGroupVersion.Group, VirtualServices: NetworkingGroupVersion.Group, ServiceEntries: NetworkingGroupVersion.Group, Gateways: NetworkingGroupVersion.Group, Sidecars: NetworkingGroupVersion.Group, WorkloadEntries: NetworkingGroupVersion.Group, EnvoyFilters: NetworkingGroupVersion.Group, Adapters: ConfigGroupVersion.Group, Templates: ConfigGroupVersion.Group, Rules: ConfigGroupVersion.Group, Handlers: ConfigGroupVersion.Group, Instances: ConfigGroupVersion.Group, QuotaSpecs: ConfigGroupVersion.Group, QuotaSpecBindings: ConfigGroupVersion.Group, AttributeManifests: ConfigGroupVersion.Group, HttpApiSpecBindings: ConfigGroupVersion.Group, HttpApiSpecs: ConfigGroupVersion.Group, Policies: AuthenticationGroupVersion.Group, MeshPolicies: AuthenticationGroupVersion.Group, ClusterRbacConfigs: RbacGroupVersion.Group, RbacConfigs: RbacGroupVersion.Group, ServiceRoles: RbacGroupVersion.Group, ServiceRoleBindings: RbacGroupVersion.Group, AuthorizationPolicies: SecurityGroupVersion.Group, PeerAuthentications: SecurityGroupVersion.Group, RequestAuthentications: SecurityGroupVersion.Group, Iter8Experiments: Iter8GroupVersion.Group, } ApiToVersion = map[string]string{ NetworkingGroupVersion.Group: ApiNetworkingVersion, ConfigGroupVersion.Group: ApiConfigVersion, AuthenticationGroupVersion.Group: ApiAuthenticationVersion, RbacGroupVersion.Group: ApiRbacVersion, MaistraAuthenticationGroupVersion.Group: ApiMaistraAuthenticationVersion, MaistraRbacGroupVersion.Group: ApiMaistraRbacVersion, SecurityGroupVersion.Group: ApiSecurityVersion, } )
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 HasMatchingVirtualServices ¶ added in v1.22.1
func HasMatchingVirtualServices(host Host, virtualServices []IstioObject) bool
func HasMatchingWorkloads ¶ added in v1.15.0
func HostWithinWildcardHost ¶ added in v1.22.1
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 PeerAuthnHasMTLSEnabled ¶ added in v1.18.1
func PeerAuthnHasMTLSEnabled(peerAuthn IstioObject) (bool, string)
func PeerAuthnHasStrictMTLS ¶ added in v1.18.1
func PeerAuthnHasStrictMTLS(peerAuthn 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 UseRemoteCreds ¶ added in v1.23.0
func UseRemoteCreds(remoteSecret *RemoteSecret) (*rest.Config, error)
Point the k8s client to a remote cluster's API server
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) (ClientInterface, 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 ClientInterface ¶ added in v1.20.0
type ClientInterface interface { GetServerVersion() (*version.Info, error) GetToken() string IsMaistraApi() bool IsOpenShift() bool IsMixerDisabled() bool K8SClientInterface IstioClientInterface Iter8ClientInterface OSClientInterface }
ClientInterface for mocks (only mocked function are necessary here)
type CounterMetric ¶ added in v1.24.0
type ExperimentAction ¶ added in v1.24.0
type GenericIstioObject ¶ added in v0.11.0
type GenericIstioObject struct { meta_v1.TypeMeta `json:",inline" yaml:",inline"` meta_v1.ObjectMeta `json:"metadata" yaml:"metadata"` Spec map[string]interface{} `json:"spec"` Status map[string]interface{} `json:"status"` }
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) GetStatus ¶ added in v1.24.0
func (in *GenericIstioObject) GetStatus() map[string]interface{}
GetStatus from a wrapper
func (*GenericIstioObject) GetTypeMeta ¶ added in v0.16.0
func (in *GenericIstioObject) GetTypeMeta() meta_v1.TypeMeta
GetTypeMeta from a wrapper
func (*GenericIstioObject) HasMatchLabelsSelector ¶ added in v1.18.1
func (in *GenericIstioObject) HasMatchLabelsSelector() bool
func (*GenericIstioObject) HasWorkloadSelectorLabels ¶ added in v1.16.0
func (in *GenericIstioObject) HasWorkloadSelectorLabels() bool
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) SetStatus ¶ added in v1.24.0
func (in *GenericIstioObject) SetStatus(status map[string]interface{})
SetStatus 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 HTTPMatchRequest ¶ added in v1.24.0
type HTTPMatchRequest struct { // The name assigned to a match. Name string `json:"name,omitempty"` // URI to match URI *StringMatch `json:"uri,omitempty"` // Scheme Scheme Scheme *StringMatch `json:"scheme,omitempty"` // HTTP Method Method *StringMatch `json:"method,omitempty"` // HTTP Authority Authority *StringMatch `json:"authority,omitempty"` // Headers to match Headers map[string]StringMatch `json:"headers,omitempty"` // Specifies the ports on the host that is being addressed. Port uint32 `json:"port,omitempty"` // SourceLabels for matching SourceLabels map[string]string `json:"sourceLabels,omitempty"` // Gateways for matching Gateways []string `json:"gateways,omitempty"` // Query parameters for matching. QueryParams map[string]StringMatch `json:"query_params,omitempty"` // Flag to specify whether the URI matching should be case-insensitive. IgnoreURICase bool `json:"ignore_uri_case,omitempty"` }
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.
func ParseGatewayAsHost ¶ added in v1.19.0
type IstioClientInterface ¶
type IstioClientInterface interface { CreateIstioObject(api, namespace, resourceType, json string) (IstioObject, error) DeleteIstioObject(api, namespace, resourceType, name string) error GetIstioObject(namespace, resourceType, name string) (IstioObject, error) GetIstioObjects(namespace, resourceType, labelSelector string) ([]IstioObject, error) UpdateIstioObject(api, namespace, resourceType, name, jsonPatch string) (IstioObject, error) }
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"` RequestAuthentications []IstioObject `json:"requestauthentications"` }
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 IstioMeshConfig ¶ added in v1.18.1
type IstioMeshConfig struct { DisableMixerHttpReports bool `yaml:"disableMixerHttpReports,omitempty"` EnableAutoMtls *bool `yaml:"enableAutoMtls,omitempty"` }
func GetIstioConfigMap ¶ added in v1.23.0
func GetIstioConfigMap(istioConfig *core_v1.ConfigMap) (*IstioMeshConfig, error)
func (IstioMeshConfig) GetEnableAutoMtls ¶ added in v1.18.1
func (imc IstioMeshConfig) GetEnableAutoMtls() bool
type IstioObject ¶
type IstioObject interface { runtime.Object GetSpec() map[string]interface{} SetSpec(map[string]interface{}) GetStatus() map[string]interface{} SetStatus(map[string]interface{}) GetTypeMeta() meta_v1.TypeMeta SetTypeMeta(meta_v1.TypeMeta) GetObjectMeta() meta_v1.ObjectMeta SetObjectMeta(meta_v1.ObjectMeta) DeepCopyIstioObject() IstioObject HasWorkloadSelectorLabels() bool HasMatchLabelsSelector() bool }
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 FilterIstioObjectsForSelector ¶ added in v1.22.0
func FilterIstioObjectsForSelector(selector labels.Selector, allObjects []IstioObject) []IstioObject
func FilterIstioObjectsForWorkloadSelector ¶ added in v1.24.0
func FilterIstioObjectsForWorkloadSelector(workloadSelector string, allObjects []IstioObject) []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) UpdateIter8Experiment(namespace string, name string, json string) (Iter8Experiment, error) DeleteIter8Experiment(namespace string, name string) error GetIter8Experiment(namespace string, name string) (Iter8Experiment, error) GetIter8Experiments(namespace string) ([]Iter8Experiment, error) IsIter8Api() bool Iter8MetricMap() ([]string, error) }
type Iter8CriterionAssessment ¶ added in v1.24.0
type Iter8CriterionAssessment struct { ID string `json:"id"` MetricID string `json:"metric_id"` Statistics struct { Value *float32 `json:"value,omitempty"` RatioStatistics struct { ImprovementOverBaseline struct { Lower *float32 `json:"lower"` Upper *float32 `json:"upper"` } `json:"improvement_over_baseline"` ProbabilityOfBeatingBaseline *float32 `json:"probability_of_beating_baseline"` ProbabilityOfBeingBestVersion *float32 `json:"probability_of_being_best_version"` CredibleInterval struct { Lower *float32 `json:"lower"` Upper *float32 `json:"upper"` } `json:"credible_interval"` } `json:"ratio_statitics,omitempty"` } `json:"statistics,omitempty"` ThresholdAssessment *struct { ThresholdBreached bool `json:"threshold_breached"` ProbabilityOfSatisfyingTHreshold *float32 `json:"probability_of_satisfying_threshold"` } `json:"threshold_assessment,omitempty"` }
type Iter8Duration ¶ added in v1.24.0
type Iter8Experiment ¶ added in v1.15.0
type Iter8Experiment interface { runtime.Object GetSpec() Iter8ExperimentSpec SetSpec(Iter8ExperimentSpec) 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 Iter8ExperimentAction ¶ added in v1.20.0
type Iter8ExperimentAction string
type Iter8ExperimentCRD ¶ added in v1.24.0
type Iter8ExperimentCRD struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata,omitempty"` Spec Iter8ExperimentSpec `json:"spec"` }
type Iter8ExperimentList ¶ added in v1.15.0
type Iter8ExperimentList interface { runtime.Object GetItems() []Iter8Experiment }
type Iter8ExperimentMetrics ¶ added in v1.15.0
type Iter8ExperimentObject ¶ added in v1.15.0
type Iter8ExperimentObject struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata,omitempty"` Spec Iter8ExperimentSpec `json:"spec"` // +optional Status Iter8ExperimentStatus `json:"status,omitempty"` }
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) 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) 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 { Service struct { core_v1.ObjectReference `json:",inline"` Baseline string `json:"baseline"` Candidates []string `json:"candidates"` Port *int32 `json:"port,omitempty"` } `json:"service"` Criteria []struct { Metric string `json:"metric"` Threshold *Iter8Threshold `json:"threshold,omitempty"` IsReward bool `json:"isReward,omitempty"` } `json:"criteria,omitempty"` TrafficControl struct { Strategy string `json:"strategy,omitempty"` OnTermination string `json:"onTermination,omitempty"` Match struct { HTTP []HTTPMatchRequest `json:"http,omitempty"` } `json:"match,omitempty"` Percentage int32 `json:"percentage,omitempty"` MaxIncrement int32 `json:"maxIncrement,omitempty"` } `json:"trafficControl,omitempty"` AnalyticsEndpoint string `json:"analyticsEndpoint,omitempty"` Duration Iter8Duration `json:"duration,omitempty"` Cleanup bool `json:"cleanup,omitempty"` Metrics struct { CounterMetrics []CounterMetric `json:"counter_metrics,omitempty"` RatioMetrics []RatioMetric `json:"ratio_metrics,omitempty"` } `json:"metrics,omitempty"` ManualOverride *ExperimentAction `json:"manualOverride,omitempty"` Networking *Iter8Networking `json:"networking,omitempty"` }
Linked with https://github.com/iter8-tools/iter8-controller/blob/master/pkg/apis/iter8/v1alpha2/experiment_types.go ExperimentSpec defines the desired state of Experiment
type Iter8ExperimentStatus ¶ added in v1.15.0
type Iter8ExperimentStatus struct { Conditions []struct { LastTransitionTime string `json:"lastTransitionTime"` Message string `json:"message"` Reason string `json:"reason"` Status string `json:"status"` Type string `json:"type"` } `json:"conditions"` InitTimeStamp meta_v1.Time `json:"initTimestamp"` StartTimeStamp meta_v1.Time `json:"startTimestamp"` EndTimestamp meta_v1.Time `json:"endTimestamp,omitempty"` LastUpdateTime string `json:"lastUpdateTime"` CurrentIteration int `json:"currentIteration"` AnalysisState map[string]interface{} `json:"analysisState"` GrafanaURL string `json:"grafanaURL"` Assestment struct { Baseline Iter8VersionAssessment `json:"baseline"` Candidates []Iter8VersionAssessment `json:"candidates"` Winner struct { Name *string `json:"name,omitempty"` WinnerFound *bool `json:"winning_version_found"` Winner string `json:"current_best_version,omitempty"` Probability *float32 `json:"probability_of_winning_for_best_version,omitempty"` } `json:"winner"` } `json:"assessment"` Phase string `json:"phase"` Message string `json:"message"` ExperimentType string `json:"experimentType,omitempty"` EffectiveHosts []string `json:"effectiveHosts,omitempty"` }
type Iter8Networking ¶ added in v1.24.0
type Iter8Threshold ¶ added in v1.24.0
type Iter8VersionAssessment ¶ added in v1.24.0
type Iter8VersionAssessment struct { ID string `json:"id"` Name string `json:"name"` Weight int32 `json:"weight"` WinProbability float32 `json:"win_probability"` RequestCount int32 `json:"request_count"` CriterionAssessments []Iter8CriterionAssessment `json:"criterion_assessments,omitempty"` Rollback bool }
type K8SClient ¶ added in v1.20.0
type K8SClient struct { ClientInterface // contains filtered or unexported fields }
K8SClient is the client struct for Kubernetes and Istio APIs It hides the way it queries each API
func NewClientFromConfig ¶ added in v0.9.0
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 (*K8SClient) CreateIstioObject ¶ added in v1.20.0
func (in *K8SClient) CreateIstioObject(api, namespace, resourceType, json string) (IstioObject, error)
CreateIstioObject creates an Istio object
func (*K8SClient) CreateIter8Experiment ¶ added in v1.20.0
func (in *K8SClient) CreateIter8Experiment(namespace string, json string) (Iter8Experiment, error)
func (*K8SClient) DeleteIstioObject ¶ added in v1.20.0
DeleteIstioObject deletes an Istio object from either config api or networking api
func (*K8SClient) DeleteIter8Experiment ¶ added in v1.20.0
func (*K8SClient) GetConfigMap ¶ added in v1.20.0
GetConfigMap fetches and returns the specified ConfigMap definition from the cluster
func (*K8SClient) GetCronJobs ¶ added in v1.20.0
func (in *K8SClient) GetCronJobs(namespace string) ([]batch_v1beta1.CronJob, error)
func (*K8SClient) GetDeployment ¶ added in v1.20.0
func (in *K8SClient) GetDeployment(namespace, deploymentName string) (*apps_v1.Deployment, error)
GetDeployment returns the definition of a specific deployment. It returns an error on any problem.
func (*K8SClient) GetDeploymentConfig ¶ added in v1.20.0
func (in *K8SClient) GetDeploymentConfig(namespace, deploymentconfigName string) (*osapps_v1.DeploymentConfig, error)
GetDeployment returns the definition of a specific deployment. It returns an error on any problem.
func (*K8SClient) GetDeploymentConfigs ¶ added in v1.20.0
func (in *K8SClient) 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 (*K8SClient) GetDeployments ¶ added in v1.20.0
func (in *K8SClient) 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 (*K8SClient) GetDeploymentsByLabel ¶ added in v1.20.0
func (in *K8SClient) 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 (*K8SClient) GetEndpoints ¶ added in v1.20.0
GetEndpoints return the list of endpoint of a specific service. It returns an error on any problem.
func (*K8SClient) GetIstioConfigApi ¶ added in v1.20.0
func (client *K8SClient) GetIstioConfigApi() *rest.RESTClient
GetIstioConfigApi returns the istio config rest client
func (*K8SClient) GetIstioNetworkingApi ¶ added in v1.20.0
func (client *K8SClient) GetIstioNetworkingApi() *rest.RESTClient
GetIstioNetworkingApi returns the istio config rest client
func (*K8SClient) GetIstioObject ¶ added in v1.20.0
func (in *K8SClient) GetIstioObject(namespace, resourceType, name string) (IstioObject, error)
func (*K8SClient) GetIstioObjects ¶ added in v1.20.0
func (in *K8SClient) GetIstioObjects(namespace, resourceType, labelSelector string) ([]IstioObject, error)
func (*K8SClient) GetIstioRbacApi ¶ added in v1.20.0
func (client *K8SClient) GetIstioRbacApi() *rest.RESTClient
GetIstioRbacApi returns the istio rbac rest client
func (*K8SClient) GetIstioSecurityApi ¶ added in v1.20.0
func (client *K8SClient) GetIstioSecurityApi() *rest.RESTClient
GetIstioSecurityApi returns the istio security rest client
func (*K8SClient) GetIter8Experiment ¶ added in v1.20.0
func (in *K8SClient) GetIter8Experiment(namespace string, name string) (Iter8Experiment, error)
func (*K8SClient) GetIter8Experiments ¶ added in v1.20.0
func (in *K8SClient) GetIter8Experiments(namespace string) ([]Iter8Experiment, error)
func (*K8SClient) GetK8sApi ¶ added in v1.20.0
GetK8sApi returns the clientset referencing all K8s rest clients
func (*K8SClient) GetNamespace ¶ added in v1.20.0
GetNamespace fetches and returns the specified namespace definition from the cluster
func (*K8SClient) GetNamespaces ¶ added in v1.20.0
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 (*K8SClient) GetPod ¶ added in v1.20.0
GetPod returns the pod definitions for a given pod name. It returns an error on any problem.
func (*K8SClient) GetPodLogs ¶ added in v1.20.0
func (in *K8SClient) 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 (*K8SClient) GetPods ¶ added in v1.20.0
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 (*K8SClient) GetProject ¶ added in v1.20.0
func (in *K8SClient) 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 (*K8SClient) GetProjects ¶ added in v1.20.0
func (in *K8SClient) GetProjects(labelSelector string) ([]osproject_v1.Project, error)
func (*K8SClient) GetReplicaSets ¶ added in v1.20.0
func (in *K8SClient) GetReplicaSets(namespace string) ([]apps_v1.ReplicaSet, error)
func (*K8SClient) GetReplicationControllers ¶ added in v1.20.0
func (in *K8SClient) GetReplicationControllers(namespace string) ([]core_v1.ReplicationController, error)
func (*K8SClient) GetRoute ¶ added in v1.20.0
func (in *K8SClient) 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 (*K8SClient) GetSelfSubjectAccessReview ¶ added in v1.20.0
func (in *K8SClient) GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error)
GetSelfSubjectAccessReview provides information on Kiali permissions
func (*K8SClient) GetServerVersion ¶ added in v1.20.0
GetServerVersion fetches and returns information about the version Kubernetes that is running
func (*K8SClient) GetService ¶ added in v1.20.0
GetService returns the definition of a specific service. It returns an error on any problem.
func (*K8SClient) GetServices ¶ added in v1.20.0
func (in *K8SClient) 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 (*K8SClient) GetStatefulSet ¶ added in v1.20.0
func (*K8SClient) GetStatefulSets ¶ added in v1.20.0
func (in *K8SClient) GetStatefulSets(namespace string) ([]apps_v1.StatefulSet, error)
func (*K8SClient) IsIter8Api ¶ added in v1.20.0
func (*K8SClient) IsMaistraApi ¶ added in v1.20.0
func (*K8SClient) IsMixerDisabled ¶ added in v1.20.0
func (*K8SClient) IsOpenShift ¶ added in v1.20.0
func (*K8SClient) Iter8MetricMap ¶ added in v1.24.0
func (*K8SClient) UpdateIstioObject ¶ added in v1.20.0
func (in *K8SClient) UpdateIstioObject(api, namespace, resourceType, name, jsonPatch string) (IstioObject, error)
UpdateIstioObject updates an Istio object from either config api or networking api
func (*K8SClient) UpdateIter8Experiment ¶ added in v1.20.0
func (*K8SClient) UpdateNamespace ¶ added in v1.22.1
func (*K8SClient) UpdateProject ¶ added in v1.22.1
type K8SClientInterface ¶ added in v1.20.0
type K8SClientInterface interface { GetConfigMap(namespace, configName string) (*core_v1.ConfigMap, 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) GetEndpoints(namespace string, serviceName string) (*core_v1.Endpoints, 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) GetReplicationControllers(namespace string) ([]core_v1.ReplicationController, error) GetReplicaSets(namespace string) ([]apps_v1.ReplicaSet, 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) GetStatefulSet(namespace string, statefulsetName string) (*apps_v1.StatefulSet, error) GetStatefulSets(namespace string) ([]apps_v1.StatefulSet, error) UpdateNamespace(namespace string, jsonPatch string) (*core_v1.Namespace, error) UpdateWorkload(namespace string, workloadName string, workloadType string, jsonPatch string) error }
type MTLSDetails ¶ added in v0.15.0
type MTLSDetails struct { DestinationRules []IstioObject `json:"destinationrules"` MeshPeerAuthentications []IstioObject `json:"meshpeerauthentications"` PeerAuthentications []IstioObject `json:"peerauthentications"` EnabledAutoMtls bool `json:"enabledautomtls"` }
MTLSDetails is a wrapper to group all Istio objects related to non-local mTLS configurations
type OSClientInterface ¶ added in v1.20.0
type OSClientInterface interface { GetProject(project string) (*osproject_v1.Project, error) GetProjects(labelSelector string) ([]osproject_v1.Project, error) GetRoute(namespace string, name string) (*osroutes_v1.Route, error) UpdateProject(project string, jsonPatch string) (*osproject_v1.Project, error) }
type RBACDetails ¶ added in v0.17.0
type RBACDetails struct { ClusterRbacConfigs []IstioObject `json:"clusterrbacconfigs"` 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 RatioMetric ¶ added in v1.24.0
type RatioMetric struct { Name string `json:"name" yaml:"name"` Numerator string `json:"numerator" yaml:"numerator"` Denominator string `json:"denominator" yaml:"denominator"` ZeroToOne *bool `json:"zero_to_one,omitempty" yaml:"zero_to_one,omitempty"` PreferredDirection *string `json:"preferred_direction,omitempty" yaml:"preferred_direction,omitempty"` }
type RemoteSecret ¶ added in v1.23.0
type RemoteSecret struct { APIVersion string `yaml:"apiVersion"` Clusters []RemoteSecretClusterListItem `yaml:"clusters"` Contexts []struct { Context struct { Cluster string `yaml:"cluster"` User string `yaml:"user"` } `yaml:"context"` Name string `yaml:"name"` } `yaml:"contexts"` CurrentContext string `yaml:"current-context"` Kind string `yaml:"kind"` Preferences struct { } `yaml:"preferences"` Users []struct { Name string `yaml:"name"` User struct { Token string `yaml:"token"` } `yaml:"user"` } `yaml:"users"` }
func GetRemoteSecret ¶ added in v1.23.0
func GetRemoteSecret(path string) (*RemoteSecret, error)
type RemoteSecretCluster ¶ added in v1.23.0
type RemoteSecretClusterListItem ¶ added in v1.23.0
type RemoteSecretClusterListItem struct { Cluster RemoteSecretCluster `yaml:"cluster"` Name string `yaml:"name"` }
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