problem

package
v0.0.0-...-599ae38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aggregate

func Aggregate(ctx context.Context, problems []*Problem, client *kubeclient.KubeClient) (interface{}, error)

Aggregate problems into report cards. Problems related to the same resource will be grouped together.

Types

type ArgoInstance

type ArgoInstance struct {
	Instance        string
	RolloutTemplate string
}

type DeeplinkType

type DeeplinkType string
const (
	DeeplinkEvent      DeeplinkType = "event"
	DeeplinkAppLog     DeeplinkType = "applog"
	DeeplinkKubeletLog DeeplinkType = "kubeletlog"
)

type DetectorCreationInput

type DetectorCreationInput struct {
	Kubeconfig     *rest.Config
	Namespace      string
	ClusterName    string
	EventTimespan  TimeSpan
	LogTimespan    TimeSpan
	AwsConfig      aws.Config
	KubeClient     *kubeclient.KubeClient
	EventRetriever observability.EventRetriever
}

type DetectorName

type DetectorName string

type DomainName

type DomainName int

Custom type for holding the Problem domains.

type Problem

type Problem struct {
	Name              string
	Description       string
	Tags              map[string]string
	Level             ProblemLevel
	CauseLevel        int
	SolutionDetails   *common.LockedSlice // output field after detetor. It contains solutions details to show in UI.
	UsefulCommands    *common.LockedSlice // output field after detetor. It contains solutions details to show in UI.
	AffectedResources ResourceDetails     // output field after detetor. It contains the resources affected by this problem that to show in UI.
}

Problem struct is for Prometheus alerts feature. It is the input and output struct for detectors.

type ProblemLevel

type ProblemLevel int
const (
	Cluster ProblemLevel = iota
	ManagedNamespace
	UserNamespace
)

type ReportCard

type ReportCard struct {
	Name            string                `json:"name"`
	RootCause       *ReportCardIssue      `json:"rootCause"`
	Resources       []*ReportCardResource `json:"resources"`
	TopResourceType string                `json:"topResourceType"`
	Level           ProblemLevel          `json:"level"`
	ID              string                `json:"id"`
}

type ReportCardIssue

type ReportCardIssue struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Solutions   []string          `json:"solutions,omitempty"`
	Commands    []string          `json:"commands,omitempty"`
	CreatedTime string            `json:"createdTime,omitempty"`
	Tags        map[string]string `json:"tags,omitempty"`
	DomainName  DomainName        `json:"domainName,omitempty"`
	// Documents   []string   `json:"documents,omitempty"`
	CauseLevel int `json:"causelevel,omitempty"`
}

type ReportCardResource

type ReportCardResource struct {
	Name        string                 `json:"name"`
	Type        string                 `json:"type"`
	Labels      map[string]string      `json:"labels,omitempty"`
	Tags        []string               `json:"tags,omitempty"`
	Annotations map[string]string      `json:"annotations,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
	Issue       *ReportCardIssue       `json:"issue,omitempty"`
	Deeplink    map[string]string      `json:"deeplink,omitempty"`
}

type ResourceDetails

type ResourceDetails struct {
	ResourceKind string
	ResourceName string
	Resource     runtime.Object
}

type TimeSpan

type TimeSpan struct {
	Timespan     int
	TimespanType time.Duration
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL