Documentation
¶
Index ¶
- type Alerting
- type AlertingSerialized
- type ClusterTransfer
- type ClusterTransferSerialized
- type Controller
- type Converter
- type DataReporting
- type DataReportingSerialized
- type HTTPConfig
- type InsightsConfiguration
- type InsightsConfigurationSerialized
- type MockAPIConfigurator
- type MockConfigMapConfigurator
- type MockSecretConfigurator
- type OCMConfig
- type Obfuscation
- type ObfuscationValue
- type Proxy
- type ProxySeriazlied
- type SCA
- type SCASerialized
- type Serialized
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alerting ¶
type Alerting struct {
Disabled bool
}
Alerting is a helper type for configuring Insights alerting options
type AlertingSerialized ¶
type AlertingSerialized struct {
Disabled string `json:"disabled,omitempty"`
}
type ClusterTransfer ¶
ClusterTransfer is a helper type for configuring Insights cluster transfer (ownership) feature
func (*ClusterTransfer) String ¶
func (c *ClusterTransfer) String() string
type Controller ¶
type Controller struct {
Report bool
StoragePath string
Interval time.Duration
Endpoint string
ConditionalGathererEndpoint string
ReportEndpoint string
ReportEndpointTechPreview string
ReportPullingDelay time.Duration
ReportMinRetryTime time.Duration
ReportPullingTimeout time.Duration
Impersonate string
DisableRuntimeExtractor bool
// EnableGlobalObfuscation enables obfuscation of domain names and IP addresses
// To see the detailed info about how anonymization works, go to the docs of package anonymization.
EnableGlobalObfuscation bool
Token string
HTTPConfig HTTPConfig
OCMConfig OCMConfig
// DisableInsightsAlerts disabled exposing of Insights recommendations as Prometheus info alerts
DisableInsightsAlerts bool
ProcessingStatusEndpoint string
}
Controller defines the standard config for this operator.
func LoadConfig ¶
func LoadConfig(controller Controller, obj map[string]interface{}, converter Converter) (Controller, error)
LoadConfig unmarshalls config from obj and loads it to this Controller struct
func ToController ¶
func ToController(s *Serialized, cfg *Controller) (*Controller, error)
ToController creates/updates a config Controller according to the Serialized config. Makes sure that the config is correct.
func ToDisconnectedController ¶
func ToDisconnectedController(s *Serialized, cfg *Controller) (*Controller, error)
ToDisconnectedController creates/updates a config Controller according to the Serialized config. Makes sure that the config is correct, but only checks fields necessary for disconnected operation.
func (*Controller) MergeWith ¶
func (c *Controller) MergeWith(cfg *Controller)
func (*Controller) ToString ¶
func (c *Controller) ToString() string
ToString returns the important fields of the config in a string form
type Converter ¶
type Converter func(s *Serialized, cfg *Controller) (*Controller, error)
type DataReporting ¶
type DataReporting struct {
Enabled bool
Interval time.Duration
UploadEndpoint string
DownloadEndpoint string
DownloadEndpointTechPreview string
StoragePath string
ConditionalGathererEndpoint string
ReportPullingDelay time.Duration
ProcessingStatusEndpoint string
Obfuscation Obfuscation
DisableRuntimeExtractor bool
CACert []byte
}
DataReporting is a type including all the configuration options related to Insights data gathering, upload of the data and download of the corresponding Insights analysis report.
func (*DataReporting) String ¶
func (d *DataReporting) String() string
type DataReportingSerialized ¶
type DataReportingSerialized struct {
Interval string `json:"interval,omitempty"`
UploadEndpoint string `json:"uploadEndpoint,omitempty"`
DownloadEndpoint string `json:"downloadEndpoint,omitempty"`
DownloadEndpointTechPreview string `json:"downloadEndpointTechPreview,omitempty"`
StoragePath string `json:"storagePath,omitempty"`
ConditionalGathererEndpoint string `json:"conditionalGathererEndpoint,omitempty"`
ProcessingStatusEndpoint string `json:"processingStatusEndpoint,omitempty"`
Obfuscation Obfuscation `json:"obfuscation,omitempty"`
DisableRuntimeExtractor string `json:"disableRuntimeExtractor,omitempty"`
CACert string `json:"CACert,omitempty"`
}
type HTTPConfig ¶
HTTPConfig configures http proxy and exception settings if they come from config
type InsightsConfiguration ¶
type InsightsConfiguration struct {
DataReporting DataReporting
Alerting Alerting
SCA SCA
ClusterTransfer ClusterTransfer
Proxy Proxy
}
InsightsConfiguration is a type representing actual Insights Operator configuration options and is used in the code base to make the configuration available.
func (*InsightsConfiguration) String ¶
func (i *InsightsConfiguration) String() string
type InsightsConfigurationSerialized ¶
type InsightsConfigurationSerialized struct {
DataReporting DataReportingSerialized `json:"dataReporting"`
Alerting AlertingSerialized `json:"alerting,omitempty"`
SCA SCASerialized `json:"sca,omitempty"`
ClusterTransfer ClusterTransferSerialized `json:"clusterTransfer,omitempty"`
Proxy ProxySeriazlied `json:"proxy,omitempty"`
}
InsightsConfigurationSerialized is a type representing Insights Operator configuration values in JSON/YAML and it is when decoding the content of the "insights-config" config map.
func (*InsightsConfigurationSerialized) ToConfig ¶
func (i *InsightsConfigurationSerialized) ToConfig() *InsightsConfiguration
ToConfig reads and pareses the actual serialized configuration from "InsightsConfigurationSerialized" and returns the "InsightsConfiguration".
type MockAPIConfigurator ¶
type MockAPIConfigurator struct {
factory.Controller
// contains filtered or unexported fields
}
func NewMockAPIConfigurator ¶
func NewMockAPIConfigurator(gatherConfig *configv1.GatherConfig) *MockAPIConfigurator
NewMockAPIConfigurator constructs a new NewMockAPIConfigurator with provided GatherConfig values
func (*MockAPIConfigurator) GatherConfig ¶
func (mc *MockAPIConfigurator) GatherConfig() *configv1.GatherConfig
func (*MockAPIConfigurator) GatherDataPolicy ¶
func (mc *MockAPIConfigurator) GatherDataPolicy() []configv1.DataPolicyOption
func (*MockAPIConfigurator) GatherDisabled ¶
func (mc *MockAPIConfigurator) GatherDisabled() bool
type MockConfigMapConfigurator ¶
type MockConfigMapConfigurator struct {
factory.Controller
// contains filtered or unexported fields
}
func NewMockConfigMapConfigurator ¶
func NewMockConfigMapConfigurator(config *InsightsConfiguration) *MockConfigMapConfigurator
func (*MockConfigMapConfigurator) Config ¶
func (m *MockConfigMapConfigurator) Config() *InsightsConfiguration
func (*MockConfigMapConfigurator) ConfigChanged ¶
func (m *MockConfigMapConfigurator) ConfigChanged() (configCh <-chan struct{}, closeFn func())
func (*MockConfigMapConfigurator) Listen ¶
func (m *MockConfigMapConfigurator) Listen(context.Context)
type MockSecretConfigurator ¶
type MockSecretConfigurator struct {
Conf *Controller
}
MockSecretConfigurator returns the config from conf field
func NewMockSecretConfigurator ¶
func NewMockSecretConfigurator(conf *Controller) *MockSecretConfigurator
NewMockSecretConfigurator constructs a new MockConfigurator with default config values
func (*MockSecretConfigurator) Config ¶
func (mc *MockSecretConfigurator) Config() *Controller
func (*MockSecretConfigurator) ConfigChanged ¶
func (mc *MockSecretConfigurator) ConfigChanged() (<-chan struct{}, func())
type OCMConfig ¶
type OCMConfig struct {
SCAInterval time.Duration
SCAEndpoint string
SCADisabled bool
ClusterTransferEndpoint string
ClusterTransferInterval time.Duration
}
OCMConfig configures the interval and endpoint for retrieving the data from OCM API
type Obfuscation ¶
type Obfuscation []ObfuscationValue
func (*Obfuscation) UnmarshalJSON ¶
func (o *Obfuscation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements custom unmarshaling for Obfuscation to handle edge cases like empty strings gracefully
type ObfuscationValue ¶
type ObfuscationValue string
const ( Networking ObfuscationValue = "networking" WorkloadNames ObfuscationValue = "workload_names" )
type ProxySeriazlied ¶
type SCA ¶
SCA is a helper type for configuring periodical download/check of the SimpleContentAcccess entitlements
type SCASerialized ¶
type Serialized ¶
type Serialized struct {
Report bool `json:"report"`
StoragePath string `json:"storagePath"`
Interval string `json:"interval"`
Endpoint string `json:"endpoint"`
ConditionalGathererEndpoint string `json:"conditionalGathererEndpoint"`
PullReport struct {
Endpoint string `json:"endpoint"`
Delay string `json:"delay"`
Timeout string `json:"timeout"`
MinRetryTime string `json:"min_retry"`
} `json:"pull_report"`
Impersonate string `json:"impersonate"`
EnableGlobalObfuscation bool `json:"enableGlobalObfuscation"`
OCM struct {
SCAEndpoint string `json:"scaEndpoint"`
SCAInterval string `json:"scaInterval"`
SCADisabled bool `json:"scaDisabled"`
ClusterTransferEndpoint string `json:"clusterTransferEndpoint"`
ClusterTransferInterval string `json:"clusterTransferInterval"`
} `json:"ocm"`
DisableInsightsAlerts bool `json:"disableInsightsAlerts"`
ProcessingStatusEndpoint string `json:"processingStatusEndpoint"`
ReportEndpointTechPreview string `json:"reportEndpointTechPreview"`
DisableRuntimeExtractor bool `json:"disableRuntimeExtractor"`
}
Serialized defines the standard config for this operator.