Documentation
¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Index ¶
Constants ¶
View Source
const MinTelemetryInterval time.Duration = 2 * time.Minute
Variables ¶
View Source
var ( ErrorTelemetryIntervalTooSmall = fmt.Errorf("telemetryInterval smaller than %v is not allowed", MinTelemetryInterval) DefaultTelemetryInterval = 15 * time.Minute DefaultSamplingRate uint32 = 1 )
View Source
var ( DefaultRetinaHubbleConfig = RetinaHubbleConfig{ MetricsBindAddress: ":18000", HealthProbeBindAddress: ":18001", LeaderElection: false, ClusterName: "default", } DefaultRetinaConfig = &Config{ EnableTelemetry: false, EnabledPlugin: []string{"packetforward", "dropreason", "linuxutil", "dns"}, EnablePodLevel: true, LogLevel: "info", BypassLookupIPOfInterest: true, DataAggregationLevel: High, } Cell = cell.Module( "agent-config", "Agent Config", cell.Provide(func() *option.DaemonConfig { return option.Config }), cell.Config(DefaultRetinaHubbleConfig), cell.Provide(func(logger logrus.FieldLogger) (Config, error) { retinaConfigFile := filepath.Join(option.Config.ConfigDir, configFileName) conf, err := GetConfig(retinaConfigFile) if err != nil { logger.Error(err) conf = DefaultRetinaConfig } logger.Info(conf) return *conf, nil }), sharedconfig.Cell, ) )
Functions ¶
This section is empty.
Types ¶
type CaptureConfig ¶
type CaptureConfig struct {
// Configurations to determine the capture workload image.
//
// Debug indicates whether to enable debug mode.
// If true, the operator will pick the image from the test container registry for the capture workload.
// Check pkg/capture/utils/capture_image.go for the detailed explanation of how debug capture image version is picked.
// NOTE: CaptureImageVersion and CaptureImageVersionSource are used internally and not visible to the user.
CaptureDebug bool `yaml:"captureDebug"`
// ImageVersion defines the image version of the capture workload.
CaptureImageVersion string `yaml:"-"`
// VersionSource defines the source of the image version.
CaptureImageVersionSource captureUtils.VersionSource `yaml:"-"`
// JobNumLimit indicates the maximum number of jobs that can be created for each Capture.
CaptureJobNumLimit int `yaml:"captureJobNumLimit"`
// EnableManagedStorageAccount indicates whether a managed storage account will be created to store the captured network artifacts.
EnableManagedStorageAccount bool `yaml:"enableManagedStorageAccount"`
// AzureCredentialConfig indicates the path of Azure credential configuration file.
AzureCredentialConfig string `yaml:"azureCredentialConfig"`
}
CaptureConfig defines the configuration for capture controller in the operator.
type Config ¶
type Config struct {
APIServer Server `yaml:"apiServer"`
LogLevel string `yaml:"logLevel"`
EnabledPlugin []string `yaml:"enabledPlugin"`
MetricsInterval time.Duration `yaml:"metricsInterval"`
// Deprecated: Use only MetricsInterval instead in the go code.
MetricsIntervalDuration time.Duration `yaml:"metricsIntervalDuration"`
EnableTelemetry bool `yaml:"enableTelemetry"`
EnableRetinaEndpoint bool `yaml:"enableRetinaEndpoint"`
EnablePodLevel bool `yaml:"enablePodLevel"`
EnableConntrackMetrics bool `yaml:"enableConntrackMetrics"`
RemoteContext bool `yaml:"remoteContext"`
EnableAnnotations bool `yaml:"enableAnnotations"`
BypassLookupIPOfInterest bool `yaml:"bypassLookupIPOfInterest"`
DataAggregationLevel Level `yaml:"dataAggregationLevel"`
MonitorSockPath string `yaml:"monitorSockPath"`
TelemetryInterval time.Duration `yaml:"telemetryInterval"`
DataSamplingRate uint32 `yaml:"dataSamplingRate"`
}
type Level ¶ added in v0.0.14
type Level int
Level defines the level of monitor aggregation.
func (*Level) UnmarshalText ¶ added in v0.0.14
type RetinaHubbleConfig ¶ added in v0.0.13
type RetinaHubbleConfig struct {
// NOTE: metrics-bind-address and health-probe-bind-address should be used ONLY as container args (NOT in ConfigMap) to keep parity with non-enterprise Retina
MetricsBindAddress string
HealthProbeBindAddress string
LeaderElection bool
ClusterName string // the name of the cluster (primarily used for TLS)
}
RetinaHubbleConfig is a collection of configuration information needed by Retina-services for proper functioning.
func (RetinaHubbleConfig) Flags ¶ added in v0.0.13
func (c RetinaHubbleConfig) Flags(flags *pflag.FlagSet)
Flags is responsible for binding flags provided by the user to the various fields of the Config.
Click to show internal directories.
Click to hide internal directories.