mirror of
https://github.com/openziti/ziti.git
synced 2026-10-12 15:28:05 +00:00
Removed all default values from this project where they could be referenced from a separate project instead.
Updated default value references to the new global values
This commit is contained in:
@@ -19,24 +19,24 @@ identity:
|
||||
ctrl:
|
||||
#options:
|
||||
# (optional) settings
|
||||
# set the maximum number of connect requests that are buffered and waiting to be acknowledged (1 to 5000, default 1000)
|
||||
#maxQueuedConnects: 50
|
||||
# the maximum number of connects that have begun hello synchronization (1 to 1000, default 16)
|
||||
#maxOutstandingConnects: 100
|
||||
# the number of milliseconds to wait before a hello synchronization fails and closes the connection (30ms to 60000ms, default: 1000ms)
|
||||
#connectTimeoutMs: 3000
|
||||
# set the maximum number of connect requests that are buffered and waiting to be acknowledged ({{ .Controller.MinQueuedConnects }} to {{ .Controller.MaxQueuedConnects }}, default {{ .Controller.DefaultQueuedConnects }})
|
||||
#maxQueuedConnects: {{ .Controller.DefaultQueuedConnects }}
|
||||
# the maximum number of connects that have begun hello synchronization ({{ .Controller.MinOutstandingConnects }} to {{ .Controller.MaxOutstandingConnects }}, default {{ .Controller.DefaultOutstandingConnects }})
|
||||
#maxOutstandingConnects: {{ .Controller.DefaultOutstandingConnects }}
|
||||
# the number of milliseconds to wait before a hello synchronization fails and closes the connection ({{ .Controller.MinConnectTimeout.Milliseconds }}ms to {{ .Controller.MaxConnectTimeout.Milliseconds }}ms, default: {{ .Controller.DefaultConnectTimeout.Milliseconds }}ms)
|
||||
#connectTimeoutMs: {{ .Controller.DefaultConnectTimeout.Milliseconds }}
|
||||
listener: tls:{{ .Controller.ListenerAddress }}:{{ .Controller.Port }}
|
||||
|
||||
# the endpoint that management tools connect to the controller over.
|
||||
mgmt:
|
||||
#options:
|
||||
# (optional) settings
|
||||
# set the maximum number of connect requests that are buffered and waiting to be acknowledged (1 to 5000, default 1000)
|
||||
#maxQueuedConnects: 50
|
||||
# the maximum number of connects that have begun hello synchronization (1 to 1000, default 16)
|
||||
#maxOutstandingConnects: 100
|
||||
# the number of milliseconds to wait before a hello synchronization fails and closes the connection (30ms to 60000ms, default: 1000ms)
|
||||
#connectTimeoutMs: 3000
|
||||
# set the maximum number of connect requests that are buffered and waiting to be acknowledged ({{ .Controller.MinQueuedConnects }} to {{ .Controller.MaxQueuedConnects }}, default {{ .Controller.DefaultQueuedConnects }})
|
||||
#maxQueuedConnects: {{ .Controller.DefaultQueuedConnects }}
|
||||
# the maximum number of connects that have begun hello synchronization ({{ .Controller.MinOutstandingConnects }} to {{ .Controller.MaxOutstandingConnects }}, default {{ .Controller.DefaultOutstandingConnects }})
|
||||
#maxOutstandingConnects: {{ .Controller.DefaultOutstandingConnects }}
|
||||
# the number of milliseconds to wait before a hello synchronization fails and closes the connection ({{ .Controller.MinConnectTimeout.Milliseconds }}ms to {{ .Controller.MaxConnectTimeout.Milliseconds }}ms, default: {{ .Controller.DefaultConnectTimeout.Milliseconds }}ms)
|
||||
#connectTimeoutMs: {{ .Controller.DefaultConnectTimeout.Milliseconds }}
|
||||
listener: tls:{{ .Controller.ListenerAddress }}:10000
|
||||
|
||||
#metrics:
|
||||
@@ -52,26 +52,26 @@ mgmt:
|
||||
|
||||
healthChecks:
|
||||
boltCheck:
|
||||
# How often to try entering a bolt read tx. Defaults to {{ .Controller.HealthCheck.IntervalSec }} seconds
|
||||
interval: {{ .Controller.HealthCheck.IntervalSec }}s
|
||||
# When to time out the check. Defaults to {{ .Controller.HealthCheck.TimeoutSec }} seconds
|
||||
timeout: {{ .Controller.HealthCheck.TimeoutSec }}s
|
||||
# How long to wait before starting the check. Defaults to {{ .Controller.HealthCheck.InitialDelaySec }} seconds
|
||||
initialDelay: {{ .Controller.HealthCheck.InitialDelaySec }}s
|
||||
# How often to try entering a bolt read tx. Defaults to {{ .Controller.HealthCheck.Interval.Seconds }} seconds
|
||||
interval: {{ .Controller.HealthCheck.Interval.Seconds }}s
|
||||
# When to time out the check. Defaults to {{ .Controller.HealthCheck.Timeout.Seconds }} seconds
|
||||
timeout: {{ .Controller.HealthCheck.Timeout.Seconds }}s
|
||||
# How long to wait before starting the check. Defaults to {{ .Controller.HealthCheck.InitialDelay.Seconds }} seconds
|
||||
initialDelay: {{ .Controller.HealthCheck.InitialDelay.Seconds }}s
|
||||
|
||||
# By having an 'edge' section defined, the ziti-controller will attempt to parse the edge configuration. Removing this
|
||||
# section, commenting out, or altering the name of the section will cause the edge to not run.
|
||||
edge:
|
||||
# This section represents the configuration of the Edge API that is served over HTTPS
|
||||
api:
|
||||
#(optional, default 90s) Alters how frequently heartbeat and last activity values are persisted
|
||||
# activityUpdateInterval: 90s
|
||||
#(optional, default 250) The number of API Sessions updated for last activity per transaction
|
||||
# activityUpdateBatchSize: 250
|
||||
# sessionTimeout - optional, default {{ .Controller.Edge.APISessionTimeoutMinutes }}m
|
||||
#(optional, default {{ .Controller.Edge.APIActivityUpdateInterval.Seconds }}s) Alters how frequently heartbeat and last activity values are persisted
|
||||
# activityUpdateInterval: {{ .Controller.Edge.APIActivityUpdateInterval.Seconds }}s
|
||||
#(optional, default {{ .Controller.Edge.APIActivityUpdateBatchSize }}) The number of API Sessions updated for last activity per transaction
|
||||
# activityUpdateBatchSize: {{ .Controller.Edge.APIActivityUpdateBatchSize }}
|
||||
# sessionTimeout - optional, default {{ .Controller.Edge.APISessionTimeout.Minutes }}m
|
||||
# The number of minutes before an Edge API session will time out. Timeouts are reset by
|
||||
# API requests and connections that are maintained to Edge Routers
|
||||
sessionTimeout: {{ .Controller.Edge.APISessionTimeoutMinutes }}m
|
||||
sessionTimeout: {{ .Controller.Edge.APISessionTimeout.Minutes }}m
|
||||
# address - required
|
||||
# The default address (host:port) to use for enrollment for the Client API. This value must match one of the addresses
|
||||
# defined in this Controller.WebListener.'s bindPoints.
|
||||
@@ -88,17 +88,17 @@ edge:
|
||||
# edgeIdentity - optional
|
||||
# A section for identity enrollment specific settings
|
||||
edgeIdentity:
|
||||
# durationMinutes - optional, default {{ .Controller.EdgeIdentityDuration }}m
|
||||
# durationMinutes - optional, default {{ .Controller.EdgeIdentityDuration.Minutes }}m
|
||||
# The length of time that a Ziti Edge Identity enrollment should remain valid. After
|
||||
# this duration, the enrollment will expire and no longer be usable.
|
||||
duration: {{ .Controller.EdgeIdentityDuration }}m
|
||||
duration: {{ .Controller.EdgeIdentityDuration.Minutes }}m
|
||||
# edgeRouter - Optional
|
||||
# A section for edge router enrollment specific settings.
|
||||
edgeRouter:
|
||||
# durationMinutes - optional, default {{ .Controller.EdgeRouterDuration }}m
|
||||
# durationMinutes - optional, default {{ .Controller.EdgeRouterDuration.Minutes }}m
|
||||
# The length of time that a Ziti Edge Router enrollment should remain valid. After
|
||||
# this duration, the enrollment will expire and no longer be usable.
|
||||
duration: {{ .Controller.EdgeRouterDuration }}m
|
||||
duration: {{ .Controller.EdgeRouterDuration.Minutes }}m
|
||||
|
||||
# web
|
||||
# Defines webListeners that will be hosted by the controller. Each webListener can host many APIs and be bound to many
|
||||
@@ -131,21 +131,21 @@ web:
|
||||
# Allows the specification of webListener level options - mainly dealing with HTTP/TLS settings. These options are
|
||||
# used for all http servers started by the current webListener.
|
||||
options:
|
||||
# idleTimeoutMs - optional, default {{ .Controller.WebListener.IdleTimeoutMS }}ms
|
||||
# idleTimeoutMs - optional, default {{ .Controller.WebListener.IdleTimeout.Milliseconds }}ms
|
||||
# The maximum amount of idle time in milliseconds allowed for pipelined HTTP requests. Setting this too high
|
||||
# can cause resources on the host to be consumed as clients remain connected and idle. Lowering this value
|
||||
# will cause clients to reconnect on subsequent HTTPs requests.
|
||||
idleTimeout: {{ .Controller.WebListener.IdleTimeoutMS }}ms #http timeouts, new
|
||||
# readTimeoutMs - optional, default {{ .Controller.WebListener.ReadTimeoutMS }}ms
|
||||
idleTimeout: {{ .Controller.WebListener.IdleTimeout.Milliseconds }}ms #http timeouts, new
|
||||
# readTimeoutMs - optional, default {{ .Controller.WebListener.ReadTimeout.Milliseconds }}ms
|
||||
# The maximum amount of time in milliseconds http servers will wait to read the first incoming requests. A higher
|
||||
# value risks consuming resources on the host with clients that are acting bad faith or suffering from high latency
|
||||
# or packet loss. A lower value can risk losing connections to high latency/packet loss clients.
|
||||
readTimeout: {{ .Controller.WebListener.ReadTimeoutMS }}ms
|
||||
# writeTimeoutMs - optional, default {{ .Controller.WebListener.WriteTimeoutMS }}ms
|
||||
readTimeout: {{ .Controller.WebListener.ReadTimeout.Milliseconds }}ms
|
||||
# writeTimeoutMs - optional, default {{ .Controller.WebListener.WriteTimeout.Milliseconds }}ms
|
||||
# The total maximum time in milliseconds that the http server will wait for a single requests to be received and
|
||||
# responded too. A higher value can allow long running requests to consume resources on the host. A lower value
|
||||
# responded too. A higher value can allow long-running requests to consume resources on the host. A lower value
|
||||
# can risk ending requests before the server has a chance to respond.
|
||||
writeTimeout: {{ .Controller.WebListener.WriteTimeoutMS }}ms
|
||||
writeTimeout: {{ .Controller.WebListener.WriteTimeout.Milliseconds }}ms
|
||||
# minTLSVersion - optional, default {{ .Controller.WebListener.MinTLSVersion }}
|
||||
# The minimum version of TSL to support
|
||||
minTLSVersion: {{ .Controller.WebListener.MinTLSVersion }}
|
||||
|
||||
@@ -31,8 +31,8 @@ link:
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} address: {{ if .Router.IsWss }}ws{{ else }}tls{{end}}:0.0.0.0:{{ .Router.Edge.Port }}
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} options:
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} advertise: {{ .Router.Edge.Hostname }}:{{ if .Router.IsWss }}3023{{ else }}{{ .Router.Edge.Port }}{{ end }}
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} connectTimeoutMs: {{ .Router.Listener.ConnectTimeoutMs }}
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} getSessionTimeout: {{ .Router.Listener.GetSessionTimeoutS }}s
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} connectTimeoutMs: {{ .Router.Listener.ConnectTimeout.Milliseconds }}
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} getSessionTimeout: {{ .Router.Listener.GetSessionTimeout.Seconds }}s
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} - binding: tunnel
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} options:
|
||||
{{ if or .Router.IsFabric .Router.IsPrivate }}#{{ end }} mode: host #tproxy|host
|
||||
@@ -67,20 +67,20 @@ edge:
|
||||
{{ end }}
|
||||
{{ if not .Router.IsWss }}#{{ end }}transport:
|
||||
{{ if not .Router.IsWss }}#{{ end }} ws:
|
||||
{{ if not .Router.IsWss }}#{{ end }} writeTimeout: {{ .Router.Wss.WriteTimeout }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} readTimeout: {{ .Router.Wss.ReadTimeout }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} idleTimeout: {{ .Router.Wss.IdleTimeout }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} pongTimeout: {{ .Router.Wss.PongTimeout }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} pingInterval: {{ .Router.Wss.PingInterval }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} handshakeTimeout: {{ .Router.Wss.HandshakeTimeout }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} writeTimeout: {{ .Router.Wss.WriteTimeout.Seconds }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} readTimeout: {{ .Router.Wss.ReadTimeout.Seconds }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} idleTimeout: {{ .Router.Wss.IdleTimeout.Seconds }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} pongTimeout: {{ .Router.Wss.PongTimeout.Seconds }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} pingInterval: {{ .Router.Wss.PingInterval.Seconds }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} handshakeTimeout: {{ .Router.Wss.HandshakeTimeout.Seconds }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} readBufferSize: {{ .Router.Wss.ReadBufferSize }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} writeBufferSize: {{ .Router.Wss.WriteBufferSize }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} enableCompression: true
|
||||
{{ if not .Router.IsWss }}#{{ end }} enableCompression: {{ .Router.Wss.EnableCompression }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} server_cert: {{ .Router.IdentityServerCert }}
|
||||
{{ if not .Router.IsWss }}#{{ end }} key: {{ .Router.IdentityKey }}
|
||||
|
||||
forwarder:
|
||||
latencyProbeInterval: {{ .Router.Forwarder.LatencyProbeInterval }}
|
||||
latencyProbeInterval: {{ .Router.Forwarder.LatencyProbeInterval.Seconds }}
|
||||
xgressDialQueueLength: {{ .Router.Forwarder.XgressDialQueueLength }}
|
||||
xgressDialWorkerCount: {{ .Router.Forwarder.XgressDialWorkerCount }}
|
||||
linkDialQueueLength: {{ .Router.Forwarder.LinkDialQueueLength }}
|
||||
|
||||
@@ -17,12 +17,19 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/openziti/channel"
|
||||
edge "github.com/openziti/edge/controller"
|
||||
"github.com/openziti/fabric/controller"
|
||||
"github.com/openziti/fabric/router/forwarder"
|
||||
"github.com/openziti/fabric/xweb"
|
||||
"github.com/openziti/foundation/transport"
|
||||
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
|
||||
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
|
||||
"github.com/openziti/ziti/ziti/cmd/ziti/constants"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -51,46 +58,57 @@ type ConfigTemplateValues struct {
|
||||
}
|
||||
|
||||
type ControllerTemplateValues struct {
|
||||
Name string
|
||||
Port string
|
||||
AdvertisedAddress string
|
||||
ListenerAddress string
|
||||
IdentityCert string
|
||||
IdentityServerCert string
|
||||
IdentityKey string
|
||||
IdentityCA string
|
||||
EdgeIdentityDuration int
|
||||
EdgeRouterDuration int
|
||||
Edge EdgeControllerValues
|
||||
WebListener ControllerWebListenerValues
|
||||
HealthCheck ControllerHealthCheckValues
|
||||
Name string
|
||||
Port string
|
||||
AdvertisedAddress string
|
||||
ListenerAddress string
|
||||
IdentityCert string
|
||||
IdentityServerCert string
|
||||
IdentityKey string
|
||||
IdentityCA string
|
||||
MinQueuedConnects int
|
||||
MaxQueuedConnects int
|
||||
DefaultQueuedConnects int
|
||||
MinOutstandingConnects int
|
||||
MaxOutstandingConnects int
|
||||
DefaultOutstandingConnects int
|
||||
MinConnectTimeout time.Duration
|
||||
MaxConnectTimeout time.Duration
|
||||
DefaultConnectTimeout time.Duration
|
||||
EdgeIdentityDuration time.Duration
|
||||
EdgeRouterDuration time.Duration
|
||||
Edge EdgeControllerValues
|
||||
WebListener ControllerWebListenerValues
|
||||
HealthCheck ControllerHealthCheckValues
|
||||
}
|
||||
|
||||
type EdgeControllerValues struct {
|
||||
ZitiSigningCert string
|
||||
ZitiSigningKey string
|
||||
|
||||
APISessionTimeoutMinutes int
|
||||
ListenerHostPort string
|
||||
AdvertisedHostPort string
|
||||
IdentityCert string
|
||||
IdentityServerCert string
|
||||
IdentityKey string
|
||||
IdentityCA string
|
||||
APIActivityUpdateBatchSize int
|
||||
APIActivityUpdateInterval time.Duration
|
||||
APISessionTimeout time.Duration
|
||||
ListenerHostPort string
|
||||
AdvertisedHostPort string
|
||||
IdentityCert string
|
||||
IdentityServerCert string
|
||||
IdentityKey string
|
||||
IdentityCA string
|
||||
}
|
||||
|
||||
type ControllerWebListenerValues struct {
|
||||
IdleTimeoutMS int
|
||||
ReadTimeoutMS int
|
||||
WriteTimeoutMS int
|
||||
MinTLSVersion string
|
||||
MaxTLSVersion string
|
||||
IdleTimeout time.Duration
|
||||
ReadTimeout time.Duration
|
||||
WriteTimeout time.Duration
|
||||
MinTLSVersion string
|
||||
MaxTLSVersion string
|
||||
}
|
||||
|
||||
type ControllerHealthCheckValues struct {
|
||||
IntervalSec int
|
||||
TimeoutSec int
|
||||
InitialDelaySec int
|
||||
Interval time.Duration
|
||||
Timeout time.Duration
|
||||
InitialDelay time.Duration
|
||||
}
|
||||
|
||||
type RouterTemplateValues struct {
|
||||
@@ -114,18 +132,19 @@ type EdgeRouterTemplateValues struct {
|
||||
}
|
||||
|
||||
type WSSRouterTemplateValues struct {
|
||||
WriteTimeout int
|
||||
ReadTimeout int
|
||||
IdleTimeout int
|
||||
PongTimeout int
|
||||
PingInterval int
|
||||
HandshakeTimeout int
|
||||
ReadBufferSize int
|
||||
WriteBufferSize int
|
||||
WriteTimeout time.Duration
|
||||
ReadTimeout time.Duration
|
||||
IdleTimeout time.Duration
|
||||
PongTimeout time.Duration
|
||||
PingInterval time.Duration
|
||||
HandshakeTimeout time.Duration
|
||||
ReadBufferSize int
|
||||
WriteBufferSize int
|
||||
EnableCompression bool
|
||||
}
|
||||
|
||||
type RouterForwarderTemplateValues struct {
|
||||
LatencyProbeInterval int
|
||||
LatencyProbeInterval time.Duration
|
||||
XgressDialQueueLength int
|
||||
XgressDialWorkerCount int
|
||||
LinkDialQueueLength int
|
||||
@@ -133,10 +152,10 @@ type RouterForwarderTemplateValues struct {
|
||||
}
|
||||
|
||||
type RouterListenerTemplateValues struct {
|
||||
ConnectTimeoutMs int
|
||||
GetSessionTimeoutS int
|
||||
BindPort int
|
||||
OutQueueSize int
|
||||
ConnectTimeout time.Duration
|
||||
GetSessionTimeout time.Duration
|
||||
BindPort int
|
||||
OutQueueSize int
|
||||
}
|
||||
|
||||
var workingDir string
|
||||
@@ -234,33 +253,46 @@ func (data *ConfigTemplateValues) populateEnvVars() {
|
||||
|
||||
func (data *ConfigTemplateValues) populateDefaults() {
|
||||
data.Router.Listener.BindPort = constants.DefaultListenerBindPort
|
||||
data.Router.Listener.OutQueueSize = constants.DefaultOutQueueSize
|
||||
data.Router.Listener.ConnectTimeoutMs = constants.DefaultConnectTimeoutMs
|
||||
data.Router.Listener.GetSessionTimeoutS = constants.DefaultGetSessionTimeoutS
|
||||
data.Controller.Edge.APISessionTimeoutMinutes = constants.DefaultEdgeAPISessionTimeoutMinutes
|
||||
data.Controller.EdgeIdentityDuration = constants.DefaultEdgeIdentityDurationMinutes
|
||||
data.Controller.EdgeRouterDuration = constants.DefaultEdgeRouterDurationMinutes
|
||||
data.Controller.WebListener.IdleTimeoutMS = constants.DefaultWebListenerIdleTimeoutMs
|
||||
data.Controller.WebListener.ReadTimeoutMS = constants.DefaultWebListenerReadTimeoutMs
|
||||
data.Controller.WebListener.WriteTimeoutMS = constants.DefaultWebListenerWriteTimeoutMs
|
||||
data.Controller.WebListener.MinTLSVersion = constants.DefaultWebListenerMinTLSVersion
|
||||
data.Controller.WebListener.MaxTLSVersion = constants.DefaultWebListenerMaxTLSVersion
|
||||
data.Controller.HealthCheck.TimeoutSec = constants.DefaultControllerHealthCheckTimeoutSec
|
||||
data.Controller.HealthCheck.IntervalSec = constants.DefaultControllerHealthCheckIntervalSec
|
||||
data.Controller.HealthCheck.InitialDelaySec = constants.DefaultControllerHealthCheckDelaySec
|
||||
data.Router.Wss.WriteTimeout = constants.DefaultWSSWriteTimeout
|
||||
data.Router.Wss.ReadTimeout = constants.DefaultWSSReadTimeout
|
||||
data.Router.Wss.IdleTimeout = constants.DefaultWSSIdleTimeout
|
||||
data.Router.Wss.PongTimeout = constants.DefaultWSSPongTimeout
|
||||
data.Router.Wss.PingInterval = constants.DefaultWSSPingInterval
|
||||
data.Router.Wss.HandshakeTimeout = constants.DefaultWSSHandshakeTimeout
|
||||
data.Router.Wss.ReadBufferSize = constants.DefaultWSSReadBufferSize
|
||||
data.Router.Wss.WriteBufferSize = constants.DefaultWSSWriteBufferSize
|
||||
data.Router.Forwarder.LatencyProbeInterval = constants.DefaultLatencyProbeInterval
|
||||
data.Router.Forwarder.XgressDialQueueLength = constants.DefaultXgressDialQueueLength
|
||||
data.Router.Forwarder.XgressDialWorkerCount = constants.DefaultXgressDialWorkerCount
|
||||
data.Router.Forwarder.LinkDialQueueLength = constants.DefaultLinkDialQueueLength
|
||||
data.Router.Forwarder.LinkDialWorkerCount = constants.DefaultLinkDialWorkerCount
|
||||
data.Router.Listener.GetSessionTimeout = constants.DefaultGetSessionTimeout
|
||||
|
||||
data.Controller.MinQueuedConnects = channel.MinQueuedConnects
|
||||
data.Controller.MaxQueuedConnects = channel.MaxQueuedConnects
|
||||
data.Controller.DefaultQueuedConnects = channel.DefaultQueuedConnects
|
||||
data.Controller.MinOutstandingConnects = channel.MinOutstandingConnects
|
||||
data.Controller.MaxOutstandingConnects = channel.MaxOutstandingConnects
|
||||
data.Controller.DefaultOutstandingConnects = channel.DefaultOutstandingConnects
|
||||
data.Controller.MinConnectTimeout = channel.MinConnectTimeout
|
||||
data.Controller.MaxConnectTimeout = channel.MaxConnectTimeout
|
||||
data.Controller.DefaultConnectTimeout = channel.DefaultConnectTimeout
|
||||
data.Controller.HealthCheck.Timeout = controller.DefaultHealthChecksBoltCheckTimeout
|
||||
data.Controller.HealthCheck.Interval = controller.DefaultHealthChecksBoltCheckInterval
|
||||
data.Controller.HealthCheck.InitialDelay = controller.DefaultHealthChecksBoltCheckInitialDelay
|
||||
data.Controller.Edge.APIActivityUpdateBatchSize = edge.DefaultEdgeApiActivityUpdateBatchSize
|
||||
data.Controller.Edge.APIActivityUpdateInterval = edge.DefaultEdgeAPIActivityUpdateInterval
|
||||
data.Controller.Edge.APISessionTimeout = edge.DefaultEdgeSessionTimeout
|
||||
data.Controller.EdgeIdentityDuration = edge.DefaultEdgeEnrollmentDuration
|
||||
data.Controller.EdgeRouterDuration = edge.DefaultEdgeEnrollmentDuration
|
||||
data.Controller.WebListener.IdleTimeout = edge.DefaultHttpIdleTimeout
|
||||
data.Controller.WebListener.ReadTimeout = edge.DefaultHttpReadTimeout
|
||||
data.Controller.WebListener.WriteTimeout = edge.DefaultHttpWriteTimeout
|
||||
data.Controller.WebListener.MinTLSVersion = xweb.ReverseTlsVersionMap[xweb.MinTLSVersion]
|
||||
data.Controller.WebListener.MaxTLSVersion = xweb.ReverseTlsVersionMap[xweb.MaxTLSVersion]
|
||||
data.Router.Wss.WriteTimeout = transport.DefaultWsWriteTimeout
|
||||
data.Router.Wss.ReadTimeout = transport.DefaultWsReadTimeout
|
||||
data.Router.Wss.IdleTimeout = transport.DefaultWsIdleTimeout
|
||||
data.Router.Wss.PongTimeout = transport.DefaultWsPongTimeout
|
||||
data.Router.Wss.PingInterval = transport.DefaultWsPingInterval
|
||||
data.Router.Wss.HandshakeTimeout = transport.DefaultWsHandshakeTimeout
|
||||
data.Router.Wss.ReadBufferSize = transport.DefaultWsReadBufferSize
|
||||
data.Router.Wss.WriteBufferSize = transport.DefaultWsWriteBufferSize
|
||||
data.Router.Wss.EnableCompression = transport.DefaultWsEnableCompression
|
||||
data.Router.Forwarder.LatencyProbeInterval = forwarder.DefaultLatencyProbeInterval
|
||||
data.Router.Forwarder.XgressDialQueueLength = forwarder.DefaultXgressDialWorkerQueueLength
|
||||
data.Router.Forwarder.XgressDialWorkerCount = forwarder.DefaultXgressDialWorkerCount
|
||||
data.Router.Forwarder.LinkDialQueueLength = forwarder.DefaultLinkDialQueueLength
|
||||
data.Router.Forwarder.LinkDialWorkerCount = forwarder.DefaultLinkDialWorkerCount
|
||||
data.Router.Listener.OutQueueSize = channel.DefaultOutQueueSize
|
||||
data.Router.Listener.ConnectTimeout = channel.DefaultConnectTimeout
|
||||
}
|
||||
|
||||
func handleVariableError(err error, varName string) {
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package constants
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
ZITI = "ziti"
|
||||
ZITI_CONTROLLER = "ziti-controller"
|
||||
@@ -35,48 +37,16 @@ const (
|
||||
|
||||
// Config Template Constants
|
||||
const (
|
||||
DefaultListenerBindPort = 10080
|
||||
DefaultOutQueueSize = 16
|
||||
DefaultConnectTimeoutMs = 5000
|
||||
DefaultGetSessionTimeoutS = 60
|
||||
DefaultListenerBindPort = 10080
|
||||
DefaultGetSessionTimeout = 60 * time.Second
|
||||
|
||||
// Router defaults
|
||||
DefaultZitiEdgeRouterPort = "3022"
|
||||
|
||||
// Controller defaults
|
||||
DefaultZitiControllerName = "controller"
|
||||
DefaultEdgeAPISessionTimeoutMinutes = 30
|
||||
DefaultWebListenerIdleTimeoutMs = 5000
|
||||
DefaultWebListenerReadTimeoutMs = 5000
|
||||
DefaultWebListenerWriteTimeoutMs = 100000
|
||||
DefaultWebListenerMinTLSVersion = "TLS1.2"
|
||||
DefaultWebListenerMaxTLSVersion = "TLS1.3"
|
||||
DefaultZitiEdgeAPIPort = "1280"
|
||||
DefaultZitiEdgeListenerHostPort = "0.0.0.0:1280"
|
||||
DefaultZitiControllerListenerAddress = "0.0.0.0"
|
||||
DefaultZitiControllerPort = "6262"
|
||||
DefaultControllerHealthCheckIntervalSec = 30
|
||||
DefaultControllerHealthCheckTimeoutSec = 15
|
||||
DefaultControllerHealthCheckDelaySec = 15
|
||||
DefaultEdgeIdentityDurationMinutes = 14400
|
||||
DefaultEdgeRouterDurationMinutes = 14400
|
||||
|
||||
// WSS defaults
|
||||
DefaultWSSWriteTimeout = 10
|
||||
DefaultWSSReadTimeout = 5
|
||||
DefaultWSSIdleTimeout = 5
|
||||
DefaultWSSPongTimeout = 60
|
||||
DefaultWSSPingInterval = 54
|
||||
DefaultWSSHandshakeTimeout = 10
|
||||
DefaultWSSReadBufferSize = 4096
|
||||
DefaultWSSWriteBufferSize = 4096
|
||||
|
||||
// Forwarder defaults
|
||||
DefaultLatencyProbeInterval = 1000
|
||||
DefaultXgressDialQueueLength = 1000
|
||||
DefaultXgressDialWorkerCount = 128
|
||||
DefaultLinkDialQueueLength = 1000
|
||||
DefaultLinkDialWorkerCount = 10
|
||||
DefaultZitiControllerName = "controller"
|
||||
DefaultZitiEdgeAPIPort = "1280"
|
||||
DefaultZitiEdgeListenerHostPort = "0.0.0.0:1280"
|
||||
DefaultZitiControllerListenerAddress = "0.0.0.0"
|
||||
DefaultZitiControllerPort = "6262"
|
||||
)
|
||||
|
||||
// Env Var Constants
|
||||
|
||||
Reference in New Issue
Block a user