Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Manager is the configuration for the controller manager.
Manager ManagerConfig `koanf:"manager"`
// Storage is the configuration for the storage provider.
Storage StorageConfig `koanf:"storage"`
// Host is the configuration for the host webmesh node.
Host host.Config `koanf:"host"`
}
Config is the configuration for the the webmesh-cni controllers.
func NewDefaultConfig ¶ added in v0.0.8
func NewDefaultConfig() Config
NewDefaultConfig returns a new default configuration for the webmesh-cni controllers.
type ConfigMapProvider ¶ added in v0.0.11
type ConfigMapProvider struct {
// contains filtered or unexported fields
}
ConfigMapProvider is a provider for koanf that reads in configurations from the given config map.
func (*ConfigMapProvider) Read ¶ added in v0.0.11
func (c *ConfigMapProvider) Read() (map[string]any, error)
Read returns the parsed configuration as a nested map[string]interface{}. It is important to note that the string keys should not be flat delimited keys like `parent.child.key`, but nested like `{parent: {child: {key: 1}}}`.
func (*ConfigMapProvider) ReadBytes ¶ added in v0.0.11
func (c *ConfigMapProvider) ReadBytes() ([]byte, error)
Read returns the entire configuration as raw []bytes to be parsed. with a Parser.
type ManagerConfig ¶
type ManagerConfig struct {
// RemoteEndpointDetection enables remote endpoint detection for peer containers.
RemoteEndpointDetection bool `koanf:"remote-endpoint-detection"`
// MetricsAddress is the address to bind the metrics server to.
MetricsAddress string `koanf:"metrics-address"`
// ProbeAddress is the address to bind the health probe server to.
ProbeAddress string `koanf:"probe-address"`
// ReconcileTimeout is the timeout for reconciling a container's interface.
ReconcileTimeout time.Duration `koanf:"reconcile-timeout"`
// MaxConcurrentReconciles is the maximum number of concurrent reconciles.
// Most of the reconcilers take exclusive locks, so this will only apply
// to reconcilers as a whole.
MaxConcurrentReconciles int `koanf:"max-concurrent-reconciles"`
// ShutdownTimeout is the timeout for shutting down the node.
ShutdownTimeout time.Duration `koanf:"shutdown-timeout"`
// ClusterDNSSelector is the selector used for trying to find pods that provide DNS
// for the cluster.
ClusterDNSSelector map[string]string `koanf:"cluster-dns-selector,omitempty"`
// ClusterDNSNamespace is the namespace to search for cluster DNS pods.
ClusterDNSNamespace string `koanf:"cluster-dns-namespace,omitempty"`
// ClusterDNSPortSelector is the name of the port assumed to be the DNS port.
ClusterDNSPortSelector string `koanf:"cluster-dns-port-selector,omitempty"`
// EnableMetadataServer enables a metadata server on the node that containers
// can use to query information about themselves.
EnableMetadataServer bool `koanf:"enable-metadata-server"`
// MetadataAddress is the address to bind the metadata server to.
MetadataAddress string `koanf:"metadata-address"`
// EnableMetadataIDTokens enables ID token endpoints on the metadata server
// for helping facilitate authentication between containers.
EnableMetadataIDTokens bool `koanf:"enable-metadata-id-tokens"`
}
ManagerConfig is the configuration for the controller manager.
func (*ManagerConfig) BindFlags ¶
func (c *ManagerConfig) BindFlags(prefix string, fs *pflag.FlagSet)
func (*ManagerConfig) Validate ¶
func (c *ManagerConfig) Validate() error
type StorageConfig ¶
type StorageConfig struct {
// LeaderElectionLeaseDuration is the duration that non-leader candidates
// will wait to force acquire leadership.
LeaderElectLeaseDuration time.Duration `koanf:"leader-elect-lease-duration"`
// LeaderElectRenewDeadline is the duration that the acting master will retry
// refreshing leadership before giving up.
LeaderElectRenewDeadline time.Duration `koanf:"leader-elect-renew-deadline"`
// LeaderElectRetryPeriod is the duration the LeaderElector clients should wait
// between tries of actions.
LeaderElectRetryPeriod time.Duration `koanf:"leader-elect-retry-period"`
// CacheSyncTimeout is the amount of time to wait for the client cache to sync
// before starting the controller.
CacheSyncTimeout time.Duration `koanf:"cache-sync-timeout"`
}
StorageConfig is the configuration for the storage provider.