Skip to content

Commit 16b6016

Browse files
committed
lint
Signed-off-by: Jenny Shu <[email protected]>
1 parent 9c7b0ec commit 16b6016

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/kgateway/extensions2/plugins/destrule/destrule_plugin.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,20 +131,20 @@ func (d *destrulePlugin) processBackend(kctx krt.HandlerContext, ctx context.Con
131131
// Translate TCP keepalive settings
132132
if tcpSettings := trafficPolicy.GetConnectionPool().GetTcp(); tcpSettings != nil {
133133
if tcpKeepalive := tcpSettings.GetTcpKeepalive(); tcpKeepalive != nil {
134-
if outCluster.UpstreamConnectionOptions == nil {
134+
if outCluster.GetUpstreamConnectionOptions() == nil {
135135
outCluster.UpstreamConnectionOptions = &envoy_config_cluster_v3.UpstreamConnectionOptions{}
136136
}
137-
if outCluster.UpstreamConnectionOptions.TcpKeepalive == nil {
138-
outCluster.UpstreamConnectionOptions.TcpKeepalive = &envoy_config_core_v3.TcpKeepalive{}
137+
if outCluster.GetUpstreamConnectionOptions().GetTcpKeepalive() == nil {
138+
outCluster.GetUpstreamConnectionOptions().TcpKeepalive = &envoy_config_core_v3.TcpKeepalive{}
139139
}
140140
if tcpKeepalive.GetTime() != nil {
141-
outCluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveTime = &wrapperspb.UInt32Value{Value: uint32(tcpKeepalive.GetTime().GetSeconds())}
141+
outCluster.GetUpstreamConnectionOptions().GetTcpKeepalive().KeepaliveTime = &wrapperspb.UInt32Value{Value: uint32(tcpKeepalive.GetTime().GetSeconds())}
142142
}
143143
if tcpKeepalive.GetInterval() != nil {
144-
outCluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveInterval = &wrapperspb.UInt32Value{Value: uint32(tcpKeepalive.GetInterval().GetSeconds())}
144+
outCluster.GetUpstreamConnectionOptions().GetTcpKeepalive().KeepaliveInterval = &wrapperspb.UInt32Value{Value: uint32(tcpKeepalive.GetInterval().GetSeconds())}
145145
}
146146
if tcpKeepalive.GetProbes() > 0 {
147-
outCluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveProbes = &wrapperspb.UInt32Value{Value: uint32(tcpKeepalive.GetProbes())}
147+
outCluster.GetUpstreamConnectionOptions().GetTcpKeepalive().KeepaliveProbes = &wrapperspb.UInt32Value{Value: uint32(tcpKeepalive.GetProbes())}
148148
}
149149
}
150150
}

0 commit comments

Comments
 (0)