merging latest into fix-missing-config-values

This commit is contained in:
gberl002
2022-03-04 10:29:54 -05:00
11 changed files with 193 additions and 177 deletions
+9
View File
@@ -1,3 +1,12 @@
# Release 0.24.13
* Bug fix: Fixed an issue with the ziti CLI quickstart routine which also affected router and controller config generation leaving many config fields blank or incorrect.
# Release 0.24.12
* Enhancement: Allow xgress proxy configuration in router config to accept service id or service name
* Build: Docker build process fixes
# Release 0.24.11
* Bug fix: Fix ziti CLI env. Config was getting set to current directory, instead of defaulting to under $HOME
+7 -5
View File
@@ -4,6 +4,8 @@ go 1.17
//replace github.com/openziti/foundation => ../foundation
//replace github.com/openziti/channel => ../channel
//replace github.com/openziti/dilithium => ../dilithium
//replace github.com/openziti/fabric => ../fabric
@@ -33,11 +35,9 @@ require (
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
github.com/michaelquigley/pfxlog v0.6.3
github.com/openziti/channel v0.18.6
github.com/openziti/edge v0.21.102
github.com/openziti/fabric v0.17.49
github.com/openziti/foundation v0.17.5
github.com/openziti/sdk-golang v0.16.8
github.com/openziti/channel v0.18.11
github.com/openziti/foundation v0.17.7
github.com/openziti/sdk-golang v0.16.14
github.com/pborman/uuid v1.2.0
github.com/pkg/errors v0.9.1
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
@@ -172,5 +172,7 @@ require (
require (
github.com/jedib0t/go-pretty/v6 v6.2.4
github.com/openziti/edge v0.21.115
github.com/openziti/fabric v0.17.57
github.com/rivo/uniseg v0.2.0 // indirect
)
+14 -11
View File
@@ -600,7 +600,7 @@ github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhK
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/influxdata/influxdb-client-go/v2 v2.2.2/go.mod h1:fa/d1lAdUHxuc1jedx30ZfNG573oQTQmUni3N6pcW+0=
github.com/influxdata/influxdb-client-go/v2 v2.7.0/go.mod h1:Y/0W1+TZir7ypoQZYd2IrnVOKB3Tq6oegAQeSVN/+EU=
github.com/influxdata/influxdb-client-go/v2 v2.8.0/go.mod h1:x7Jo5UHHl+w8wu8UnGiNobDDHygojXwJX4mx7rXGKMk=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
@@ -818,19 +818,22 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/openziti/channel v0.18.6 h1:bakFjlNFfg5cuAMufQcBQ4XOz/ulWb0n5Hc/GMA05No=
github.com/openziti/channel v0.18.6/go.mod h1:pjoD6e9QgDGnaiakRA+s8YT/FzUHWDhJJF573oOJkXg=
github.com/openziti/channel v0.18.9/go.mod h1:pjoD6e9QgDGnaiakRA+s8YT/FzUHWDhJJF573oOJkXg=
github.com/openziti/channel v0.18.11 h1:zT2zRI6m/POr81dXmM8azLpcCjysgeuVPppztl25Zc0=
github.com/openziti/channel v0.18.11/go.mod h1:9z2HLdoYZ3RYm9S8XqlQB5spf3j+BLPof0A1zvjLyzc=
github.com/openziti/dilithium v0.3.3 h1:PLgQ6PMNLSTzCFbX/h98cmudgz/cU6TmjdSv5NAPD8k=
github.com/openziti/dilithium v0.3.3/go.mod h1:vsCjI2AU/hon9e+dLhUFbCNGesJDj2ASgkySOcpmvjo=
github.com/openziti/edge v0.21.102 h1:0ncIsi8fqjg52n7W5EoAtVWZhqt3NBEtcehvEqsEtpA=
github.com/openziti/edge v0.21.102/go.mod h1:A43aqLR7WvM5C338sTzXTJ5XfcrxpyByHofz7fs8PU0=
github.com/openziti/fabric v0.17.49 h1:GNyKs11G29TFpOrRsbMVbprU6MPhsriWLR3mOogTJ/c=
github.com/openziti/fabric v0.17.49/go.mod h1:HmXBDpElPJ8PkD9UbIm6kzhoA70OnXmqXTbq8MmppSk=
github.com/openziti/edge v0.21.115 h1:sIxlCCUEfXgOpUikmd6Ya3Hsn1fhMXaFznkNeUF+OPQ=
github.com/openziti/edge v0.21.115/go.mod h1:2gb49/wivJSAnQwRCC8rAkQ0+3lWjwUgo/Kb7+0WJpM=
github.com/openziti/fabric v0.17.54/go.mod h1:o206EkKYBOoQvDKsFj07rlHI+za6yMpxUXyWj2XVrw0=
github.com/openziti/fabric v0.17.57 h1:mCo89KoEH1oaHeo0lc3p0x3A8G6/LsSiPTpd7NKvND0=
github.com/openziti/fabric v0.17.57/go.mod h1:nPHmXHx1MxgS2LlsjIWrWqq4B92OyPGtsLCdV3GBlXw=
github.com/openziti/foundation v0.17.1/go.mod h1:qzctNeCrOrPDQDr9g70IPHw+awal87qPqRe3UJLwNXw=
github.com/openziti/foundation v0.17.5 h1:OVmlpWQHPoCiRPSgXzexW2yJI74/5Y0a8/T/oWjb7MQ=
github.com/openziti/foundation v0.17.5/go.mod h1:dTaJgdO5OqnKpV+0OPHpnTnqfPpqNGbhJv8O6pMot6o=
github.com/openziti/sdk-golang v0.16.8 h1:pVExmhcIwPc9pFDIpIQYP26RvlFpmhxVPf+LKWz5NO4=
github.com/openziti/sdk-golang v0.16.8/go.mod h1:gWIB38lK7Nnpj3xdUf3rqj9LG23hviYwlkDQfJBU8m4=
github.com/openziti/foundation v0.17.6/go.mod h1:dTaJgdO5OqnKpV+0OPHpnTnqfPpqNGbhJv8O6pMot6o=
github.com/openziti/foundation v0.17.7 h1:lnP+4e78Vmfu/iL1seKqurCiroYWi0Ae0SQEcM7b36A=
github.com/openziti/foundation v0.17.7/go.mod h1:dTaJgdO5OqnKpV+0OPHpnTnqfPpqNGbhJv8O6pMot6o=
github.com/openziti/sdk-golang v0.16.14 h1:PIjHRwQqKcclfJYVjEUnnri2PM9wCAEBLwFhwQ6FSJ4=
github.com/openziti/sdk-golang v0.16.14/go.mod h1:s8T8XNGGCeEeMhtCf5iUi2t97FqoslE6t1TTEbCVfPU=
github.com/oracle/oci-go-sdk v24.2.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/orcaman/concurrent-map v0.0.0-20210106121528-16402b402231 h1:fa50YL1pzKW+1SsBnJDOHppJN9stOEwS+CRWyUtyYGU=
@@ -20,8 +20,8 @@ import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/channel/trace/pb"
"github.com/openziti/fabric/pb/mgmt_pb"
trace_pb "github.com/openziti/foundation/trace/pb"
"github.com/spf13/cobra"
"time"
)
+1 -1
View File
@@ -21,10 +21,10 @@ import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/channel"
"github.com/openziti/channel/trace/pb"
"github.com/openziti/fabric/pb/ctrl_pb"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/fabric/router/xgress"
"github.com/openziti/foundation/trace/pb"
"github.com/spf13/cobra"
"reflect"
"sort"
+2 -2
View File
@@ -21,8 +21,8 @@ import (
"errors"
"fmt"
"github.com/openziti/channel"
"github.com/openziti/foundation/trace"
"github.com/openziti/foundation/trace/pb"
"github.com/openziti/channel/trace"
"github.com/openziti/channel/trace/pb"
"github.com/openziti/ziti/ziti-fabric/subcmd"
"github.com/spf13/cobra"
)
+5 -5
View File
@@ -17,10 +17,10 @@
package trace
import (
"github.com/openziti/foundation/trace"
"github.com/openziti/foundation/trace/pb"
"errors"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/channel/trace"
"github.com/openziti/channel/trace/pb"
"github.com/spf13/cobra"
"os"
"sort"
@@ -74,10 +74,10 @@ func merge(cmd *cobra.Command, args []string) {
type mergeItem struct {
timestamp int64
msg interface{}
msg interface{}
}
type mergeHandler struct{
type mergeHandler struct {
items []*mergeItem
}
@@ -94,4 +94,4 @@ func (h *mergeHandler) Handle(msg interface{}) error {
}
return nil
}
}
@@ -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 }}
+10 -10
View File
@@ -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 }}
+100 -68
View File
@@ -17,12 +17,19 @@
package cmd
import (
"github.com/openziti/channel"
edge "github.com/openziti/edge/controller/config"
fabCtrl "github.com/openziti/fabric/controller"
fabForwarder "github.com/openziti/fabric/router/forwarder"
fabXweb "github.com/openziti/fabric/xweb"
foundation "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
@@ -230,33 +249,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 = fabCtrl.DefaultHealthChecksBoltCheckTimeout
data.Controller.HealthCheck.Interval = fabCtrl.DefaultHealthChecksBoltCheckInterval
data.Controller.HealthCheck.InitialDelay = fabCtrl.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 = fabXweb.ReverseTlsVersionMap[fabXweb.MinTLSVersion]
data.Controller.WebListener.MaxTLSVersion = fabXweb.ReverseTlsVersionMap[fabXweb.MaxTLSVersion]
data.Router.Wss.WriteTimeout = foundation.DefaultWsWriteTimeout
data.Router.Wss.ReadTimeout = foundation.DefaultWsReadTimeout
data.Router.Wss.IdleTimeout = foundation.DefaultWsIdleTimeout
data.Router.Wss.PongTimeout = foundation.DefaultWsPongTimeout
data.Router.Wss.PingInterval = foundation.DefaultWsPingInterval
data.Router.Wss.HandshakeTimeout = foundation.DefaultWsHandshakeTimeout
data.Router.Wss.ReadBufferSize = foundation.DefaultWsReadBufferSize
data.Router.Wss.WriteBufferSize = foundation.DefaultWsWriteBufferSize
data.Router.Wss.EnableCompression = foundation.DefaultWsEnableCompression
data.Router.Forwarder.LatencyProbeInterval = fabForwarder.DefaultLatencyProbeInterval
data.Router.Forwarder.XgressDialQueueLength = fabForwarder.DefaultXgressDialWorkerQueueLength
data.Router.Forwarder.XgressDialWorkerCount = fabForwarder.DefaultXgressDialWorkerCount
data.Router.Forwarder.LinkDialQueueLength = fabForwarder.DefaultLinkDialQueueLength
data.Router.Forwarder.LinkDialWorkerCount = fabForwarder.DefaultLinkDialWorkerCount
data.Router.Listener.OutQueueSize = channel.DefaultOutQueueSize
data.Router.Listener.ConnectTimeout = channel.DefaultConnectTimeout
}
func handleVariableError(err error, varName string) {
+9 -39
View File
@@ -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