Documentation ¶
Index ¶
- Constants
- Variables
- func CheckMessage(checkId string) string
- func ConvertAggregations(from v1alpha1.MonitoringDashboardSpec) []kmodel.Aggregation
- func PrepareIstioDashboard(direction, local, remote string) kmodel.MonitoringDashboard
- type Address
- type Addresses
- type ApiDocumentation
- type App
- type AppHealth
- type AppList
- type AppListItem
- type Autoscaler
- type ClusterRbacConfig
- type ClusterRbacConfigSpec
- type ClusterRbacConfigs
- type ContainerInfo
- type DestinationRule
- type DestinationRules
- type Endpoint
- type Endpoints
- type Gateway
- type Gateways
- type GrafanaInfo
- type IstioAdapter
- type IstioAdapters
- type IstioCheck
- type IstioConfigDetails
- type IstioConfigList
- type IstioRule
- type IstioRuleList
- type IstioRules
- type IstioTemplate
- type IstioTemplates
- type IstioValidation
- type IstioValidationKey
- type IstioValidations
- func (iv IstioValidations) FilterByKey(objectType, name string) IstioValidations
- func (iv IstioValidations) FilterBySingleType(objectType, name string) IstioValidations
- func (iv IstioValidations) FilterByTypes(objectTypes []string) IstioValidations
- func (iv IstioValidations) MarshalJSON() ([]byte, error)
- func (iv IstioValidations) MergeReferences(validations IstioValidations) IstioValidations
- func (iv IstioValidations) MergeValidations(validations IstioValidations) IstioValidations
- type JaegerInfo
- type MTLSStatus
- type MeshPolicies
- type MeshPolicy
- type MeshPolicySpec
- type Namespace
- type NamespaceAppHealth
- type NamespaceServiceHealth
- type NamespaceValidations
- type NamespaceWorkloadHealth
- type Pod
- type Pods
- type Policies
- type Policy
- type Port
- type Ports
- type QuotaSpec
- type QuotaSpecBinding
- type QuotaSpecBindings
- type QuotaSpecs
- type RbacConfig
- type RbacConfigs
- type Reference
- type RequestHealth
- type ResourcePermissions
- type Service
- type ServiceDefinitionList
- type ServiceDetails
- func (s *ServiceDetails) SetApiDocumentation(apidoc ApiDocumentation)
- func (s *ServiceDetails) SetDestinationRules(dr []kubernetes.IstioObject, canCreate, canUpdate, canDelete bool)
- func (s *ServiceDetails) SetEndpoints(eps *core_v1.Endpoints)
- func (s *ServiceDetails) SetErrorTraces(errorTraces int)
- func (s *ServiceDetails) SetPods(pods []core_v1.Pod)
- func (s *ServiceDetails) SetService(svc *core_v1.Service)
- func (s *ServiceDetails) SetVirtualServices(vs []kubernetes.IstioObject, canCreate, canUpdate, canDelete bool)
- type ServiceEntries
- type ServiceEntry
- type ServiceHealth
- type ServiceList
- type ServiceMeshPolicies
- type ServiceMeshPolicy
- type ServiceMeshRbacConfig
- type ServiceMeshRbacConfigs
- type ServiceOverview
- type ServiceRole
- type ServiceRoleBinding
- type ServiceRoleBindings
- type ServiceRoles
- type Services
- type SeverityLevel
- type Sidecar
- type Sidecars
- type ThreeScaleHandler
- type ThreeScaleHandlers
- type ThreeScaleInfo
- type ThreeScaleServiceRule
- type VirtualService
- type VirtualServices
- type Workload
- func (workload *Workload) HasIstioSidecar() bool
- func (workload *Workload) ParseCronJob(cnjb *batch_v1beta1.CronJob)
- func (workload *Workload) ParseDeployment(d *apps_v1.Deployment)
- func (workload *Workload) ParseDeploymentConfig(dc *osapps_v1.DeploymentConfig)
- func (workload *Workload) ParseJob(job *batch_v1.Job)
- func (workload *Workload) ParsePod(pod *core_v1.Pod)
- func (workload *Workload) ParsePods(controllerName string, controllerType string, pods []core_v1.Pod)
- func (workload *Workload) ParseReplicaSet(r *apps_v1.ReplicaSet)
- func (workload *Workload) ParseReplicationController(r *core_v1.ReplicationController)
- func (workload *Workload) ParseStatefulSet(s *apps_v1.StatefulSet)
- func (workload *Workload) SetPods(pods []core_v1.Pod)
- func (workload *Workload) SetServices(svcs []core_v1.Service)
- type WorkloadHealth
- type WorkloadItem
- type WorkloadList
- type WorkloadListItem
- type WorkloadOverviews
- type WorkloadStatus
- type Workloads
Constants ¶
const ( BadThreeScaleHandlerJson = "bad ThreeScaleHandler JSON" BadThreeScaleRuleJson = "bad ThreeScaleHandler JSON" )
Variables ¶
var ObjectTypeSingular = map[string]string{
"gateways": "gateway",
"virtualservices": "virtualservice",
"destinationrules": "destinationrule",
"serviceentries": "serviceentry",
"rules": "rule",
"quotaspecs": "quotaspec",
"quotaspecbindings": "quotaspecbinding",
"meshpolicies": "meshpolicy",
"servicemeshpolicies": "servicemeshpolicy",
"policies": "policy",
"serviceroles": "servicerole",
"servicerolebindings": "servicerolebinding",
"clusterrbacconfigs": "clusterrbacconfig",
}
Functions ¶
func CheckMessage ¶ added in v0.14.0
func ConvertAggregations ¶ added in v0.12.0
func ConvertAggregations(from v1alpha1.MonitoringDashboardSpec) []kmodel.Aggregation
ConvertAggregations converts a k8s aggregations (from MonitoringDashboard k8s resource) into this models aggregations Results are sorted by DisplayName
func PrepareIstioDashboard ¶ added in v0.12.0
func PrepareIstioDashboard(direction, local, remote string) kmodel.MonitoringDashboard
PrepareIstioDashboard prepares the Istio dashboard title and aggregations dynamically for input values
Types ¶
type Addresses ¶
type Addresses []Address
func (*Addresses) Parse ¶
func (addresses *Addresses) Parse(as []core_v1.EndpointAddress)
type ApiDocumentation ¶ added in v1.3.0
type App ¶
type App struct { // Namespace where the app lives in // required: true // example: bookinfo Namespace Namespace `json:"namespace"` // Name of the application // required: true // example: reviews Name string `json:"name"` // Workloads for a given application // required: true Workloads []WorkloadItem `json:"workloads"` // List of service names linked with an application // required: true ServiceNames []string `json:"serviceNames"` // Runtimes and associated dashboards Runtimes []kmodel.Runtime `json:"runtimes"` }
type AppHealth ¶
type AppHealth struct { WorkloadStatuses []WorkloadStatus `json:"workloadStatuses"` Requests RequestHealth `json:"requests"` }
AppHealth contains aggregated health from various sources, for a given app
type AppList ¶
type AppList struct { // Namespace where the apps live in // required: true // example: bookinfo Namespace Namespace `json:"namespace"` // Applications for a given namespace // required: true Apps []AppListItem `json:"applications"` }
type AppListItem ¶
type AppListItem struct { // Name of the application // required: true // example: reviews Name string `json:"name"` // Define if all Pods related to the Workloads of this app has an IstioSidecar deployed // required: true // example: true IstioSidecar bool `json:"istioSidecar"` }
AppListItem has the necessary information to display the console app list
type Autoscaler ¶
type Autoscaler struct { Name string `json:"name"` Labels map[string]string `json:"labels"` CreatedAt string `json:"createdAt"` // Spec MinReplicas int32 `json:"minReplicas"` MaxReplicas int32 `json:"maxReplicas"` TargetCPUUtilizationPercentage int32 `json:"targetCPUUtilizationPercentage"` // Status ObservedGeneration int64 `json:"observedGeneration,omitempty"` LastScaleTime string `json:"lastScaleTime,omitempty"` CurrentReplicas int32 `json:"currentReplicas"` DesiredReplicas int32 `json:"desiredReplicas"` CurrentCPUUtilizationPercentage int32 `json:"currentCPUUtilizationPercentage,omitempty"` }
func (*Autoscaler) Parse ¶
func (autoscaler *Autoscaler) Parse(d *autoscaling_v1.HorizontalPodAutoscaler)
type ClusterRbacConfig ¶ added in v0.15.0
type ClusterRbacConfig struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec ClusterRbacConfigSpec `json:"spec"` }
func (*ClusterRbacConfig) Parse ¶ added in v0.15.0
func (rc *ClusterRbacConfig) Parse(clusterRbacConfig kubernetes.IstioObject)
type ClusterRbacConfigSpec ¶ added in v1.0.4
type ClusterRbacConfigSpec struct { Mode interface{} `json:"mode"` Inclusion interface{} `json:"inclusion"` Exclusion interface{} `json:"exclusion"` }
type ClusterRbacConfigs ¶ added in v0.15.0
type ClusterRbacConfigs []ClusterRbacConfig
func (*ClusterRbacConfigs) Parse ¶ added in v0.15.0
func (rcs *ClusterRbacConfigs) Parse(clusterRbacConfigs []kubernetes.IstioObject)
type ContainerInfo ¶
ContainerInfo holds container name and image
type DestinationRule ¶
type DestinationRule struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Host interface{} `json:"host"` TrafficPolicy interface{} `json:"trafficPolicy"` Subsets interface{} `json:"subsets"` } `json:"spec"` }
DestinationRule destinationRule
This is used for returning a DestinationRule ¶
swagger:model destinationRule
func (*DestinationRule) HasCircuitBreaker ¶ added in v0.9.1
func (dRule *DestinationRule) HasCircuitBreaker(namespace string, serviceName string, version string) bool
func (*DestinationRule) Parse ¶
func (dRule *DestinationRule) Parse(destinationRule kubernetes.IstioObject)
type DestinationRules ¶
type DestinationRules struct { Permissions ResourcePermissions `json:"permissions"` Items []DestinationRule `json:"items"` }
DestinationRules destinationRules
This is used for returning an array of DestinationRules ¶
swagger:model destinationRules An array of destinationRule swagger:allOf
func (*DestinationRules) Parse ¶
func (dRules *DestinationRules) Parse(destinationRules []kubernetes.IstioObject)
type Gateway ¶
type Gateway struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Servers interface{} `json:"servers"` Selector interface{} `json:"selector"` } `json:"spec"` }
func (*Gateway) Parse ¶
func (gw *Gateway) Parse(gateway kubernetes.IstioObject)
type Gateways ¶
type Gateways []Gateway
func (*Gateways) Parse ¶
func (gws *Gateways) Parse(gateways []kubernetes.IstioObject)
type GrafanaInfo ¶
type GrafanaInfo struct {
ExternalLinks []kmodel.ExternalLink `json:"externalLinks"`
}
GrafanaInfo provides information to access Grafana dashboards
type IstioAdapter ¶ added in v0.11.0
type IstioAdapter struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec interface{} `json:"spec"` Adapter string `json:"adapter"` // We need to bring the plural to use it from the UI to build the API Adapters string `json:"adapters"` }
IstioAdapter istioAdapter
This type type is used for returning a IstioAdapter ¶
swagger:model istioAdapter
func CastIstioAdapter ¶ added in v0.11.0
func CastIstioAdapter(adapter kubernetes.IstioObject) IstioAdapter
type IstioAdapters ¶ added in v0.11.0
type IstioAdapters []IstioAdapter
IstioAdapters istioAdapters
This type type is used for returning an array of IstioAdapters ¶
swagger:model istioAdapters An array of istioAdapter swagger:allOf
func CastIstioAdaptersCollection ¶ added in v0.11.0
func CastIstioAdaptersCollection(adapters []kubernetes.IstioObject) IstioAdapters
type IstioCheck ¶
type IstioCheck struct { // Description of the check // required: true // example: Weight sum should be 100 Message string `json:"message"` // Indicates the level of importance: error or warning // required: true // example: error Severity SeverityLevel `json:"severity"` // String that describes where in the yaml file is the check located // example: spec/http[0]/route Path string `json:"path"` }
IstioCheck represents an individual check. swagger:model
func Build ¶ added in v0.14.0
func Build(checkId string, path string) IstioCheck
type IstioConfigDetails ¶
type IstioConfigDetails struct { Namespace Namespace `json:"namespace"` ObjectType string `json:"objectType"` Gateway *Gateway `json:"gateway"` VirtualService *VirtualService `json:"virtualService"` DestinationRule *DestinationRule `json:"destinationRule"` ServiceEntry *ServiceEntry `json:"serviceEntry"` Rule *IstioRule `json:"rule"` Adapter *IstioAdapter `json:"adapter"` Template *IstioTemplate `json:"template"` QuotaSpec *QuotaSpec `json:"quotaSpec"` QuotaSpecBinding *QuotaSpecBinding `json:"quotaSpecBinding"` Policy *Policy `json:"policy"` MeshPolicy *MeshPolicy `json:"meshPolicy"` ServiceMeshPolicy *ServiceMeshPolicy `json:"serviceMeshPolicy"` ClusterRbacConfig *ClusterRbacConfig `json:"clusterRbacConfig"` RbacConfig *RbacConfig `json:"rbacConfig"` ServiceMeshRbacConfig *ServiceMeshRbacConfig `json:"serviceMeshRbacConfig"` ServiceRole *ServiceRole `json:"serviceRole"` ServiceRoleBinding *ServiceRoleBinding `json:"serviceRoleBinding"` Sidecar *Sidecar `json:"sidecar"` Permissions ResourcePermissions `json:"permissions"` IstioValidation *IstioValidation `json:"validation"` }
type IstioConfigList ¶
type IstioConfigList struct { // The namespace of istioConfiglist // // required: true Namespace Namespace `json:"namespace"` Gateways Gateways `json:"gateways"` VirtualServices VirtualServices `json:"virtualServices"` DestinationRules DestinationRules `json:"destinationRules"` ServiceEntries ServiceEntries `json:"serviceEntries"` Rules IstioRules `json:"rules"` Adapters IstioAdapters `json:"adapters"` Templates IstioTemplates `json:"templates"` QuotaSpecs QuotaSpecs `json:"quotaSpecs"` QuotaSpecBindings QuotaSpecBindings `json:"quotaSpecBindings"` Policies Policies `json:"policies"` MeshPolicies MeshPolicies `json:"meshPolicies"` ServiceMeshPolicies ServiceMeshPolicies `json:"serviceMeshPolicies"` ClusterRbacConfigs ClusterRbacConfigs `json:"clusterRbacConfigs"` RbacConfigs RbacConfigs `json:"rbacConfigs"` ServiceMeshRbacConfigs ServiceMeshRbacConfigs `json:"serviceMeshRbacConfigs"` ServiceRoles ServiceRoles `json:"serviceRoles"` ServiceRoleBindings ServiceRoleBindings `json:"serviceRoleBindings"` Sidecars Sidecars `json:"sidecars"` IstioValidations IstioValidations `json:"validations"` }
IstioConfigList istioConfigList
This type is used for returning a response of IstioConfigList ¶
swagger:model IstioConfigList
type IstioRule ¶
type IstioRule struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Match interface{} `json:"match"` Actions interface{} `json:"actions"` } `json:"spec"` }
IstioRule istioRule
This type type is used for returning a IstioRule ¶
swagger:model istioRule
func CastIstioRule ¶
func CastIstioRule(rule kubernetes.IstioObject) IstioRule
type IstioRuleList ¶
type IstioRules ¶
type IstioRules []IstioRule
IstioRules istioRules
This type type is used for returning an array of IstioRules ¶
swagger:model istioRules An array of istioRule swagger:allOf
func CastIstioRulesCollection ¶
func CastIstioRulesCollection(rules []kubernetes.IstioObject) IstioRules
type IstioTemplate ¶ added in v0.11.0
type IstioTemplate struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec interface{} `json:"spec"` Template string `json:"template"` // We need to bring the plural to use it from the UI to build the API Templates string `json:"templates"` }
IstioTemplate istioTemplate
This type type is used for returning a IstioTemplate ¶
swagger:model istioTemplate
func CastIstioTemplate ¶ added in v0.11.0
func CastIstioTemplate(template kubernetes.IstioObject) IstioTemplate
type IstioTemplates ¶ added in v0.11.0
type IstioTemplates []IstioTemplate
IstioTemplates istioTemplates
This type type is used for returning an array of IstioTemplates ¶
swagger:model istioTemplates An array of istioTemplates swagger:allOf
func CastIstioTemplatesCollection ¶ added in v0.11.0
func CastIstioTemplatesCollection(templates []kubernetes.IstioObject) IstioTemplates
type IstioValidation ¶
type IstioValidation struct { // Name of the object itself // required: true // example: reviews Name string `json:"name"` // Type of the object // required: true // example: virtualservice ObjectType string `json:"objectType"` // Represents validity of the object: in case of warning, validity remains as true // required: true // example: false Valid bool `json:"valid"` // Array of checks. It might be empty. Checks []*IstioCheck `json:"checks"` // Related objects (only validation errors) References []IstioValidationKey `json:"references"` }
IstioValidation represents a list of checks associated to an Istio object. swagger:model
type IstioValidationKey ¶
type IstioValidationKey struct { ObjectType string `json:"objectType"` Name string `json:"name"` Namespace string `json:"namespace"` }
IstioValidationKey is the key value composed of an Istio ObjectType and Name.
func BuildKey ¶ added in v0.15.0
func BuildKey(objectType, name, namespace string) IstioValidationKey
type IstioValidations ¶
type IstioValidations map[IstioValidationKey]*IstioValidation
IstioValidations represents a set of IstioValidation grouped by IstioValidationKey.
func (IstioValidations) FilterByKey ¶
func (iv IstioValidations) FilterByKey(objectType, name string) IstioValidations
func (IstioValidations) FilterBySingleType ¶ added in v0.20.0
func (iv IstioValidations) FilterBySingleType(objectType, name string) IstioValidations
func (IstioValidations) FilterByTypes ¶ added in v0.14.0
func (iv IstioValidations) FilterByTypes(objectTypes []string) IstioValidations
FilterByTypes takes an input as ObjectTypes, transforms to singular types and filters the validations
func (IstioValidations) MarshalJSON ¶
func (iv IstioValidations) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (IstioValidations) MergeReferences ¶ added in v1.7.0
func (iv IstioValidations) MergeReferences(validations IstioValidations) IstioValidations
func (IstioValidations) MergeValidations ¶
func (iv IstioValidations) MergeValidations(validations IstioValidations) IstioValidations
type JaegerInfo ¶
type JaegerInfo struct {
URL string `json:"url"`
}
JaegerInfo provides information to access Jaeger UI
type MTLSStatus ¶ added in v0.16.0
type MTLSStatus struct { // mTLS status: MTLS_ENABLED, MTLS_PARTIALLY_ENABLED, MTLS_NOT_ENABLED // required: true // example: MTLS_ENABLED Status string `json:"status"` }
MTLSStatus describes the current mTLS status of a mesh entity
type MeshPolicies ¶ added in v0.15.0
type MeshPolicies []MeshPolicy
func (*MeshPolicies) Parse ¶ added in v0.15.0
func (mps *MeshPolicies) Parse(meshPolicies []kubernetes.IstioObject)
type MeshPolicy ¶ added in v0.15.0
type MeshPolicy struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec MeshPolicySpec `json:"spec"` }
func (*MeshPolicy) Parse ¶ added in v0.15.0
func (mp *MeshPolicy) Parse(meshPolicy kubernetes.IstioObject)
type MeshPolicySpec ¶ added in v1.0.4
type MeshPolicySpec struct { Targets interface{} `json:"targets"` Peers interface{} `json:"peers"` PeerIsOptional interface{} `json:"peerIsOptional"` Origins interface{} `json:"origins"` OriginIsOptional interface{} `json:"originIsOptional"` PrincipalBinding interface{} `json:"principalBinding"` }
type Namespace ¶
type Namespace struct { // The id of the namespace. // // example: istio-system // required: true Name string `json:"name"` // Creation date of the namespace. // There is no need to export this through the API. So, this is // set to be ignored by JSON package. // // required: true CreationTimestamp time.Time `json:"-"` }
A Namespace provide a scope for names This type is used to describe a set of objects.
swagger:model namespace
func CastNamespace ¶
func CastNamespaceCollection ¶
func CastProject ¶
func CastProject(p osproject_v1.Project) Namespace
func CastProjectCollection ¶
func CastProjectCollection(ps []osproject_v1.Project) []Namespace
type NamespaceAppHealth ¶
NamespaceAppHealth is an alias of map of app name x health
type NamespaceServiceHealth ¶
type NamespaceServiceHealth map[string]*ServiceHealth
NamespaceServiceHealth is an alias of map of service name x health
type NamespaceValidations ¶
type NamespaceValidations map[string]IstioValidations
NamespaceValidations represents a set of IstioValidations grouped by namespace
type NamespaceWorkloadHealth ¶
type NamespaceWorkloadHealth map[string]*WorkloadHealth
NamespaceWorkloadHealth is an alias of map of workload name x health
type Pod ¶
type Pod struct { Name string `json:"name"` Labels map[string]string `json:"labels"` CreatedAt string `json:"createdAt"` CreatedBy []Reference `json:"createdBy"` Containers []*ContainerInfo `json:"containers"` IstioContainers []*ContainerInfo `json:"istioContainers"` IstioInitContainers []*ContainerInfo `json:"istioInitContainers"` Status string `json:"status"` AppLabel bool `json:"appLabel"` VersionLabel bool `json:"versionLabel"` Annotations map[string]string `json:"annotations"` }
Pod holds a subset of v1.Pod data that is meaningful in Kiali
func (*Pod) GetAnnotations ¶ added in v1.1.0
GetAnnotations is needed by k-charted
func (Pod) HasIstioSidecar ¶ added in v0.20.0
HasIstioSidecar returns true if the pod has an Isio proxy sidecar
type Pods ¶
type Pods []*Pod
Pods alias for list of Pod structs
func (Pods) HasIstioSidecar ¶ added in v0.20.0
HasIstioSidecar returns true if there are no pods or all pods have a sidecar
type Policies ¶ added in v0.14.0
type Policies []Policy
func (*Policies) Parse ¶ added in v0.14.0
func (ps *Policies) Parse(policies []kubernetes.IstioObject)
type Policy ¶ added in v0.14.0
type Policy struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Targets interface{} `json:"targets"` Peers interface{} `json:"peers"` PeerIsOptional interface{} `json:"peerIsOptional"` Origins interface{} `json:"origins"` OriginIsOptional interface{} `json:"originIsOptional"` PrincipalBinding interface{} `json:"principalBinding"` } `json:"spec"` }
func (*Policy) Parse ¶ added in v0.14.0
func (p *Policy) Parse(policy kubernetes.IstioObject)
type Port ¶
type Port struct { Name string `json:"name"` Protocol string `json:"protocol"` Port int32 `json:"port"` }
func (*Port) Parse ¶
func (port *Port) Parse(p core_v1.ServicePort)
func (*Port) ParseEndpointPort ¶
func (port *Port) ParseEndpointPort(p core_v1.EndpointPort)
type Ports ¶
type Ports []Port
func (*Ports) Parse ¶
func (ports *Ports) Parse(ps []core_v1.ServicePort)
func (*Ports) ParseEndpointPorts ¶
func (ports *Ports) ParseEndpointPorts(ps []core_v1.EndpointPort)
type QuotaSpec ¶
type QuotaSpec struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Rules interface{} `json:"rules"` } `json:"spec"` }
func (*QuotaSpec) Parse ¶
func (qs *QuotaSpec) Parse(quotaSpec kubernetes.IstioObject)
type QuotaSpecBinding ¶
type QuotaSpecBinding struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { QuotaSpecs interface{} `json:"quotaSpecs"` Services interface{} `json:"services"` } `json:"spec"` }
func (*QuotaSpecBinding) Parse ¶
func (qsb *QuotaSpecBinding) Parse(quotaSpecBinding kubernetes.IstioObject)
type QuotaSpecBindings ¶
type QuotaSpecBindings []QuotaSpecBinding
func (*QuotaSpecBindings) Parse ¶
func (qsbs *QuotaSpecBindings) Parse(quotaSpecBindings []kubernetes.IstioObject)
type QuotaSpecs ¶
type QuotaSpecs []QuotaSpec
func (*QuotaSpecs) Parse ¶
func (qss *QuotaSpecs) Parse(quotaSpecs []kubernetes.IstioObject)
type RbacConfig ¶ added in v0.16.0
type RbacConfig struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Mode interface{} `json:"mode"` Inclusion interface{} `json:"inclusion"` Exclusion interface{} `json:"exclusion"` } `json:"spec"` }
func (*RbacConfig) Parse ¶ added in v0.16.0
func (rc *RbacConfig) Parse(rbacConfig kubernetes.IstioObject)
type RbacConfigs ¶ added in v0.16.0
type RbacConfigs []RbacConfig
func (*RbacConfigs) Parse ¶ added in v0.16.0
func (rcs *RbacConfigs) Parse(rbacConfigs []kubernetes.IstioObject)
type RequestHealth ¶
type RequestHealth struct { ErrorRatio float64 `json:"errorRatio"` InboundErrorRatio float64 `json:"inboundErrorRatio"` OutboundErrorRatio float64 `json:"outboundErrorRatio"` // contains filtered or unexported fields }
RequestHealth holds several stats about recent request errors
func NewEmptyRequestHealth ¶ added in v0.11.0
func NewEmptyRequestHealth() RequestHealth
func (*RequestHealth) AggregateInbound ¶ added in v0.11.0
func (in *RequestHealth) AggregateInbound(sample *model.Sample)
AggregateInbound adds the provided metric sample to internal inbound counters and updates error ratios
func (*RequestHealth) AggregateOutbound ¶ added in v0.11.0
func (in *RequestHealth) AggregateOutbound(sample *model.Sample)
AggregateOutbound adds the provided metric sample to internal outbound counters and updates error ratios
type ResourcePermissions ¶ added in v0.9.1
type ResourcePermissions struct { Create bool `json:"create"` Update bool `json:"update"` Delete bool `json:"delete"` }
ResourcePermissions holds permission flags for an object type True means allowed.
type Service ¶
type Service struct { Name string `json:"name"` CreatedAt string `json:"createdAt"` ResourceVersion string `json:"resourceVersion"` Namespace Namespace `json:"namespace"` Labels map[string]string `json:"labels"` Selectors map[string]string `json:"selectors"` Type string `json:"type"` Ip string `json:"ip"` Ports Ports `json:"ports"` ExternalName string `json:"externalName"` }
type ServiceDefinitionList ¶ added in v1.5.0
type ServiceDefinitionList struct { Namespace Namespace `json:"namespace"` ServiceDefinitions []ServiceDetails `json:"serviceDefinitions"` }
type ServiceDetails ¶
type ServiceDetails struct { Service Service `json:"service"` IstioSidecar bool `json:"istioSidecar"` Endpoints Endpoints `json:"endpoints"` VirtualServices VirtualServices `json:"virtualServices"` DestinationRules DestinationRules `json:"destinationRules"` Workloads WorkloadOverviews `json:"workloads"` Health ServiceHealth `json:"health"` Validations IstioValidations `json:"validations"` ErrorTraces int `json:"errorTraces"` NamespaceMTLS MTLSStatus `json:"namespaceMTLS"` ApiDocumentation ApiDocumentation `json:"apiDocumentation"` }
func (*ServiceDetails) SetApiDocumentation ¶ added in v1.3.0
func (s *ServiceDetails) SetApiDocumentation(apidoc ApiDocumentation)
func (*ServiceDetails) SetDestinationRules ¶
func (s *ServiceDetails) SetDestinationRules(dr []kubernetes.IstioObject, canCreate, canUpdate, canDelete bool)
func (*ServiceDetails) SetEndpoints ¶
func (s *ServiceDetails) SetEndpoints(eps *core_v1.Endpoints)
func (*ServiceDetails) SetErrorTraces ¶ added in v0.15.0
func (s *ServiceDetails) SetErrorTraces(errorTraces int)
func (*ServiceDetails) SetPods ¶
func (s *ServiceDetails) SetPods(pods []core_v1.Pod)
func (*ServiceDetails) SetService ¶
func (s *ServiceDetails) SetService(svc *core_v1.Service)
func (*ServiceDetails) SetVirtualServices ¶
func (s *ServiceDetails) SetVirtualServices(vs []kubernetes.IstioObject, canCreate, canUpdate, canDelete bool)
type ServiceEntries ¶
type ServiceEntries []ServiceEntry
func (*ServiceEntries) Parse ¶
func (ses *ServiceEntries) Parse(serviceEntries []kubernetes.IstioObject)
type ServiceEntry ¶
type ServiceEntry struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Hosts interface{} `json:"hosts"` Addresses interface{} `json:"addresses"` Ports interface{} `json:"ports"` Location interface{} `json:"location"` Resolution interface{} `json:"resolution"` Endpoints interface{} `json:"endpoints"` ExportTo interface{} `json:"exportTo"` SubjectAltNames interface{} `json:"subjectAltNames"` } `json:"spec"` }
func (*ServiceEntry) Parse ¶
func (se *ServiceEntry) Parse(serviceEntry kubernetes.IstioObject)
type ServiceHealth ¶
type ServiceHealth struct {
Requests RequestHealth `json:"requests"`
}
ServiceHealth contains aggregated health from various sources, for a given service
func EmptyServiceHealth ¶ added in v0.11.0
func EmptyServiceHealth() ServiceHealth
EmptyServiceHealth create an empty ServiceHealth
type ServiceList ¶
type ServiceList struct { Namespace Namespace `json:"namespace"` Services []ServiceOverview `json:"services"` Validations IstioValidations `json:"validations"` }
type ServiceMeshPolicies ¶ added in v1.0.4
type ServiceMeshPolicies []ServiceMeshPolicy
func (*ServiceMeshPolicies) Parse ¶ added in v1.0.4
func (mps *ServiceMeshPolicies) Parse(smPolicies []kubernetes.IstioObject)
type ServiceMeshPolicy ¶ added in v1.0.4
type ServiceMeshPolicy struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec MeshPolicySpec `json:"spec"` }
func (*ServiceMeshPolicy) Parse ¶ added in v1.0.4
func (mp *ServiceMeshPolicy) Parse(smPolicy kubernetes.IstioObject)
type ServiceMeshRbacConfig ¶ added in v1.0.4
type ServiceMeshRbacConfig struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec ClusterRbacConfigSpec `json:"spec"` }
func (*ServiceMeshRbacConfig) Parse ¶ added in v1.0.4
func (rc *ServiceMeshRbacConfig) Parse(smRbacConfig kubernetes.IstioObject)
type ServiceMeshRbacConfigs ¶ added in v1.0.4
type ServiceMeshRbacConfigs []ServiceMeshRbacConfig
func (*ServiceMeshRbacConfigs) Parse ¶ added in v1.0.4
func (rcs *ServiceMeshRbacConfigs) Parse(smRbacConfigs []kubernetes.IstioObject)
type ServiceOverview ¶
type ServiceOverview struct { // Name of the Service // required: true // example: reviews-v1 Name string `json:"name"` // Define if Pods related to this Service has an IstioSidecar deployed // required: true // example: true IstioSidecar bool `json:"istioSidecar"` // Has label app // required: true // example: true AppLabel bool `json:"appLabel"` // Type of api being served (graphql, grpc, rest) // example: rest // required: false ApiType string `json:"apiType,omitempty"` }
type ServiceRole ¶ added in v0.15.0
type ServiceRole struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Rules interface{} `json:"rules"` } `json:"spec"` }
func (*ServiceRole) Parse ¶ added in v0.15.0
func (sr *ServiceRole) Parse(serviceRole kubernetes.IstioObject)
type ServiceRoleBinding ¶ added in v0.15.0
type ServiceRoleBinding struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Subjects interface{} `json:"subjects"` RoleRef interface{} `json:"roleRef"` } `json:"spec"` }
func (*ServiceRoleBinding) Parse ¶ added in v0.15.0
func (srb *ServiceRoleBinding) Parse(serviceRoleBinding kubernetes.IstioObject)
type ServiceRoleBindings ¶ added in v0.15.0
type ServiceRoleBindings []ServiceRoleBinding
func (*ServiceRoleBindings) Parse ¶ added in v0.15.0
func (srbs *ServiceRoleBindings) Parse(serviceRoleBindings []kubernetes.IstioObject)
type ServiceRoles ¶ added in v0.15.0
type ServiceRoles []ServiceRole
func (*ServiceRoles) Parse ¶ added in v0.15.0
func (srs *ServiceRoles) Parse(serviceRoles []kubernetes.IstioObject)
type SeverityLevel ¶ added in v0.14.0
type SeverityLevel string
const ( ErrorSeverity SeverityLevel = "error" WarningSeverity SeverityLevel = "warning" Unknown SeverityLevel = "unknown" )
type Sidecar ¶ added in v0.21.0
type Sidecar struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { WorkloadSelector interface{} `json:"workloadSelector"` Ingress interface{} `json:"ingress"` Egress interface{} `json:"egress"` } `json:"spec"` }
func (*Sidecar) Parse ¶ added in v0.21.0
func (sc *Sidecar) Parse(sidecar kubernetes.IstioObject)
type Sidecars ¶ added in v0.21.0
type Sidecars []Sidecar
func (*Sidecars) Parse ¶ added in v0.21.0
func (scs *Sidecars) Parse(sidecars []kubernetes.IstioObject)
type ThreeScaleHandler ¶ added in v0.20.0
type ThreeScaleHandler struct { Name string `json:"name"` ServiceId string `json:"serviceId"` SystemUrl string `json:"systemUrl"` AccessToken string `json:"accessToken"` }
ThreeScaleHAndler represents the minimal info that a user needs to know from the UI to link a service with 3Scale site
func CastThreeScaleHandler ¶ added in v0.20.0
func CastThreeScaleHandler(handler kubernetes.IstioObject) ThreeScaleHandler
type ThreeScaleHandlers ¶ added in v0.20.0
type ThreeScaleHandlers []ThreeScaleHandler
func CastThreeScaleHandlers ¶ added in v0.20.0
func CastThreeScaleHandlers(handlers []kubernetes.IstioObject) ThreeScaleHandlers
type ThreeScaleInfo ¶ added in v0.20.0
type ThreeScaleInfo struct { Enabled bool `json:"enabled"` Permissions ResourcePermissions `json:"permissions"` }
ThreeScaleInfo shows if 3scale adapter is enabled in cluster and if user has permissions on adapter's configuration
type ThreeScaleServiceRule ¶ added in v0.20.0
type VirtualService ¶
type VirtualService struct { meta_v1.TypeMeta Metadata meta_v1.ObjectMeta `json:"metadata"` Spec struct { Hosts interface{} `json:"hosts"` Gateways interface{} `json:"gateways"` Http interface{} `json:"http"` Tcp interface{} `json:"tcp"` Tls interface{} `json:"tls"` ExportTo interface{} `json:"exportTo"` } `json:"spec"` }
VirtualService virtualService
This type is used for returning a VirtualService ¶
swagger:model virtualService
func (*VirtualService) IsValidHost ¶ added in v0.9.1
func (vService *VirtualService) IsValidHost(namespace string, serviceName string) bool
IsValidHost returns true if VirtualService hosts applies to the service
func (*VirtualService) Parse ¶
func (vService *VirtualService) Parse(virtualService kubernetes.IstioObject)
type VirtualServices ¶
type VirtualServices struct { Permissions ResourcePermissions `json:"permissions"` Items []VirtualService `json:"items"` }
VirtualServices virtualServices
This type is used for returning an array of VirtualServices with some permission flags ¶
swagger:model virtualServices An array of virtualService swagger:allOf
func (*VirtualServices) Parse ¶
func (vServices *VirtualServices) Parse(virtualServices []kubernetes.IstioObject)
type Workload ¶
type Workload struct { WorkloadListItem // Number of desired replicas defined by the user in the controller Spec // required: true // example: 2 DesiredReplicas int32 `json:"desiredReplicas"` // Number of current replicas pods that matches controller selector labels // required: true // example: 2 CurrentReplicas int32 `json:"currentReplicas"` // Number of available replicas // required: true // example: 1 AvailableReplicas int32 `json:"availableReplicas"` // Pods bound to the workload Pods Pods `json:"pods"` // Services that match workload selector Services Services `json:"services"` // Runtimes and associated dashboards Runtimes []kmodel.Runtime `json:"runtimes"` }
Workload has the details of a workload
func (*Workload) HasIstioSidecar ¶ added in v0.20.0
HasIstioSidecar return true if there is at least one pod and all pods have sidecars
func (*Workload) ParseCronJob ¶
func (workload *Workload) ParseCronJob(cnjb *batch_v1beta1.CronJob)
func (*Workload) ParseDeployment ¶
func (workload *Workload) ParseDeployment(d *apps_v1.Deployment)
func (*Workload) ParseDeploymentConfig ¶
func (workload *Workload) ParseDeploymentConfig(dc *osapps_v1.DeploymentConfig)
func (*Workload) ParseReplicaSet ¶
func (workload *Workload) ParseReplicaSet(r *apps_v1.ReplicaSet)
func (*Workload) ParseReplicationController ¶
func (workload *Workload) ParseReplicationController(r *core_v1.ReplicationController)
func (*Workload) ParseStatefulSet ¶
func (workload *Workload) ParseStatefulSet(s *apps_v1.StatefulSet)
func (*Workload) SetServices ¶
type WorkloadHealth ¶
type WorkloadHealth struct { WorkloadStatus WorkloadStatus `json:"workloadStatus"` Requests RequestHealth `json:"requests"` }
WorkloadHealth contains aggregated health from various sources, for a given workload
type WorkloadItem ¶
type WorkloadItem struct { // Name of a workload member of an application // required: true // example: reviews-v1 WorkloadName string `json:"workloadName"` // Define if all Pods related to the Workload has an IstioSidecar deployed // required: true // example: true IstioSidecar bool `json:"istioSidecar"` }
type WorkloadList ¶
type WorkloadList struct { // Namespace where the workloads live in // required: true // example: bookinfo Namespace Namespace `json:"namespace"` // Workloads for a given namespace // required: true Workloads []WorkloadListItem `json:"workloads"` }
type WorkloadListItem ¶
type WorkloadListItem struct { // Name of the workload // required: true // example: reviews-v1 Name string `json:"name"` // Type of the workload // required: true // example: deployment Type string `json:"type"` // Creation timestamp (in RFC3339 format) // required: true // example: 2018-07-31T12:24:17Z CreatedAt string `json:"createdAt"` // Kubernetes ResourceVersion // required: true // example: 192892127 ResourceVersion string `json:"resourceVersion"` // Define if Pods related to this Workload has an IstioSidecar deployed // required: true // example: true IstioSidecar bool `json:"istioSidecar"` // Workload labels Labels map[string]string `json:"labels"` // Define if Pods related to this Workload has the label App // required: true // example: true AppLabel bool `json:"appLabel"` // Define if Pods related to this Workload has the label Version // required: true // example: true VersionLabel bool `json:"versionLabel"` // Number of current workload pods // required: true // example: 1 PodCount int `json:"podCount"` }
WorkloadListItem has the necessary information to display the console workload list
func (*WorkloadListItem) ParseWorkload ¶
func (workload *WorkloadListItem) ParseWorkload(w *Workload)
type WorkloadOverviews ¶
type WorkloadOverviews []*WorkloadListItem
type WorkloadStatus ¶
type WorkloadStatus struct { Name string `json:"name"` DesiredReplicas int32 `json:"desiredReplicas"` CurrentReplicas int32 `json:"currentReplicas"` AvailableReplicas int32 `json:"availableReplicas"` }
WorkloadStatus gives - number of desired replicas defined in the Spec of a controller - number of current replicas that matches selector of a controller - number of available replicas for a given workload In healthy scenarios all variables should point same value. When something wrong happens the different values can indicate an unhealthy situation. i.e.
desired = 1, current = 10, available = 0 would means that a user scaled down a workload from 10 to 1 but in the operaton 10 pods showed problems, so no pod is available/ready but user will see 10 pods under a workload
Source Files ¶
- address.go
- app.go
- autoscalers.go
- cluster_rbac_config.go
- dashboards.go
- destination_rule.go
- endpoint.go
- gateway.go
- grafana_info.go
- health.go
- istio_config.go
- istio_rule.go
- istio_validation.go
- jaeger_info.go
- mesh_policy.go
- mtls_status.go
- namespace.go
- pod.go
- policy.go
- port.go
- quota_spec.go
- quota_spec_binding.go
- rbac_config.go
- service.go
- service_entry.go
- service_role.go
- service_role_binding.go
- sidecars.go
- threescale.go
- util.go
- virtual_service.go
- workload.go