Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Gloo Duration type to string #1524

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions pkg/apis/gloo/gloo/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
45 changes: 2 additions & 43 deletions pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion test/gloo/test-canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ spec:
- addr: "example.com"
port: 80
connectionConfig:
connectTimeout: 2s
maxRequestsPerConnection: 51
loadBalancerConfig:
roundRobin:
Expand Down Expand Up @@ -221,4 +222,4 @@ echo '✔ A/B testing promotion test passed'

kubectl -n gloo-system logs deployment/flagger

echo '✔ All tests passed'
echo '✔ All tests passed'
Loading