Documentation
¶
Index ¶
- func ContextWithSignal(ctx context.Context) context.Context
- func ContextWithStopChan(ctx context.Context, stopCh <-chan struct{}) context.Context
- func NewLogger(format, level string, debug bool) (logrus.FieldLogger, error)
- type CleanupConfiguration
- type EnvLoader
- type FileLoader
- type PrepareConfiguration
- type TraefikMeshConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithSignal ¶
ContextWithSignal creates a context canceled when SIGINT or SIGTERM are notified.
func ContextWithStopChan ¶
ContextWithStopChan creates a context canceled when the given stopCh receives a message or get closed.
Types ¶
type CleanupConfiguration ¶
type CleanupConfiguration struct { ConfigFile string `description:"Configuration file to use. If specified all other flags are ignored." export:"true"` KubeConfig string `description:"Path to a kubeconfig. Only required if out-of-cluster." export:"true"` MasterURL string `` /* 137-byte string literal not displayed */ Namespace string `description:"The namespace that Traefik Mesh is installed in." export:"true"` LogLevel string `description:"The log level." export:"true"` LogFormat string `description:"The log format." export:"true"` }
CleanupConfiguration holds the configuration for the cleanup command.
func NewCleanupConfiguration ¶
func NewCleanupConfiguration() *CleanupConfiguration
NewCleanupConfiguration creates CleanupConfiguration.
type EnvLoader ¶
type EnvLoader struct{}
EnvLoader loads a configuration from all the environment variables.
func (*EnvLoader) Load ¶
Load loads the command's configuration from the environment variables prefixed with "TRAEFIK_MESH_" or "MAESH_". The "MAESH_" prefix is deprecated and will be removed in the next major release. If "TRAEFIK_MESH_" and "MAESH_" env variables are mixed up an error is returned. As it is not possible to have a prefix with multiple "_" everything is normalized to "MESH_" under the hood for the decoding.
type PrepareConfiguration ¶
type PrepareConfiguration struct { ConfigFile string `description:"Configuration file to use. If specified all other flags are ignored." export:"true"` KubeConfig string `description:"Path to a kubeconfig. Only required if out-of-cluster." export:"true"` MasterURL string `` /* 137-byte string literal not displayed */ LogLevel string `description:"The log level." export:"true"` LogFormat string `description:"The log format." export:"true"` Debug bool `description:"Debug mode, deprecated, use --loglevel=debug instead." export:"true"` Namespace string `description:"The namespace that Traefik Mesh is installed in." export:"true"` ClusterDomain string `description:"Your internal K8s cluster domain." export:"true"` SMI bool `description:"Enable SMI operation, deprecated, use --acl instead." export:"true"` ACL bool `description:"Enable ACL mode." export:"true"` }
PrepareConfiguration holds the configuration to prepare the cluster.
func NewPrepareConfiguration ¶
func NewPrepareConfiguration() *PrepareConfiguration
NewPrepareConfiguration creates a PrepareConfiguration with default values.
type TraefikMeshConfiguration ¶
type TraefikMeshConfiguration struct { ConfigFile string `description:"Configuration file to use. If specified all other flags are ignored." export:"true"` KubeConfig string `description:"Path to a kubeconfig. Only required if out-of-cluster." export:"true"` MasterURL string `` /* 137-byte string literal not displayed */ LogLevel string `description:"The log level." export:"true"` LogFormat string `description:"The log format." export:"true"` Debug bool `description:"Debug mode, deprecated, use --loglevel=debug instead." export:"true"` ACL bool `description:"Enable ACL mode." export:"true"` SMI bool `description:"Enable SMI operation, deprecated, use --acl instead." export:"true"` DefaultMode string `description:"Default mode for mesh services." export:"true"` Namespace string `description:"The namespace that Traefik Mesh is installed in." export:"true"` WatchNamespaces []string `description:"Namespaces to watch." export:"true"` IgnoreNamespaces []string `description:"Namespaces to ignore." export:"true"` APIPort int32 `description:"API port for the controller." export:"true"` APIHost string `description:"API host for the controller to bind to." export:"true"` LimitHTTPPort int32 `description:"Number of HTTP ports allocated." export:"true"` LimitTCPPort int32 `description:"Number of TCP ports allocated." export:"true"` LimitUDPPort int32 `description:"Number of UDP ports allocated." export:"true"` }
TraefikMeshConfiguration wraps the static configuration and extra parameters.
func NewTraefikMeshConfiguration ¶
func NewTraefikMeshConfiguration() *TraefikMeshConfiguration
NewTraefikMeshConfiguration creates a TraefikMeshConfiguration with default values.