diff --git a/pkg/apis/gloo/gloo/v1/types.go b/pkg/apis/gloo/gloo/v1/types.go index 3593614c3..d181972d0 100644 --- a/pkg/apis/gloo/gloo/v1/types.go +++ b/pkg/apis/gloo/gloo/v1/types.go @@ -91,23 +91,23 @@ type CircuitBreakerConfig struct { type ConnectionConfig struct { MaxRequestsPerConnection uint32 `json:"maxRequestsPerConnection,omitempty"` - ConnectTimeout *Duration `json:"connectTimeout,omitempty"` + ConnectTimeout string `json:"connectTimeout,omitempty"` TcpKeepalive *ConnectionConfig_TcpKeepAlive `json:"tcpKeepalive,omitempty"` PerConnectionBufferLimitBytes uint32 `json:"perConnectionBufferLimitBytes,omitempty"` CommonHttpProtocolOptions *ConnectionConfig_HttpProtocolOptions `json:"commonHttpProtocolOptions,omitempty"` } type ConnectionConfig_TcpKeepAlive struct { - KeepaliveProbes uint32 `json:"keepaliveProbes,omitempty"` - KeepaliveTime *Duration `json:"keepaliveTime,omitempty"` - KeepaliveInterval *Duration `json:"keepaliveInterval,omitempty"` + KeepaliveProbes uint32 `json:"keepaliveProbes,omitempty"` + KeepaliveTime string `json:"keepaliveTime,omitempty"` + KeepaliveInterval string `json:"keepaliveInterval,omitempty"` } type ConnectionConfig_HttpProtocolOptions struct { - IdleTimeout *Duration `json:"idleTimeout,omitempty"` - MaxHeadersCount uint32 `json:"maxHeadersCount,omitempty"` - MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` - HeadersWithUnderscoresAction uint32 `json:"headersWithUnderscoresAction,omitempty"` + IdleTimeout string `json:"idleTimeout,omitempty"` + MaxHeadersCount uint32 `json:"maxHeadersCount,omitempty"` + MaxStreamDuration string `json:"maxStreamDuration,omitempty"` + HeadersWithUnderscoresAction uint32 `json:"headersWithUnderscoresAction,omitempty"` } type LoadBalancerConfig struct { @@ -130,11 +130,6 @@ type SlowStartConfig struct { MinWeightPercent float64 `json:"minWeightPercent,omitempty"` } -type Duration struct { - Seconds int64 `json:"seconds,omitempty"` - Nanos int32 `json:"nanos,omitempty"` -} - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // UpstreamList is a list of Upstream resources diff --git a/pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go b/pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go index d21a30601..9a5d75865 100644 --- a/pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go +++ b/pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go @@ -82,20 +82,15 @@ func (in *CircuitBreakerConfig) DeepCopy() *CircuitBreakerConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConnectionConfig) DeepCopyInto(out *ConnectionConfig) { *out = *in - if in.ConnectTimeout != nil { - in, out := &in.ConnectTimeout, &out.ConnectTimeout - *out = new(Duration) - **out = **in - } if in.TcpKeepalive != nil { in, out := &in.TcpKeepalive, &out.TcpKeepalive *out = new(ConnectionConfig_TcpKeepAlive) - (*in).DeepCopyInto(*out) + **out = **in } if in.CommonHttpProtocolOptions != nil { in, out := &in.CommonHttpProtocolOptions, &out.CommonHttpProtocolOptions *out = new(ConnectionConfig_HttpProtocolOptions) - (*in).DeepCopyInto(*out) + **out = **in } return } @@ -113,16 +108,6 @@ func (in *ConnectionConfig) DeepCopy() *ConnectionConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConnectionConfig_HttpProtocolOptions) DeepCopyInto(out *ConnectionConfig_HttpProtocolOptions) { *out = *in - if in.IdleTimeout != nil { - in, out := &in.IdleTimeout, &out.IdleTimeout - *out = new(Duration) - **out = **in - } - if in.MaxStreamDuration != nil { - in, out := &in.MaxStreamDuration, &out.MaxStreamDuration - *out = new(Duration) - **out = **in - } return } @@ -139,16 +124,6 @@ func (in *ConnectionConfig_HttpProtocolOptions) DeepCopy() *ConnectionConfig_Htt // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConnectionConfig_TcpKeepAlive) DeepCopyInto(out *ConnectionConfig_TcpKeepAlive) { *out = *in - if in.KeepaliveTime != nil { - in, out := &in.KeepaliveTime, &out.KeepaliveTime - *out = new(Duration) - **out = **in - } - if in.KeepaliveInterval != nil { - in, out := &in.KeepaliveInterval, &out.KeepaliveInterval - *out = new(Duration) - **out = **in - } return } @@ -162,22 +137,6 @@ func (in *ConnectionConfig_TcpKeepAlive) DeepCopy() *ConnectionConfig_TcpKeepAli return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Duration) DeepCopyInto(out *Duration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration. -func (in *Duration) DeepCopy() *Duration { - if in == nil { - return nil - } - out := new(Duration) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeUpstream) DeepCopyInto(out *KubeUpstream) { *out = *in diff --git a/test/gloo/test-canary.sh b/test/gloo/test-canary.sh index ba14569d2..f3afd257b 100755 --- a/test/gloo/test-canary.sh +++ b/test/gloo/test-canary.sh @@ -39,6 +39,7 @@ spec: - addr: "example.com" port: 80 connectionConfig: + connectTimeout: 2s maxRequestsPerConnection: 51 loadBalancerConfig: roundRobin: @@ -221,4 +222,4 @@ echo '✔ A/B testing promotion test passed' kubectl -n gloo-system logs deployment/flagger -echo '✔ All tests passed' \ No newline at end of file +echo '✔ All tests passed'