config

package
v1.89.7 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 169

Documentation

Index

Constants

View Source
const (
	// External services auth
	SecretFileGrafanaPassword    = "grafana-password"
	SecretFileGrafanaToken       = "grafana-token"
	SecretFilePrometheusPassword = "prometheus-password"
	SecretFilePrometheusToken    = "prometheus-token"
	SecretFileTracingPassword    = "tracing-password"
	SecretFileTracingToken       = "tracing-token"

	// Login Token signing key used to prepare the token for user login
	SecretFileLoginTokenSigningKey = "login-token-signing-key"
)

Files found in /kiali-override-secrets that override the ConfigMap yaml values

View Source
const (
	AuthStrategyOpenshift = "openshift"
	AuthStrategyAnonymous = "anonymous"
	AuthStrategyToken     = "token"
	AuthStrategyOpenId    = "openid"
	AuthStrategyHeader    = "header"

	// These constants are used for external services auth (Prometheus, Grafana ...) ; not for Kiali auth
	AuthTypeBasic  = "basic"
	AuthTypeBearer = "bearer"
	AuthTypeNone   = "none"
)

The valid auth strategies and values for cookie handling

View Source
const (
	IstioMultiClusterHostSuffix = "global"
	OidcClientSecretFile        = "/kiali-secret/oidc-secret"
)
View Source
const (
	DashboardsDiscoveryEnabled = "true"
	DashboardsDiscoveryAuto    = "auto"
)
View Source
const (
	AmbientAnnotation        = "ambient.istio.io/redirection"
	AmbientAnnotationEnabled = "enabled"
	K8sGatewayLabelName      = "gateway.networking.k8s.io/gateway-name"
	WaypointLabel            = "gateway.istio.io/managed"
	WaypointLabelValue       = "istio.io-mesh-controller"
	WaypointUseLabel         = "istio.io/use-waypoint"
)
View Source
const (
	// DefaultClusterID is generally not for use outside of test-code. In general you should use config.Get().KubernetesConfig.ClusterName
	DefaultClusterID = "Kubernetes"
)

Variables

This section is empty.

Functions

func GetSafeClusterName added in v1.72.0

func GetSafeClusterName(cluster string) string

GetSafeClusterName checks the input value provides a default cluster name if it's empty

func IsFeatureDisabled added in v1.49.0

func IsFeatureDisabled(featureName FeatureName) bool

IsFeatureDisabled will return true if the named feature is to be disabled.

func IsIstioNamespace added in v1.4.0

func IsIstioNamespace(namespace string) bool

IsIstioNamespace returns true if the namespace is the default istio namespace

func IsRootNamespace added in v1.43.0

func IsRootNamespace(namespace string) bool

IsRootNamespace returns true if the namespace is the root namespace

func IsWaypoint added in v1.87.0

func IsWaypoint(labels map[string]string) bool

IsWaypoint returns true if the labels contain a waypoint proxy

func Marshal

func Marshal(conf *Config) (yamlString string, err error)

Marshal converts the Config object and returns its YAML string.

func SaveToFile

func SaveToFile(filename string, conf *Config) (err error)

SaveToFile converts the Config object and stores its YAML string into the given file, overwriting any data that is in the file.

func Set

func Set(conf *Config)

Set the global Config This function should not be called outside of main or tests. If possible keep config unmutated and use globals and/or appstate package for mutable states to avoid concurrent writes risk.

func Validate added in v1.79.0

func Validate(cfg Config) error

Validate will ensure the config is valid. This should be called after the config is initialized and before the config is used.

Types

type AdditionalDisplayItem added in v1.10.0

type AdditionalDisplayItem struct {
	Annotation     string `yaml:"annotation"`
	IconAnnotation string `yaml:"icon_annotation"`
	Title          string `yaml:"title"`
}

AdditionalDisplayItem holds some display-related configuration, like which annotations are to be displayed

type Aggregation added in v1.41.0

type Aggregation struct {
	Label           string `yaml:"label,omitempty" json:"label"`
	DisplayName     string `yaml:"display_name,omitempty" json:"displayName"`
	SingleSelection bool   `yaml:"single_selection,omitempty" json:"singleSelection"`
}

Aggregation represents label's allowed aggregations, transformed from aggregation in MonitoringDashboard config resource

type ApiConfig added in v0.9.1

type ApiConfig struct {
	Namespaces ApiNamespacesConfig
}

ApiConfig contains API specific configuration.

type ApiNamespacesConfig added in v0.9.1

type ApiNamespacesConfig struct {
	Exclude              []string `yaml:"exclude,omitempty" json:"exclude"`
	Include              []string `yaml:"include,omitempty" json:"include"`
	LabelSelectorExclude string   `yaml:"label_selector_exclude,omitempty" json:"labelSelectorExclude"`
	LabelSelectorInclude string   `yaml:"label_selector_include,omitempty" json:"labelSelectorInclude"`
}

ApiNamespacesConfig provides a list of regex strings defining namespaces to include or exclude.

type Auth added in v0.21.0

type Auth struct {
	CAFile             string `yaml:"ca_file"`
	InsecureSkipVerify bool   `yaml:"insecure_skip_verify"`
	Password           string `yaml:"password"`
	Token              string `yaml:"token"`
	Type               string `yaml:"type"`
	UseKialiToken      bool   `yaml:"use_kiali_token"`
	Username           string `yaml:"username"`
}

Auth provides authentication data for external services

func (*Auth) Obfuscate added in v1.13.0

func (a *Auth) Obfuscate()

type AuthConfig added in v0.16.0

type AuthConfig struct {
	OpenId    OpenIdConfig    `yaml:"openid,omitempty"`
	OpenShift OpenShiftConfig `yaml:"openshift,omitempty"`
	Strategy  string          `yaml:"strategy,omitempty"`
}

AuthConfig provides details on how users are to authenticate

type CertificatesInformationIndicators added in v1.40.0

type CertificatesInformationIndicators struct {
	Enabled bool     `yaml:"enabled,omitempty" json:"enabled"`
	Secrets []string `yaml:"secrets,omitempty" json:"secrets,omitempty"`
}

CertificatesInformationIndicators defines configuration to enable the feature and to grant read permissions to a list of secrets

type Cluster added in v1.79.0

type Cluster struct {
	// Name of the cluster. Must be unique and match what is in telemetry.
	Name string `yaml:"name,omitempty"`

	// SecretName is the name of the secret that contains the credentials necessary to connect to the remote cluster.
	// This secret must exist in the Kiali deployment namespace. If no secret name is provided, then it's
	// assumed that this cluster is inaccessible.
	SecretName string `yaml:"secret_name,omitempty"`
}

Cluster is used to manually specify a cluster that there is no remote secret for.

type Clustering added in v1.70.0

type Clustering struct {
	// Clusters is a list of clusters that cannot be autodetected by the Kiali Server.
	// Remote clusters are specified here if ‘autodetect_secrets.enabled’ is false or
	// if the Kiali Server does not have access to the remote cluster’s secret.
	Clusters  []Cluster  `yaml:"clusters" json:"clusters"`
	KialiURLs []KialiURL `yaml:"kiali_urls" json:"kiali_urls"`
}

Clustering defines configuration around multi-cluster functionality.

func (Clustering) IsZero added in v1.80.0

func (c Clustering) IsZero() bool

IsZero implements: https://pkg.go.dev/gopkg.in/yaml.v2#IsZeroer so that tests can patch the Clustering struct and have it be recognized as non-zero while keeping the omitempty yaml tag.

type ComponentStatus added in v1.22.1

type ComponentStatus struct {
	AppLabel       string `yaml:"app_label,omitempty"`
	IsCore         bool   `yaml:"is_core,omitempty"`
	IsProxy        bool   `yaml:"is_proxy,omitempty"`
	IsMultiCluster bool   `yaml:"is_multicluster,omitempty"`
	Namespace      string `yaml:"namespace,omitempty"`
}

type ComponentStatuses added in v1.22.1

type ComponentStatuses struct {
	Enabled    bool              `yaml:"enabled,omitempty"`
	Components []ComponentStatus `yaml:"components,omitempty"`
}

type Config

type Config struct {
	AdditionalDisplayDetails []AdditionalDisplayItem             `yaml:"additional_display_details,omitempty"`
	API                      ApiConfig                           `yaml:"api,omitempty"`
	Auth                     AuthConfig                          `yaml:"auth,omitempty"`
	Clustering               Clustering                          `yaml:"clustering,omitempty"`
	CustomDashboards         dashboards.MonitoringDashboardsList `yaml:"custom_dashboards,omitempty"`
	Deployment               DeploymentConfig                    `yaml:"deployment,omitempty"`
	ExternalServices         ExternalServices                    `yaml:"external_services,omitempty"`
	HealthConfig             HealthConfig                        `yaml:"health_config,omitempty" json:"healthConfig,omitempty"`
	Identity                 security.Identity                   `yaml:",omitempty"`
	InCluster                bool                                `yaml:"in_cluster,omitempty"`
	InstallationTag          string                              `yaml:"installation_tag,omitempty"`
	IstioLabels              IstioLabels                         `yaml:"istio_labels,omitempty"`
	IstioNamespace           string                              `yaml:"istio_namespace,omitempty"` // default component namespace
	KialiFeatureFlags        KialiFeatureFlags                   `yaml:"kiali_feature_flags,omitempty"`
	KubernetesConfig         KubernetesConfig                    `yaml:"kubernetes_config,omitempty"`
	LoginToken               LoginToken                          `yaml:"login_token,omitempty"`
	Server                   Server                              `yaml:",omitempty"`
}

Config defines full YAML configuration.

func Get

func Get() (conf *Config)

Get the global Config

func LoadFromFile

func LoadFromFile(filename string) (conf *Config, err error)

LoadFromFile reads the YAML from the given file, parses the content, and returns its Config object representation.

func NewConfig

func NewConfig() (c *Config)

NewConfig creates a default Config struct

func Unmarshal

func Unmarshal(yamlString string) (conf *Config, err error)

Unmarshal parses the given YAML string and returns its Config object representation.

func (*Config) AddHealthDefault added in v1.24.0

func (conf *Config) AddHealthDefault()

AddHealthDefault Configuration

func (*Config) AllNamespacesAccessible added in v1.57.0

func (conf *Config) AllNamespacesAccessible() bool

AllNamespacesAccessible determines if kiali has access to all namespaces. When using the operator, the operator will grant the kiali service account cluster role permissions when '**' is provided in the accessible_namespaces or if cluster-wide-access was explicitly requested.

func (*Config) GatewayLabel added in v1.88.0

func (conf *Config) GatewayLabel(labelConfig string) []string

func (*Config) IsRBACDisabled added in v1.89.0

func (conf *Config) IsRBACDisabled() bool

func (*Config) IsServerHTTPS added in v1.78.0

func (conf *Config) IsServerHTTPS() bool

IsServerHTTPS returns true if the server endpoint should use HTTPS. If false, only plaintext HTTP is supported.

func (Config) Obfuscate added in v1.84.0

func (conf Config) Obfuscate() (obf Config)

func (Config) String

func (conf Config) String() (str string)

String marshals the given Config into a YAML string WARNING: do NOT use the result of this function to retrieve any configuration: some fields are obfuscated for security reasons.

type CustomDashboardsConfig added in v1.22.1

type CustomDashboardsConfig struct {
	DiscoveryEnabled       string           `yaml:"discovery_enabled,omitempty"`
	DiscoveryAutoThreshold int              `yaml:"discovery_auto_threshold,omitempty"`
	Enabled                bool             `yaml:"enabled,omitempty"`
	IsCore                 bool             `yaml:"is_core,omitempty"`
	NamespaceLabel         string           `yaml:"namespace_label,omitempty"`
	Prometheus             PrometheusConfig `yaml:"prometheus,omitempty"`
}

CustomDashboardsConfig describes configuration specific to Custom Dashboards

type DeploymentConfig added in v0.21.0

type DeploymentConfig struct {
	AccessibleNamespaces []string `yaml:"accessible_namespaces"`
	ClusterWideAccess    bool     `yaml:"cluster_wide_access,omitempty"`
	InstanceName         string   `yaml:"instance_name"`
	Namespace            string   `yaml:"namespace,omitempty"` // Kiali deployment namespace
	ViewOnlyMode         bool     `yaml:"view_only_mode,omitempty"`
	// RemoteSecretPath is used to identify the remote cluster Kiali will connect to as its "local cluster".
	// This is to support installing Kiali in the control plane, but observing only the data plane in the remote cluster.
	// Experimental feature. See: https://github.com/kiali/kiali/issues/3002
	RemoteSecretPath string `yaml:"remote_secret_path,omitempty"`
}

DeploymentConfig provides details on how Kiali was deployed.

type ExternalServices

type ExternalServices struct {
	Grafana          GrafanaConfig          `yaml:"grafana,omitempty"`
	Istio            IstioConfig            `yaml:"istio,omitempty"`
	Prometheus       PrometheusConfig       `yaml:"prometheus,omitempty"`
	CustomDashboards CustomDashboardsConfig `yaml:"custom_dashboards,omitempty"`
	Tracing          TracingConfig          `yaml:"tracing,omitempty"`
}

ExternalServices holds configurations for other systems that Kiali depends on

type FeatureFlagClustering added in v1.79.0

type FeatureFlagClustering struct {
	EnableExecProvider bool `yaml:"enable_exec_provider,omitempty" json:"enable_exec_provider"`
}

type FeatureName added in v1.49.0

type FeatureName string

FeatureName is the enum type used for named features that can be disabled via KialiFeatureFlags.DisabledFeatures

const (
	FeatureLogView FeatureName = "logs-tab"
)

func (FeatureName) IsValid added in v1.49.0

func (fn FeatureName) IsValid() error

type GatewayAPIClass added in v1.74.0

type GatewayAPIClass struct {
	Name      string `yaml:"name,omitempty" json:"name,omitempty"`
	ClassName string `yaml:"class_name,omitempty" json:"className,omitempty"`
}

type GrafanaConfig

type GrafanaConfig struct {
	Auth           Auth                     `yaml:"auth"`
	Dashboards     []GrafanaDashboardConfig `yaml:"dashboards"`
	Enabled        bool                     `yaml:"enabled"` // Enable or disable Grafana support in Kiali
	HealthCheckUrl string                   `yaml:"health_check_url,omitempty"`
	InClusterURL   string                   `yaml:"in_cluster_url"`
	IsCore         bool                     `yaml:"is_core,omitempty"`
	URL            string                   `yaml:"url"`
}

GrafanaConfig describes configuration used for Grafana links

type GrafanaDashboardConfig added in v1.5.0

type GrafanaDashboardConfig struct {
	Name      string                 `yaml:"name"`
	Variables GrafanaVariablesConfig `yaml:"variables"`
}

type GrafanaVariablesConfig added in v1.5.0

type GrafanaVariablesConfig struct {
	App       string `yaml:"app" json:"app,omitempty"`
	Namespace string `yaml:"namespace" json:"namespace,omitempty"`
	Service   string `yaml:"service" json:"service,omitempty"`
	Version   string `yaml:"version" json:"version,omitempty"`
	Workload  string `yaml:"workload" json:"workload,omitempty"`
}

type GraphFindOption added in v1.35.0

type GraphFindOption struct {
	AutoSelect  bool   `yaml:"auto_select,omitempty" json:"autoSelect,omitempty"`
	Description string `yaml:"description,omitempty" json:"description,omitempty"`
	Expression  string `yaml:"expression,omitempty" json:"expression,omitempty"`
}

GraphFindOption defines a single Graph Find/Hide Option

type GraphSettings added in v1.45.0

type GraphSettings struct {
	FontLabel    float32 `yaml:"font_label,omitempty" json:"fontLabel,omitempty"`
	MinFontBadge float32 `yaml:"min_font_badge,omitempty" json:"minFontBadge,omitempty"`
	MinFontLabel float32 `yaml:"min_font_label,omitempty" json:"minFontLabel,omitempty"`
}

GraphSettings affect the graph visualization. FontLabel: font used for node text (edge label font is determined from this value) MinFontBadge: smallest effective font (zoomed font) before removing node badges MinFontLabel: smallest effective node text font (zoomed font) before removing labels

type GraphTraffic added in v1.38.1

type GraphTraffic struct {
	Grpc string `yaml:"grpc,omitempty" json:"grpc,omitempty"`
	Http string `yaml:"http,omitempty" json:"http,omitempty"`
	Tcp  string `yaml:"tcp,omitempty" json:"tcp,omitempty"`
}

GraphTraffic defines the protocol-specific rates used to determine traffic for graph generation. grpc options : none | sent (messages) | received (messages) | requests (default) | total (messages) http options : none | requests (default) tcp options : none | sent (bytes, default) | received (bytes) | total (bytes)

type GraphUIDefaults added in v1.35.0

type GraphUIDefaults struct {
	FindOptions []GraphFindOption `yaml:"find_options,omitempty" json:"findOptions,omitempty"`
	HideOptions []GraphFindOption `yaml:"hide_options,omitempty" json:"hideOptions,omitempty"`
	Impl        string            `yaml:"impl,omitempty" json:"impl,omitempty"`
	Settings    GraphSettings     `yaml:"settings,omitempty" json:"settings,omitempty"`
	Traffic     GraphTraffic      `yaml:"traffic,omitempty" json:"traffic,omitempty"`
}

GraphUIDefaults defines UI Defaults specific to the UI Graph

type HealthConfig added in v1.24.0

type HealthConfig struct {
	Rate []Rate `yaml:"rate,omitempty" json:"rate,omitempty"`
}

HealthConfig rates

type I18nUIDefaults added in v1.82.0

type I18nUIDefaults struct {
	Language     string `yaml:"language,omitempty" json:"language,omitempty"`
	ShowSelector bool   `yaml:"show_selector,omitempty" json:"showSelector"`
}

I18nUIDefaults defines UI Defaults specific to the I18n settings

type IstioCanaryRevision added in v1.37.0

type IstioCanaryRevision struct {
	Current string `yaml:"current,omitempty"`
	Upgrade string `yaml:"upgrade,omitempty"`
}

type IstioConfig

type IstioConfig struct {
	ComponentStatuses                 ComponentStatuses   `yaml:"component_status,omitempty"`
	ConfigMapName                     string              `yaml:"config_map_name,omitempty"`
	EgressGatewayNamespace            string              `yaml:"egress_gateway_namespace,omitempty"`
	EnvoyAdminLocalPort               int                 `yaml:"envoy_admin_local_port,omitempty"`
	GatewayAPIClasses                 []GatewayAPIClass   `yaml:"gateway_api_classes,omitempty"`
	IngressGatewayNamespace           string              `yaml:"ingress_gateway_namespace,omitempty"`
	IstioAPIEnabled                   bool                `yaml:"istio_api_enabled"`
	IstioCanaryRevision               IstioCanaryRevision `yaml:"istio_canary_revision,omitempty"`
	IstioIdentityDomain               string              `yaml:"istio_identity_domain,omitempty"`
	IstioInjectionAnnotation          string              `yaml:"istio_injection_annotation,omitempty"`
	IstioSidecarInjectorConfigMapName string              `yaml:"istio_sidecar_injector_config_map_name,omitempty"`
	IstioSidecarAnnotation            string              `yaml:"istio_sidecar_annotation,omitempty"`
	IstiodDeploymentName              string              `yaml:"istiod_deployment_name,omitempty"`
	IstiodPodMonitoringPort           int                 `yaml:"istiod_pod_monitoring_port,omitempty"`
	// IstiodPollingIntervalSeconds is how often in seconds Kiali will poll istiod(s) for
	// proxy status and registry services. Polling is not performed if IstioAPIEnabled is false.
	IstiodPollingIntervalSeconds int             `yaml:"istiod_polling_interval_seconds,omitempty"`
	Registry                     *RegistryConfig `yaml:"registry,omitempty"`
	RootNamespace                string          `yaml:"root_namespace,omitempty"`
	UrlServiceVersion            string          `yaml:"url_service_version"`
}

IstioConfig describes configuration used for istio links

type IstioLabels added in v0.7.0

type IstioLabels struct {
	AmbientNamespaceLabel      string `yaml:"ambient_namespace_label,omitempty" json:"ambientNamespaceLabel"`
	AmbientNamespaceLabelValue string `yaml:"ambient_namespace_label_value,omitempty" json:"ambientNamespaceLabelValue"`
	AmbientWaypointLabel       string `yaml:"ambient_waypoint_label,omitempty" json:"ambientWaypointLabel"`
	AmbientWaypointLabelValue  string `yaml:"ambient_waypoint_label_value,omitempty" json:"ambientWaypointLabelValue"`
	AmbientWaypointUseLabel    string `yaml:"ambient_waypoint_use_label,omitempty" json:"ambientWaypointUseLabel"`
	AppLabelName               string `yaml:"app_label_name,omitempty" json:"appLabelName"`
	EgressGatewayLabel         string `yaml:"egress_gateway_label,omitempty" json:"egressGatewayLabel"`
	IngressGatewayLabel        string `yaml:"ingress_gateway_label,omitempty" json:"ingressGatewayLabel"`
	InjectionLabelName         string `yaml:"injection_label_name,omitempty" json:"injectionLabelName"`
	InjectionLabelRev          string `yaml:"injection_label_rev,omitempty" json:"injectionLabelRev"`
	K8sGatewayLabelName        string `yaml:"k8s_gateway_label_name,omitempty" json:"k8sGatewayLabelName"`
	VersionLabelName           string `yaml:"version_label_name,omitempty" json:"versionLabelName"`
}

IstioLabels holds configuration about the labels required by Istio

type KialiFeatureFlags added in v1.22.1

type KialiFeatureFlags struct {
	CertificatesInformationIndicators CertificatesInformationIndicators `yaml:"certificates_information_indicators,omitempty" json:"certificatesInformationIndicators"`
	Clustering                        FeatureFlagClustering             `yaml:"clustering,omitempty" json:"clustering,omitempty"`
	DisabledFeatures                  []string                          `yaml:"disabled_features,omitempty" json:"disabledFeatures,omitempty"`
	IstioAnnotationAction             bool                              `yaml:"istio_annotation_action,omitempty" json:"istioAnnotationAction"`
	IstioInjectionAction              bool                              `yaml:"istio_injection_action,omitempty" json:"istioInjectionAction"`
	IstioUpgradeAction                bool                              `yaml:"istio_upgrade_action,omitempty" json:"istioUpgradeAction"`
	UIDefaults                        UIDefaults                        `yaml:"ui_defaults,omitempty" json:"uiDefaults,omitempty"`
	Validations                       Validations                       `yaml:"validations,omitempty" json:"validations,omitempty"`
}

KialiFeatureFlags available from the CR

type KialiURL added in v1.73.0

type KialiURL struct {
	ClusterName  string `yaml:"cluster_name,omitempty"`
	InstanceName string `yaml:"instance_name,omitempty"`
	Namespace    string `yaml:"namespace,omitempty"`
	URL          string `yaml:"url,omitempty"`
}

KialiURL defines a cluster name, namespace and instance name properties to URL.

type KubernetesConfig added in v0.9.0

type KubernetesConfig struct {
	Burst int `yaml:"burst,omitempty"`
	// Cache duration expressed in seconds
	// Cache uses watchers to sync with the backend, after a CacheDuration watchers are closed and re-opened
	CacheDuration int `yaml:"cache_duration,omitempty"`
	// Cache duration expressed in seconds
	// Kiali cache list of namespaces per user, this is typically short lived cache compared with the duration of the
	// namespace cache defined by previous CacheDuration parameter
	CacheTokenNamespaceDuration int `yaml:"cache_token_namespace_duration,omitempty"`
	// ClusterName is the name of the kubernetes cluster that Kiali is running in.
	// If empty, then it will default to 'Kubernetes'.
	ClusterName string `yaml:"cluster_name,omitempty"`
	// List of controllers that won't be used for Workload calculation
	// Kiali queries Deployment,ReplicaSet,ReplicationController,DeploymentConfig,StatefulSet,Job and CronJob controllers
	// Deployment and ReplicaSet will be always queried, but ReplicationController,DeploymentConfig,StatefulSet,Job and CronJobs
	// can be skipped from Kiali workloads query if they are present in this list
	ExcludeWorkloads []string `yaml:"excluded_workloads,omitempty"`
	QPS              float32  `yaml:"qps,omitempty"`
}

KubernetesConfig holds the k8s client, caching and performance configuration

type ListUIDefaults added in v1.67.0

type ListUIDefaults struct {
	IncludeHealth         bool `yaml:"include_health,omitempty" json:"includeHealth"`
	IncludeIstioResources bool `yaml:"include_istio_resources,omitempty" json:"includeIstioResources"`
	IncludeValidations    bool `yaml:"include_validations,omitempty" json:"includeValidations"`
	ShowIncludeToggles    bool `yaml:"show_include_toggles,omitempty" json:"showIncludeToggles"`
}

ListUIDefaults defines UI Defaults specific to the UI List pages

type LoginToken added in v0.6.0

type LoginToken struct {
	ExpirationSeconds int64  `yaml:"expiration_seconds,omitempty"`
	SigningKey        string `yaml:"signing_key,omitempty"`
}

LoginToken holds config used for generating the Kiali session tokens.

func (*LoginToken) Obfuscate added in v1.13.0

func (lt *LoginToken) Obfuscate()

type MeshUIDefaults added in v1.81.0

type MeshUIDefaults struct {
	FindOptions []GraphFindOption `yaml:"find_options,omitempty" json:"findOptions,omitempty"`
	HideOptions []GraphFindOption `yaml:"hide_options,omitempty" json:"hideOptions,omitempty"`
}

MeshUIDefaults defines UI Defaults specific to the UI Mesh page

type Metrics added in v1.46.0

type Metrics struct {
	Enabled bool `yaml:"enabled,omitempty"`
	Port    int  `yaml:"port,omitempty"`
}

Metrics provides metrics configuration for the Kiali server.

type MetricsDefaults added in v1.41.0

type MetricsDefaults struct {
	Aggregations []Aggregation `yaml:"aggregations,omitempty" json:"aggregations,omitempty"`
}

type Observability added in v1.46.0

type Observability struct {
	Metrics Metrics `yaml:"metrics,omitempty"`
	Tracing Tracing `yaml:"tracing,omitempty"`
}

Observability provides configuration for tracing and metrics exported by the Kiali server.

type OpenIdConfig added in v1.19.0

type OpenIdConfig struct {
	AdditionalRequestParams map[string]string `yaml:"additional_request_params,omitempty"`
	AllowedDomains          []string          `yaml:"allowed_domains,omitempty"`
	ApiProxy                string            `yaml:"api_proxy,omitempty"`
	ApiProxyCAData          string            `yaml:"api_proxy_ca_data,omitempty"`
	ApiToken                string            `yaml:"api_token,omitempty"`
	AuthenticationTimeout   int               `yaml:"authentication_timeout,omitempty"`
	AuthorizationEndpoint   string            `yaml:"authorization_endpoint,omitempty"`
	ClientId                string            `yaml:"client_id,omitempty"`
	ClientSecret            string            `yaml:"client_secret,omitempty"`
	DisableRBAC             bool              `yaml:"disable_rbac,omitempty"`
	HTTPProxy               string            `yaml:"http_proxy,omitempty"`
	HTTPSProxy              string            `yaml:"https_proxy,omitempty"`
	InsecureSkipVerifyTLS   bool              `yaml:"insecure_skip_verify_tls,omitempty"`
	IssuerUri               string            `yaml:"issuer_uri,omitempty"`
	Scopes                  []string          `yaml:"scopes,omitempty"`
	UsernameClaim           string            `yaml:"username_claim,omitempty"`
}

OpenIdConfig contains specific configuration for authentication using an OpenID provider

type OpenShiftConfig added in v1.22.1

type OpenShiftConfig struct {
	CAFile string `yaml:"ca_file,omitempty"`
}

OpenShiftConfig contains specific configuration for authentication when on OpenShift

type OtelCollector added in v1.73.0

type OtelCollector struct {
	CAName     string `yaml:"ca_name,omitempty"`
	Protocol   string `yaml:"protocol,omitempty"` // http or https or grpc
	SkipVerify bool   `yaml:"skip_verify,omitempty"`
	TLSEnabled bool   `yaml:"tls_enabled,omitempty"`
}

OpenTelemetry collector configuration for tracing

type Profiler added in v1.80.0

type Profiler struct {
	Enabled bool `yaml:"enabled,omitempty"`
}

Profiler provides settings about the profiler that can be used to debug the Kiali server internals.

type PrometheusConfig added in v0.18.0

type PrometheusConfig struct {
	Auth            Auth              `yaml:"auth,omitempty"`
	CacheDuration   int               `yaml:"cache_duration,omitempty"`   // Cache duration per query expressed in seconds
	CacheEnabled    bool              `yaml:"cache_enabled,omitempty"`    // Enable cache for Prometheus queries
	CacheExpiration int               `yaml:"cache_expiration,omitempty"` // Global cache expiration expressed in seconds
	CustomHeaders   map[string]string `yaml:"custom_headers,omitempty"`
	HealthCheckUrl  string            `yaml:"health_check_url,omitempty"`
	IsCore          bool              `yaml:"is_core,omitempty"`
	QueryScope      map[string]string `yaml:"query_scope,omitempty"`
	ThanosProxy     ThanosProxy       `yaml:"thanos_proxy,omitempty"`
	URL             string            `yaml:"url,omitempty"`
}

PrometheusConfig describes configuration of the Prometheus component

type Rate added in v1.24.0

type Rate struct {
	Namespace string      `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	Kind      string      `yaml:"kind,omitempty" json:"kind,omitempty"`
	Name      string      `yaml:"name,omitempty" json:"name,omitempty"`
	Tolerance []Tolerance `yaml:"tolerance,omitempty" json:"tolerance"`
}

Rate config

type RegistryConfig added in v1.59.0

type RegistryConfig struct {
	IstiodURL string `yaml:"istiod_url"`
}

RegistryConfig contains configuration for connecting to an external istiod. This is used when Kiali should connect to the istiod via a url instead of port forwarding.

type Server

type Server struct {
	Address                    string        `yaml:",omitempty"`
	AuditLog                   bool          `yaml:"audit_log,omitempty"` // When true, allows additional audit logging on Write operations
	CORSAllowAll               bool          `yaml:"cors_allow_all,omitempty"`
	GzipEnabled                bool          `yaml:"gzip_enabled,omitempty"`
	Observability              Observability `yaml:"observability,omitempty"`
	Port                       int           `yaml:",omitempty"`
	Profiler                   Profiler      `yaml:"profiler,omitempty"`
	StaticContentRootDirectory string        `yaml:"static_content_root_directory,omitempty"`
	WebFQDN                    string        `yaml:"web_fqdn,omitempty"`
	WebPort                    string        `yaml:"web_port,omitempty"`
	WebRoot                    string        `yaml:"web_root,omitempty"`
	WebHistoryMode             string        `yaml:"web_history_mode,omitempty"`
	WebSchema                  string        `yaml:"web_schema,omitempty"`
	WriteTimeout               time.Duration `yaml:"write_timeout,omitempty"`
}

Server configuration

type TempoConfig added in v1.82.0

type TempoConfig struct {
	OrgID         string `yaml:"org_id" json:"org_id,omitempty"`
	DatasourceUID string `yaml:"datasource_uid" json:"datasource_uid,omitempty"`
}

type ThanosProxy added in v1.42.0

type ThanosProxy struct {
	Enabled         bool   `yaml:"enabled,omitempty"`
	RetentionPeriod string `yaml:"retention_period,omitempty"`
	ScrapeInterval  string `yaml:"scrape_interval,omitempty"`
}

ThanosProxy describes configuration of the Thanos proxy component

type Tolerance added in v1.24.0

type Tolerance struct {
	Code      string  `yaml:"code,omitempty" json:"code"`
	Degraded  float32 `yaml:"degraded,omitempty" json:"degraded"`
	Failure   float32 `yaml:"failure,omitempty" json:"failure"`
	Protocol  string  `yaml:"protocol,omitempty" json:"protocol"`
	Direction string  `yaml:"direction,omitempty" json:"direction"`
}

Tolerance config

type Tracing added in v1.46.0

type Tracing struct {
	CollectorType TracingCollectorType `yaml:"collector_type,omitempty"` // Possible value "otel"
	CollectorURL  string               `yaml:"collector_url,omitempty"`  // Endpoint for Kiali server traces
	Enabled       bool                 `yaml:"enabled,omitempty"`
	Otel          OtelCollector        `yaml:"otel,omitempty"`
	// Sampling rate for Kiali server traces. >= 1.0 always samples and <= 0 never samples.
	SamplingRate float64 `yaml:"sampling_rate,omitempty"`
}

Tracing provides tracing configuration for the Kiali server.

type TracingCollectorType added in v1.79.0

type TracingCollectorType string

TracingCollectorType is the type of collector that Kiali will export traces to. These are traces that kiali generates for itself.

const (
	OTELCollectorType TracingCollectorType = "otel"
)

type TracingConfig added in v0.20.0

type TracingConfig struct {
	Auth                 Auth              `yaml:"auth"`
	CustomHeaders        map[string]string `yaml:"custom_headers,omitempty"`
	Enabled              bool              `yaml:"enabled"` // Enable Tracing in Kiali
	HealthCheckUrl       string            `yaml:"health_check_url,omitempty"`
	GrpcPort             int               `yaml:"grpc_port,omitempty"`
	InClusterURL         string            `yaml:"in_cluster_url"`
	IsCore               bool              `yaml:"is_core,omitempty"`
	Provider             TracingProvider   `yaml:"provider,omitempty"` // jaeger | tempo
	TempoConfig          TempoConfig       `yaml:"tempo_config,omitempty"`
	NamespaceSelector    bool              `yaml:"namespace_selector"`
	QueryScope           map[string]string `yaml:"query_scope,omitempty"`
	QueryTimeout         int               `yaml:"query_timeout,omitempty"`
	URL                  string            `yaml:"url"`
	UseGRPC              bool              `yaml:"use_grpc"`
	WhiteListIstioSystem []string          `yaml:"whitelist_istio_system"`
}

TracingConfig describes configuration used for tracing links

type TracingProvider added in v1.79.0

type TracingProvider string

TracingProvider is the type of tracing provider that Kiali will connect to.

const (
	JaegerProvider TracingProvider = "jaeger"
	TempoProvider  TracingProvider = "tempo"
)

type UIDefaults added in v1.30.0

type UIDefaults struct {
	Graph             GraphUIDefaults `yaml:"graph,omitempty" json:"graph,omitempty"`
	I18n              I18nUIDefaults  `yaml:"i18n,omitempty" json:"i18n,omitempty"`
	List              ListUIDefaults  `yaml:"list,omitempty" json:"list,omitempty"`
	Mesh              MeshUIDefaults  `yaml:"mesh,omitempty" json:"mesh,omitempty"`
	MetricsPerRefresh string          `yaml:"metrics_per_refresh,omitempty" json:"metricsPerRefresh,omitempty"`
	MetricsInbound    MetricsDefaults `yaml:"metrics_inbound,omitempty" json:"metricsInbound,omitempty"`
	MetricsOutbound   MetricsDefaults `yaml:"metrics_outbound,omitempty" json:"metricsOutbound,omitempty"`
	Namespaces        []string        `yaml:"namespaces,omitempty" json:"namespaces,omitempty"`
	RefreshInterval   string          `yaml:"refresh_interval,omitempty" json:"refreshInterval,omitempty"`
}

UIDefaults defines default settings configured for the UI

type Validations added in v1.38.1

type Validations struct {
	Ignore                   []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
	SkipWildcardGatewayHosts bool     `yaml:"skip_wildcard_gateway_hosts,omitempty"`
}

Validations defines default settings configured for the Validations subsystem

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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