config

package
v2.1.45 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IngressMonitorControllerSecretConfigKey   = "config.yaml"
	IngressMonitorControllerSecretDefaultName = "imc-config"
)

Variables

View Source
var ReconciliationRequeueTime = getRequeueTime()

Functions

func LoadControllerConfig

func LoadControllerConfig(apiReader client.Reader)

Types

type AppInsights

type AppInsights struct {
	Name          string        `yaml:"name"`
	Location      string        `yaml:"location"`
	ResourceGroup string        `yaml:"resourceGroup"`
	Frequency     int32         `yaml:"frequency"`
	GeoLocation   []interface{} `yaml:"geoLocation"`
	EmailAction   EmailAction   `yaml:"emailAction"`
	WebhookAction WebhookAction `yaml:"webhookAction"`
}

type Config

type Config struct {
	Providers             []Provider    `yaml:"providers"`
	EnableMonitorDeletion bool          `yaml:"enableMonitorDeletion"`
	MonitorNameTemplate   string        `yaml:"monitorNameTemplate"`
	ResyncPeriod          int           `yaml:"resyncPeriod,omitempty"`
	CreationDelay         time.Duration `yaml:"creationDelay,omitempty"`
}
var (
	IngressMonitorControllerConfig Config
)

func GetControllerConfig

func GetControllerConfig() Config

func GetControllerConfigTest

func GetControllerConfigTest() Config

func ReadConfig

func ReadConfig(filePath string) Config

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(data []byte) error

UnmarshalYAML interface to deserialize specific types

type EmailAction

type EmailAction struct {
	SendToServiceOwners bool     `yaml:"send_to_service_owners"`
	CustomEmails        []string `yaml:"custom_emails"`
}

type Gcloud

type Gcloud struct {
	ProjectID string `yaml:"projectId"`
}

type Grafana added in v2.1.42

type Grafana struct {
	Frequency int64 `yaml:"frequency"`
}

type Provider

type Provider struct {
	Name              string      `yaml:"name"`
	ApiKey            string      `yaml:"apiKey"`
	ApiToken          string      `yaml:"apiToken"`
	ApiURL            string      `yaml:"apiURL"`
	AlertContacts     string      `yaml:"alertContacts"`
	AlertIntegrations string      `yaml:"alertIntegrations"`
	TeamAlertContacts string      `yaml:"teamAlertContacts"`
	Username          string      `yaml:"username"`
	Password          string      `yaml:"password"`
	AccountEmail      string      `yaml:"accountEmail"`
	AppInsightsConfig AppInsights `yaml:"appInsightsConfig"`
	GcloudConfig      Gcloud      `yaml:"gcloudConfig"`
	GrafanaConfig     Grafana     `yaml:"grafanaConfig"`
}

type WebhookAction

type WebhookAction struct {
	ServiceURI string `yaml:"service_uri"`
}

Jump to

Keyboard shortcuts

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