status

package
v1.65.7 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 16 Imported by: 35

Documentation

Overview

status is a simple package for offering up various status information from Kiali.

Index

Constants

View Source
const (
	ContainerVersion = name + " container version"
	CoreVersion      = name + " version"
	MeshName         = "Mesh name"
	MeshVersion      = "Mesh version"
	CoreCommitHash   = name + " commit hash"
	State            = name + " state"
	ClusterMTLS      = "Istio mTLS"
	StateRunning     = "running"
	DisabledFeatures = "Disabled features"
	MTLSVersion      = "mTLS Version"
)

Variables

This section is empty.

Functions

func AddWarningMessages added in v1.47.0

func AddWarningMessages(warningMessages string)

AddWarningMessages add warning messages to status CAUTION: Currently, the UI assumes that the only messages passed to this function are the result of Istio version checks (see the istioVersion func of versions.go file) and the UI will show any logged warnings in the About dialog. Furthermore, the UI assumes the array will contain a single message. If in the future other kind of warnings need to be logged, please adjust UI code as needed.

func DiscoverGrafana added in v0.20.0

func DiscoverGrafana() string

DiscoverGrafana will return the Grafana URL if it has been configured, or will try to retrieve it if an OpenShift Route is defined.

func GetStatus added in v1.47.0

func GetStatus(name string) (previous string, hasPrevious bool)

GetStatus get status with name, it is read safe.

func GetStatuses added in v1.48.1

func GetStatuses() map[string]string

GetStatus returns current status

func IsMaistra added in v1.40.0

func IsMaistra() bool

IsMaistra returns true if we are running in a Maistra environment

func Put

func Put(name, value string) (previous string, hasPrevious bool)

Put adds or replaces status info for the provided name. Any previous setting is returned.

Types

type ExternalServiceInfo

type ExternalServiceInfo struct {
	// The name of the service
	//
	// required: true
	// example: Istio
	Name string `json:"name"`

	// The installed version of the service
	//
	// required: false
	// example: 0.8.0
	Version string `json:"version,omitempty"`

	// The service url
	//
	// required: false
	// example: jaeger-query-istio-system.127.0.0.1.nip.io
	Url string `json:"url,omitempty"`
}

Status response model This is used for returning a response of Kiali Status swagger:model externalServiceInfo

type IstioEnvironment added in v1.40.0

type IstioEnvironment struct {
	// If true, the Istio implementation is a variant of Maistra.
	//
	// required: true
	IsMaistra bool `json:"isMaistra"`
	// Is api enabled
	IstioAPIEnabled bool `json:"istioAPIEnabled"`
}

IstioEnvironment describes the Istio implementation environment

type StatusInfo

type StatusInfo struct {
	// The state of Kiali
	// A hash of key,values with versions of Kiali and state
	//
	// required: true
	Status map[string]string `json:"status"`
	// An array of external services installed
	//
	// required: true
	// swagger:allOf
	ExternalServices []ExternalServiceInfo `json:"externalServices"`
	// An array of warningMessages. CAUTION: Please read the doc comments the in AddWarningMessages func.
	// items.example: Istio version 0.7.1 is not supported, the version should be 0.8.0
	// swagger:allOf
	WarningMessages []string `json:"warningMessages"`
	// Information about the Istio implementation environment
	//
	// required: true
	IstioEnvironment *IstioEnvironment `json:"istioEnvironment"`
}

StatusInfo statusInfo This is used for returning a response of Kiali Status swagger:model StatusInfo

func Get

func Get() (status StatusInfo)

Get returns a copy of the current status info.

Jump to

Keyboard shortcuts

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