config

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FlagAnalyticsInfluxAddr specifies the Influxdb address. Address should be of the form 'http://host:port' or 'http://[ipv6-host%zone]:port'
	FlagAnalyticsInfluxAddr = Flag{
		Long:  "analytics.influx_addr",
		Short: "",
		Value: "http://monitoring-influxdb.kube-system.svc.cluster.local:8086",
		Usage: "InfluxDB address. Address should be of the form 'http://host:port' or 'http://[ipv6-host%zone]:port'.",
	}
	// FlagAnalyticsInfluxDb specifies the name of the InfluxDB database
	FlagAnalyticsInfluxDb = Flag{
		Long:  "analytics.influx_db",
		Short: "",
		Value: "k8s",
		Usage: "InfluxDB database name",
	}
	// FlagAnalyticsInfluxUsername specifies the InfluxDB username
	FlagAnalyticsInfluxUsername = Flag{
		Long:  "analytics.influx_username",
		Short: "",
		Value: "",
		Usage: "InfluxDB username",
	}
	// FlagAnalyticsInfluxPassword specifies the InfluxDB password
	FlagAnalyticsInfluxPassword = Flag{
		Long:  "analytics.influx_password",
		Short: "",
		Value: "",
		Usage: "InfluxDB password",
	}
	// FlagAnalyticsInfluxBufferSize specifies the InfluxDB buffer size.
	// Request metrics will be written to InfluxDB when this buffer is full.
	FlagAnalyticsInfluxBufferSize = Flag{
		Long:  "analytics.influx_buffer_size",
		Short: "",
		Value: 10,
		Usage: "InfluxDB buffer size. Request metrics will be written to InfluxDB when this buffer is full.",
	}
	// FlagAnalyticsInfluxMeasurement specifies the InfluxDB measurement to be used for Kanali request metrics.
	FlagAnalyticsInfluxMeasurement = Flag{
		Long:  "analytics.influx_measurement",
		Short: "",
		Value: "request_details",
		Usage: " InfluxDB measurement to be used for Kanali request metrics.",
	}
)
View Source
var (
	// FlagPluginsLocation sets the location of custom plugins shared object (.so) files
	FlagPluginsLocation = Flag{
		Long:  "plugins.location",
		Short: "",
		Value: "/",
		Usage: "Location of custom plugins shared object (.so) files.",
	}
	// FlagPluginsAPIKeyDecriptionKeyFile set the location of the decryption RSA key file to be used to decrypt incoming API keys.
	FlagPluginsAPIKeyDecriptionKeyFile = Flag{
		Long:  "plugins.apiKey.decryption_key_file",
		Short: "",
		Value: "",
		Usage: "Path to valid PEM-encoded private key that matches the public key used to encrypt API keys.",
	}
)
View Source
var (
	// FlagProxyEnableClusterIP enables to use of cluster ip as opposed to Kubernetes DNS for upstream routing
	FlagProxyEnableClusterIP = Flag{
		Long:  "proxy.enable_cluster_ip",
		Short: "",
		Value: false,
		Usage: "Enables to use of cluster ip as opposed to Kubernetes DNS for upstream routing.",
	}
	// FlagProxyHeaderMaskValue sets the Value to be used when omitting header Values
	FlagProxyHeaderMaskValue = Flag{
		Long:  "proxy.header_mask_Value",
		Short: "",
		Value: "omitted",
		Usage: "Sets the Value to be used when omitting header Values.",
	}
	// FlagProxyEnableMockResponses enables Kanali's mock responses feature. Read the documentation for more information
	FlagProxyEnableMockResponses = Flag{
		Long:  "proxy.enable_mock_responses",
		Short: "",
		Value: false,
		Usage: "Enables Kanali's mock responses feature. Read the documentation for more information.",
	}
	// FlagProxyUpstreamTimeout sets the length of upstream timeout
	FlagProxyUpstreamTimeout = Flag{
		Long:  "proxy.upstream_timeout",
		Short: "",
		Value: "0h0m10s",
		Usage: "Set length of upstream timeout. Defaults to none",
	}
	// FlagProxyMaskHeaderKeys specifies which headers to mask.
	FlagProxyMaskHeaderKeys = Flag{
		Long:  "proxy.mask_header_keys",
		Short: "",
		Value: []string{},
		Usage: "Specify which headers to mask",
	}
	// FlagProxyTLSCommonNameValidation determins whether common name validation occurs as part of an SSL handshake
	FlagProxyTLSCommonNameValidation = Flag{
		Long:  "proxy.tls_common_name_validation",
		Short: "",
		Value: true,
		Usage: "Should common name validate as part of an SSL handshake.",
	}
	// FlagProxyDefaultHeaderValues specifies the default values for HTTP headers to be used in dynamic service discovery
	FlagProxyDefaultHeaderValues = Flag{
		Long:  "proxy.default_header_values",
		Short: "",
		Value: map[string]string{},
		Usage: "Specifies the default values for HTTP headers to be used in dynamic service discovery.",
	}
)
View Source
var (
	// FlagServerPort sets the port that Kanali will listen on for incoming requests
	FlagServerPort = Flag{
		Long:  "server.port",
		Short: "p",
		Value: 0,
		Usage: "Sets the port that Kanali will listen on for incoming requests.",
	}
	// FlagServerBindAddress specifies the network address that Kanali will listen on for incoming requests
	FlagServerBindAddress = Flag{
		Long:  "server.bind_address",
		Short: "b",
		Value: "0.0.0.0",
		Usage: "Network address that Kanali will listen on for incoming requests.",
	}
	// FlagServerPeerUDPPort sets the port that all Kanali instances will communicate to each other over
	FlagServerPeerUDPPort = Flag{
		Long:  "server.peer_udp_port",
		Short: "",
		Value: 10001,
		Usage: "Sets the port that all Kanali instances will communicate to each other over.",
	}
	// FlagServerProxyProtocol maintains the integrity of the remote client IP address when incoming traffic to Kanali includes the Proxy Protocol header
	FlagServerProxyProtocol = Flag{
		Long:  "server.proxy_protocol",
		Short: "",
		Value: false,
		Usage: "Maintain the integrity of the remote client IP address when incoming traffic to Kanali includes the Proxy Protocol header.",
	}
)
View Source
var (
	// FlagTLSCertFile specifies the path to x509 certificate for HTTPS servers.
	FlagTLSCertFile = Flag{
		Long:  "tls.cert_file",
		Short: "c",
		Value: "",
		Usage: "Path to x509 certificate for HTTPS servers.",
	}
	// FlagTLSKeyFile pecifies the path to x509 private key matching --tls-cert-file
	FlagTLSKeyFile = Flag{
		Long:  "tls.key_file",
		Short: "k",
		Value: "",
		Usage: "Path to x509 private key matching --tls.cert_file.",
	}
	// FlagTLSCaFile specifies the path to x509 certificate authority bundle for mutual TLS
	FlagTLSCaFile = Flag{
		Long:  "tls.ca_file",
		Short: "",
		Value: "",
		Usage: "Path to x509 certificate authority bundle for mutual TLS.",
	}
)
View Source
var (
	// FlagTracingJaegerServerURL specifies the endpoint to the Jaeger server
	FlagTracingJaegerServerURL = Flag{
		Long:  "tracing.jaeger_server_url",
		Short: "",
		Value: "jaeger-all-in-one-agent.default.svc.cluster.local",
		Usage: "Endpoint to the Jaeger server",
	}
	// FlagTracingJaegerAgentURL specifies the endpoint to the Jaeger agent
	FlagTracingJaegerAgentURL = Flag{
		Long:  "tracing.jaeger_agent_url",
		Short: "",
		Value: "jaeger-all-in-one-agent.default.svc.cluster.local",
		Usage: "Endpoint to the Jaeger agent",
	}
)
View Source
var (
	// FlagProcessLogLevel sets the logging level. Choose between 'debug', 'info', 'warn', 'error', 'fatal'
	FlagProcessLogLevel = Flag{
		Long:  "process.log_level",
		Short: "l",
		Value: "info",
		Usage: "Sets the logging level. Choose between 'debug', 'info', 'warn', 'error', 'fatal'.",
	}
)
View Source
var Flags = &flags{}

Flags is the aggregate set of flags that Kanali has available to configure.

Functions

This section is empty.

Types

type Flag added in v1.2.0

type Flag struct {
	Long  string
	Short string
	Value interface{}
	Usage string
}

Flag is a simplified representation of a configuration item.

func (Flag) GetLong added in v1.2.0

func (f Flag) GetLong() string

GetLong returns the name of the flag

func (Flag) GetShort added in v1.2.0

func (f Flag) GetShort() string

GetShort returns the Short name of the flag

func (Flag) GetUsage added in v1.2.0

func (f Flag) GetUsage() string

GetUsage returns the flag's description.

Jump to

Keyboard shortcuts

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