Documentation ¶
Index ¶
- Constants
- func FakeDepSyncedWithRS() []v1beta1.Deployment
- func FakeDeploymentConfigs() []osappsv1.DeploymentConfig
- func FakeDeployments() []v1beta1.Deployment
- func FakeDuplicatedDeployments() []v1beta1.Deployment
- func FakeDuplicatedReplicaSets() []v1beta2.ReplicaSet
- func FakeDuplicatedStatefulSets() []v1beta2.StatefulSet
- func FakePodsFromDaemonSet() []v1.Pod
- func FakePodsNoController() []v1.Pod
- func FakePodsSyncedWithDeployments() []v1.Pod
- func FakePodsSyncedWithDuplicated() []v1.Pod
- func FakeRSSyncedWithPods() []v1beta2.ReplicaSet
- func FakeReplicaSets() []v1beta2.ReplicaSet
- func FakeReplicationControllers() []v1.ReplicationController
- func FakeServices() []v1.Service
- func FakeStatefulSets() []v1beta2.StatefulSet
- func GetIstioAPI(resourceType string) string
- type AppService
- type DashboardsService
- type HealthService
- func (in *HealthService) GetAppHealth(namespace, app, rateInterval string, queryTime time.Time) (models.AppHealth, error)
- func (in *HealthService) GetNamespaceAppHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceAppHealth, error)
- func (in *HealthService) GetNamespaceServiceHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceServiceHealth, error)
- func (in *HealthService) GetNamespaceWorkloadHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceWorkloadHealth, error)
- func (in *HealthService) GetServiceHealth(namespace, service, rateInterval string, queryTime time.Time) (models.ServiceHealth, error)
- func (in *HealthService) GetWorkloadHealth(namespace, workload, rateInterval string, queryTime time.Time) (models.WorkloadHealth, error)
- type IstioConfigCriteria
- type IstioConfigService
- func (in *IstioConfigService) CreateIstioConfigDetail(api, namespace, resourceType, resourceSubtype string, body []byte) (models.IstioConfigDetails, error)
- func (in *IstioConfigService) DeleteIstioConfigDetail(api, namespace, resourceType, resourceSubtype, name string) (err error)
- func (in *IstioConfigService) GetIstioConfigDetails(namespace, objectType, objectSubtype, object string) (models.IstioConfigDetails, error)
- func (in *IstioConfigService) GetIstioConfigList(criteria IstioConfigCriteria) (models.IstioConfigList, error)
- func (in *IstioConfigService) ParseJsonForCreate(resourceType, subresourceType string, body []byte) (string, error)
- func (in *IstioConfigService) UpdateIstioConfigDetail(api, namespace, resourceType, resourceSubtype, name, jsonPatch string) (models.IstioConfigDetails, error)
- type IstioValidationsService
- type Layer
- type NamespaceService
- type ObjectChecker
- type SvcService
- func (in *SvcService) GetService(namespace, service, interval string, queryTime time.Time) (*models.ServiceDetails, error)
- func (in *SvcService) GetServiceDefinition(namespace, service string) (*models.ServiceDetails, error)
- func (in *SvcService) GetServiceList(namespace string) (*models.ServiceList, error)
- type WorkloadService
- func (in *WorkloadService) GetPods(namespace string, labelSelector string) (models.Pods, error)
- func (in *WorkloadService) GetWorkload(namespace string, workloadName string, includeServices bool) (*models.Workload, error)
- func (in *WorkloadService) GetWorkloadList(namespace string) (models.WorkloadList, error)
Constants ¶
const ( VirtualServices = "virtualservices" DestinationRules = "destinationrules" ServiceEntries = "serviceentries" Gateways = "gateways" Rules = "rules" Adapters = "adapters" Templates = "templates" QuotaSpecs = "quotaspecs" QuotaSpecBindings = "quotaspecbindings" Policies = "policies" )
Variables ¶
This section is empty.
Functions ¶
func FakeDepSyncedWithRS ¶
func FakeDepSyncedWithRS() []v1beta1.Deployment
func FakeDeploymentConfigs ¶
func FakeDeploymentConfigs() []osappsv1.DeploymentConfig
func FakeDeployments ¶
func FakeDeployments() []v1beta1.Deployment
func FakeDuplicatedDeployments ¶ added in v0.9.1
func FakeDuplicatedDeployments() []v1beta1.Deployment
func FakeDuplicatedReplicaSets ¶ added in v0.9.1
func FakeDuplicatedReplicaSets() []v1beta2.ReplicaSet
func FakeDuplicatedStatefulSets ¶ added in v0.9.1
func FakeDuplicatedStatefulSets() []v1beta2.StatefulSet
func FakePodsFromDaemonSet ¶
func FakePodsNoController ¶
func FakePodsSyncedWithDuplicated ¶ added in v0.9.1
func FakeRSSyncedWithPods ¶
func FakeRSSyncedWithPods() []v1beta2.ReplicaSet
func FakeReplicaSets ¶
func FakeReplicaSets() []v1beta2.ReplicaSet
func FakeReplicationControllers ¶
func FakeReplicationControllers() []v1.ReplicationController
func FakeServices ¶
func FakeStatefulSets ¶
func FakeStatefulSets() []v1beta2.StatefulSet
func GetIstioAPI ¶ added in v0.9.1
GetIstioAPI provides the Kubernetes API that manages this Istio resource type or empty string if it's not managed
Types ¶
type AppService ¶
type AppService struct {
// contains filtered or unexported fields
}
AppService deals with fetching Workloads group by "app" label, which will be identified as an "application"
func (*AppService) GetApp ¶
GetApp is the API handler to fetch the details for a given namespace and app name
func (*AppService) GetAppList ¶
func (in *AppService) GetAppList(namespace string) (models.AppList, error)
GetAppList is the API handler to fetch the list of applications in a given namespace
type DashboardsService ¶ added in v0.12.0
type DashboardsService struct {
// contains filtered or unexported fields
}
DashboardsService deals with fetching dashboards from k8s client
func NewDashboardsService ¶ added in v0.12.0
func NewDashboardsService(mon kubernetes.KialiMonitoringInterface, prom prometheus.ClientInterface) DashboardsService
NewDashboardsService initializes this business service
func (*DashboardsService) GetDashboard ¶ added in v0.12.0
func (in *DashboardsService) GetDashboard(params prometheus.CustomMetricsQuery, template string) (*models.MonitoringDashboard, error)
GetDashboard returns a dashboard filled-in with target data
func (*DashboardsService) GetIstioDashboard ¶ added in v0.12.0
func (in *DashboardsService) GetIstioDashboard(params prometheus.IstioMetricsQuery) (*models.MonitoringDashboard, error)
GetIstioDashboard returns Istio dashboard (currently hard-coded) filled-in with metrics
type HealthService ¶
type HealthService struct {
// contains filtered or unexported fields
}
HealthService deals with fetching health from various sources and convert to kiali model
func (*HealthService) GetAppHealth ¶
func (in *HealthService) GetAppHealth(namespace, app, rateInterval string, queryTime time.Time) (models.AppHealth, error)
GetAppHealth returns an app health from just Namespace and app name (thus, it fetches data from K8S and Prometheus)
func (*HealthService) GetNamespaceAppHealth ¶
func (in *HealthService) GetNamespaceAppHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceAppHealth, error)
GetNamespaceAppHealth returns a health for all apps in given Namespace (thus, it fetches data from K8S and Prometheus)
func (*HealthService) GetNamespaceServiceHealth ¶
func (in *HealthService) GetNamespaceServiceHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceServiceHealth, error)
GetNamespaceServiceHealth returns a health for all services in given Namespace (thus, it fetches data from K8S and Prometheus)
func (*HealthService) GetNamespaceWorkloadHealth ¶
func (in *HealthService) GetNamespaceWorkloadHealth(namespace, rateInterval string, queryTime time.Time) (models.NamespaceWorkloadHealth, error)
GetNamespaceWorkloadHealth returns a health for all workloads in given Namespace (thus, it fetches data from K8S and Prometheus)
func (*HealthService) GetServiceHealth ¶
func (in *HealthService) GetServiceHealth(namespace, service, rateInterval string, queryTime time.Time) (models.ServiceHealth, error)
GetServiceHealth returns a service health (service request error rate)
func (*HealthService) GetWorkloadHealth ¶
func (in *HealthService) GetWorkloadHealth(namespace, workload, rateInterval string, queryTime time.Time) (models.WorkloadHealth, error)
GetWorkloadHealth returns a workload health from just Namespace and workload (thus, it fetches data from K8S and Prometheus)
type IstioConfigCriteria ¶
type IstioConfigService ¶
type IstioConfigService struct {
// contains filtered or unexported fields
}
func (*IstioConfigService) CreateIstioConfigDetail ¶ added in v0.14.0
func (in *IstioConfigService) CreateIstioConfigDetail(api, namespace, resourceType, resourceSubtype string, body []byte) (models.IstioConfigDetails, error)
func (*IstioConfigService) DeleteIstioConfigDetail ¶ added in v0.9.1
func (in *IstioConfigService) DeleteIstioConfigDetail(api, namespace, resourceType, resourceSubtype, name string) (err error)
DeleteIstioConfigDetail deletes the given Istio resource
func (*IstioConfigService) GetIstioConfigDetails ¶
func (in *IstioConfigService) GetIstioConfigDetails(namespace, objectType, objectSubtype, object string) (models.IstioConfigDetails, error)
GetIstioConfigDetails returns a specific Istio configuration object. It uses following parameters: - "namespace": namespace where configuration is stored - "objectType": type of the configuration - "objectSubtype": subtype of the configuration, used when objectType == "adapters" or "templates", empty/not used otherwise - "object": name of the configuration
func (*IstioConfigService) GetIstioConfigList ¶ added in v0.9.1
func (in *IstioConfigService) GetIstioConfigList(criteria IstioConfigCriteria) (models.IstioConfigList, error)
GetIstioConfigList returns a list of Istio routing objects, Mixer Rules, (etc.) per a given Namespace.
func (*IstioConfigService) ParseJsonForCreate ¶ added in v0.14.0
func (in *IstioConfigService) ParseJsonForCreate(resourceType, subresourceType string, body []byte) (string, error)
ParseJsonForCreate checks if a json is well formed according resourceType/subresourceType. It returns a json validated to be used in the Create operation, or an error to report in the handler layer.
func (*IstioConfigService) UpdateIstioConfigDetail ¶ added in v0.12.0
func (in *IstioConfigService) UpdateIstioConfigDetail(api, namespace, resourceType, resourceSubtype, name, jsonPatch string) (models.IstioConfigDetails, error)
type IstioValidationsService ¶
type IstioValidationsService struct {
// contains filtered or unexported fields
}
func (*IstioValidationsService) GetIstioObjectValidations ¶
func (in *IstioValidationsService) GetIstioObjectValidations(namespace string, objectType string, object string) (models.IstioValidations, error)
func (*IstioValidationsService) GetValidations ¶ added in v0.14.0
func (in *IstioValidationsService) GetValidations(namespace, service string) (models.IstioValidations, error)
GetValidations returns an IstioValidations object with all the checks found when running all the enabled checkers. If service is "" then the whole namespace is validated.
type Layer ¶
type Layer struct { Svc SvcService Health HealthService Validations IstioValidationsService IstioConfig IstioConfigService Workload WorkloadService App AppService Namespace NamespaceService // contains filtered or unexported fields }
Layer is a container for fast access to inner services
func NewWithBackends ¶ added in v0.10.0
func NewWithBackends(k8s kubernetes.IstioClientInterface, prom prometheus.ClientInterface) *Layer
NewWithBackends creates the business layer using the passed k8s and prom clients
func SetWithBackends ¶
func SetWithBackends(k8s kubernetes.IstioClientInterface, prom prometheus.ClientInterface) *Layer
SetWithBackends creates all services with injected clients to external APIs
type NamespaceService ¶
type NamespaceService struct {
// contains filtered or unexported fields
}
Namespace deals with fetching k8s namespaces / OpenShift projects and convert to kiali model
func NewNamespaceService ¶
func NewNamespaceService(k8s kubernetes.IstioClientInterface) NamespaceService
func (*NamespaceService) GetNamespace ¶ added in v0.9.1
func (in *NamespaceService) GetNamespace(namespace string) (*models.Namespace, error)
GetNamespace returns the definition of the specified namespace.
func (*NamespaceService) GetNamespaces ¶
func (in *NamespaceService) GetNamespaces() ([]models.Namespace, error)
Returns a list of the given namespaces / projects
type ObjectChecker ¶
type ObjectChecker interface {
Check() models.IstioValidations
}
type SvcService ¶
type SvcService struct {
// contains filtered or unexported fields
}
SvcService deals with fetching istio/kubernetes services related content and convert to kiali model
func (*SvcService) GetService ¶
func (in *SvcService) GetService(namespace, service, interval string, queryTime time.Time) (*models.ServiceDetails, error)
GetService returns a single service and associated data using the interval and queryTime
func (*SvcService) GetServiceDefinition ¶ added in v0.11.0
func (in *SvcService) GetServiceDefinition(namespace, service string) (*models.ServiceDetails, error)
GetServiceDefinition returns a single service definition (the service object and endpoints), no istio or runtime information
func (*SvcService) GetServiceList ¶
func (in *SvcService) GetServiceList(namespace string) (*models.ServiceList, error)
GetServiceList returns a list of all services for a given Namespace
type WorkloadService ¶
type WorkloadService struct {
// contains filtered or unexported fields
}
Workload deals with fetching istio/kubernetes workloads related content and convert to kiali model
func (*WorkloadService) GetWorkload ¶
func (in *WorkloadService) GetWorkload(namespace string, workloadName string, includeServices bool) (*models.Workload, error)
GetWorkload is the API handler to fetch details of a specific workload. If includeServices is set true, the Workload will fetch all services related
func (*WorkloadService) GetWorkloadList ¶
func (in *WorkloadService) GetWorkloadList(namespace string) (models.WorkloadList, error)
GetWorkloadList is the API handler to fetch the list of workloads in a given namespace.