Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = func() Config {
return Config{
Environment: core.UniversalEnvironment,
Mode: core.Standalone,
Store: store.DefaultStoreConfig(),
XdsServer: xds.DefaultXdsServerConfig(),
MonitoringAssignmentServer: mads.DefaultMonitoringAssignmentServerConfig(),
ApiServer: api_server.DefaultApiServerConfig(),
BootstrapServer: bootstrap.DefaultBootstrapServerConfig(),
Runtime: runtime.DefaultRuntimeConfig(),
Defaults: &Defaults{
SkipMeshCreation: false,
EnableLocalhostInboundClusters: false,
},
Metrics: &Metrics{
Dataplane: &DataplaneMetrics{
SubscriptionLimit: 2,
IdleTimeout: 5 * time.Minute,
},
Zone: &ZoneMetrics{
SubscriptionLimit: 10,
IdleTimeout: 5 * time.Minute,
},
Mesh: &MeshMetrics{
MinResyncTimeout: 1 * time.Second,
MaxResyncTimeout: 20 * time.Second,
},
},
Reports: &Reports{
Enabled: false,
},
General: DefaultGeneralConfig(),
DNSServer: dns_server.DefaultDNSServerConfig(),
Multizone: multizone.DefaultMultizoneConfig(),
Diagnostics: diagnostics.DefaultDiagnosticsConfig(),
DpServer: dp_server.DefaultDpServerConfig(),
Access: access.DefaultAccessConfig(),
Experimental: ExperimentalConfig{
GatewayAPI: false,
KubeOutboundsAsVIPs: false,
},
Proxy: xds.DefaultProxyConfig(),
}
}
Functions ¶
func PrintDeprecations ¶ added in v1.8.1
func PrintDeprecations(cfg *Config, out io.Writer)
Types ¶
type Config ¶
type Config struct {
// General configuration
General *GeneralConfig `yaml:"general,omitempty"`
// Environment Type, can be either "kubernetes" or "universal"
Environment core.EnvironmentType `yaml:"environment,omitempty" envconfig:"kuma_environment"`
// Mode in which Kuma CP is running. Available values are: "standalone", "global", "zone"
Mode core.CpMode `yaml:"mode" envconfig:"kuma_mode"`
// Resource Store configuration
Store *store.StoreConfig `yaml:"store,omitempty"`
// Configuration of Bootstrap Server, which provides bootstrap config to Dataplanes
BootstrapServer *bootstrap.BootstrapServerConfig `yaml:"bootstrapServer,omitempty"`
// Envoy XDS server configuration
XdsServer *xds.XdsServerConfig `yaml:"xdsServer,omitempty"`
// Monitoring Assignment Discovery Service (MADS) server configuration
MonitoringAssignmentServer *mads.MonitoringAssignmentServerConfig `yaml:"monitoringAssignmentServer,omitempty"`
// API Server configuration
ApiServer *api_server.ApiServerConfig `yaml:"apiServer,omitempty"`
// Environment-specific configuration
Runtime *runtime.RuntimeConfig
// Default Kuma entities configuration
Defaults *Defaults `yaml:"defaults,omitempty"`
// Metrics configuration
Metrics *Metrics `yaml:"metrics,omitempty"`
// Reports configuration
Reports *Reports `yaml:"reports,omitempty"`
// Multizone Config
Multizone *multizone.MultizoneConfig `yaml:"multizone,omitempty"`
// DNS Server Config
DNSServer *dns_server.Config `yaml:"dnsServer,omitempty"`
// Diagnostics configuration
Diagnostics *diagnostics.DiagnosticsConfig `yaml:"diagnostics,omitempty"`
// Dataplane Server configuration
DpServer *dp_server.DpServerConfig `yaml:"dpServer"`
// Access Control configuration
Access access.AccessConfig `yaml:"access"`
// Configuration of experimental features
Experimental ExperimentalConfig `yaml:"experimental"`
// Proxy holds configuration for proxies
Proxy xds.Proxy `yaml:"proxy"`
}
func (Config) GetEnvoyAdminPort ¶ added in v1.8.1
func (c Config) GetEnvoyAdminPort() uint32
type DataplaneMetrics ¶
type DataplaneMetrics struct {
SubscriptionLimit int `yaml:"subscriptionLimit" envconfig:"kuma_metrics_dataplane_subscription_limit"`
IdleTimeout time.Duration `yaml:"idleTimeout" envconfig:"kuma_metrics_dataplane_idle_timeout"`
}
type Defaults ¶
type Defaults struct {
// If true, it skips creating the default Mesh
SkipMeshCreation bool `yaml:"skipMeshCreation" envconfig:"kuma_defaults_skip_mesh_creation"`
// If true, instead of providing inbound clusters with address of dataplane, generates cluster with localhost.
// Enabled can cause security threat by exposing application listing on localhost. This configuration is going to
// be removed in the future.
// TODO: https://github.com/kumahq/kuma/issues/4772
EnableLocalhostInboundClusters bool `yaml:"enableLocalhostInboundClusters" envconfig:"kuma_defaults_enable_localhost_inbound_clusters"`
}
type ExperimentalConfig ¶ added in v1.8.1
type ExperimentalConfig struct {
// If true, experimental Gateway API is enabled
GatewayAPI bool `yaml:"gatewayAPI" envconfig:"KUMA_EXPERIMENTAL_GATEWAY_API"`
// If true, instead of embedding kubernetes outbounds into Dataplane object, they are persisted next to VIPs in ConfigMap
// This can improve performance, but it should be enabled only after all instances are migrated to version that supports this config
KubeOutboundsAsVIPs bool `yaml:"kubeOutboundsAsVIPs" envconfig:"KUMA_EXPERIMENTAL_KUBE_OUTBOUNDS_AS_VIPS"`
}
type GeneralConfig ¶
type GeneralConfig struct {
// DNSCacheTTL represents duration for how long Kuma CP will cache result of resolving dataplane's domain name
DNSCacheTTL time.Duration `yaml:"dnsCacheTTL" envconfig:"kuma_general_dns_cache_ttl"`
// TlsCertFile defines a path to a file with PEM-encoded TLS cert that will be used across all the Kuma Servers.
TlsCertFile string `yaml:"tlsCertFile" envconfig:"kuma_general_tls_cert_file"`
// TlsKeyFile defines a path to a file with PEM-encoded TLS key that will be used across all the Kuma Servers.
TlsKeyFile string `yaml:"tlsKeyFile" envconfig:"kuma_general_tls_key_file"`
// WorkDir defines a path to the working directory
// Kuma stores in this directory autogenerated entities like certificates.
// If empty then the working directory is $HOME/.kuma
WorkDir string `yaml:"workDir" envconfig:"kuma_general_work_dir"`
}
func DefaultGeneralConfig ¶
func DefaultGeneralConfig() *GeneralConfig
type MeshMetrics ¶
type MeshMetrics struct {
// MinResyncTimeout is a minimal time that should pass between MeshInsight resync
MinResyncTimeout time.Duration `yaml:"minResyncTimeout" envconfig:"kuma_metrics_mesh_min_resync_timeout"`
// MaxResyncTimeout is a maximum time that MeshInsight could spend without resync
MaxResyncTimeout time.Duration `yaml:"maxResyncTimeout" envconfig:"kuma_metrics_mesh_max_resync_timeout"`
}
type Metrics ¶
type Metrics struct {
Dataplane *DataplaneMetrics `yaml:"dataplane"`
Zone *ZoneMetrics `yaml:"zone"`
Mesh *MeshMetrics `yaml:"mesh"`
}
type Reports ¶
type Reports struct {
// If true then usage stats will be reported
Enabled bool `yaml:"enabled" envconfig:"kuma_reports_enabled"`
}
type ZoneMetrics ¶
type ZoneMetrics struct {
SubscriptionLimit int `yaml:"subscriptionLimit" envconfig:"kuma_metrics_zone_subscription_limit"`
IdleTimeout time.Duration `yaml:"idleTimeout" envconfig:"kuma_metrics_zone_idle_timeout"`
}
Click to show internal directories.
Click to hide internal directories.