Skip to content

Commit cb59a3e

Browse files
authored
Merge pull request #4156 from shuqz/main
[feat:gw-api] add support for ServiceExternalTrafficPolicyLocal
2 parents 1824e8e + 0cf0570 commit cb59a3e

File tree

2 files changed

+123
-56
lines changed

2 files changed

+123
-56
lines changed

pkg/gateway/model/model_build_target_group.go

Lines changed: 68 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ type targetGroupBuilderImpl struct {
5353
defaultHealthyThresholdCount int32
5454
defaultHealthCheckTimeout int32
5555
defaultHealthCheckInterval int32
56+
57+
// Default health check settings for NLB instance mode with spec.ExternalTrafficPolicy set to Local
58+
defaultHealthCheckProtocolForInstanceModeLocal elbv2model.Protocol
59+
defaultHealthCheckPathForInstanceModeLocal string
60+
defaultHealthCheckIntervalForInstanceModeLocal int32
61+
defaultHealthCheckTimeoutForInstanceModeLocal int32
62+
defaultHealthCheckHealthyThresholdForInstanceModeLocal int32
63+
defaultHealthCheckUnhealthyThresholdForInstanceModeLocal int32
5664
}
5765

5866
func newTargetGroupBuilder(clusterName string, vpcId string, tagHelper tagHelper, loadBalancerType elbv2model.LoadBalancerType, disableRestrictedSGRules bool, defaultTargetType string) targetGroupBuilder {
@@ -71,6 +79,13 @@ func newTargetGroupBuilder(clusterName string, vpcId string, tagHelper tagHelper
7179
defaultHealthyThresholdCount: 3,
7280
defaultHealthCheckTimeout: 5,
7381
defaultHealthCheckInterval: 15,
82+
83+
defaultHealthCheckProtocolForInstanceModeLocal: elbv2model.ProtocolHTTP,
84+
defaultHealthCheckPathForInstanceModeLocal: "/healthz",
85+
defaultHealthCheckIntervalForInstanceModeLocal: 10,
86+
defaultHealthCheckTimeoutForInstanceModeLocal: 6,
87+
defaultHealthCheckHealthyThresholdForInstanceModeLocal: 2,
88+
defaultHealthCheckUnhealthyThresholdForInstanceModeLocal: 2,
7489
}
7590
}
7691

@@ -425,21 +440,25 @@ func (builder *targetGroupBuilderImpl) buildTargetGroupProtocolVersion(targetGro
425440
}
426441

427442
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckConfig(targetGroupProps *elbv2gw.TargetGroupProps, tgProtocol elbv2model.Protocol, tgProtocolVersion *elbv2model.ProtocolVersion, targetType elbv2model.TargetType, backend routeutils.Backend) (elbv2model.TargetGroupHealthCheckConfig, error) {
428-
// For my notes, when translating from svc to gateway:
429-
// https://github.com/kubernetes-sigs/gateway-api/issues/451
430-
// Gateway API doesn't have the same ServiceExternalTrafficPolicyLocal support.
431-
// TODO - Maybe a TargetGroupConfig attribute to support the same behavior?
432-
healthCheckPort, err := builder.buildTargetGroupHealthCheckPort(targetGroupProps, targetType, backend.Service)
443+
// add ServiceExternalTrafficPolicyLocal support
444+
var isServiceExternalTrafficPolicyTypeLocal = false
445+
if targetType == elbv2model.TargetTypeInstance &&
446+
backend.Service.Spec.ExternalTrafficPolicy == corev1.ServiceExternalTrafficPolicyTypeLocal &&
447+
builder.loadBalancerType == elbv2model.LoadBalancerTypeNetwork {
448+
isServiceExternalTrafficPolicyTypeLocal = true
449+
}
450+
healthCheckPort, err := builder.buildTargetGroupHealthCheckPort(targetGroupProps, targetType, backend.Service, isServiceExternalTrafficPolicyTypeLocal)
433451
if err != nil {
434452
return elbv2model.TargetGroupHealthCheckConfig{}, err
435453
}
436-
healthCheckProtocol := builder.buildTargetGroupHealthCheckProtocol(targetGroupProps, tgProtocol)
437-
healthCheckPath := builder.buildTargetGroupHealthCheckPath(targetGroupProps, tgProtocolVersion, healthCheckProtocol)
438-
healthCheckMatcher := builder.buildTargetGroupHealthCheckMatcher(targetGroupProps, tgProtocolVersion, healthCheckProtocol)
439-
healthCheckIntervalSeconds := builder.buildTargetGroupHealthCheckIntervalSeconds(targetGroupProps)
440-
healthCheckTimeoutSeconds := builder.buildTargetGroupHealthCheckTimeoutSeconds(targetGroupProps)
441-
healthCheckHealthyThresholdCount := builder.buildTargetGroupHealthCheckHealthyThresholdCount(targetGroupProps)
442-
healthCheckUnhealthyThresholdCount := builder.buildTargetGroupHealthCheckUnhealthyThresholdCount(targetGroupProps)
454+
healthCheckProtocol := builder.buildTargetGroupHealthCheckProtocol(targetGroupProps, tgProtocol, isServiceExternalTrafficPolicyTypeLocal) //
455+
healthCheckPath := builder.buildTargetGroupHealthCheckPath(targetGroupProps, tgProtocolVersion, healthCheckProtocol, isServiceExternalTrafficPolicyTypeLocal) //
456+
457+
healthCheckMatcher := builder.buildTargetGroupHealthCheckMatcher(targetGroupProps, tgProtocolVersion, healthCheckProtocol) //
458+
healthCheckIntervalSeconds := builder.buildTargetGroupHealthCheckIntervalSeconds(targetGroupProps, isServiceExternalTrafficPolicyTypeLocal) //
459+
healthCheckTimeoutSeconds := builder.buildTargetGroupHealthCheckTimeoutSeconds(targetGroupProps, isServiceExternalTrafficPolicyTypeLocal) //
460+
healthCheckHealthyThresholdCount := builder.buildTargetGroupHealthCheckHealthyThresholdCount(targetGroupProps, isServiceExternalTrafficPolicyTypeLocal) //
461+
healthCheckUnhealthyThresholdCount := builder.buildTargetGroupHealthCheckUnhealthyThresholdCount(targetGroupProps, isServiceExternalTrafficPolicyTypeLocal) //
443462
hcConfig := elbv2model.TargetGroupHealthCheckConfig{
444463
Port: &healthCheckPort,
445464
Protocol: healthCheckProtocol,
@@ -454,9 +473,14 @@ func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckConfig(targetG
454473
return hcConfig, nil
455474
}
456475

457-
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckPort(targetGroupProps *elbv2gw.TargetGroupProps, targetType elbv2model.TargetType, svc *corev1.Service) (intstr.IntOrString, error) {
476+
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckPort(targetGroupProps *elbv2gw.TargetGroupProps, targetType elbv2model.TargetType, svc *corev1.Service, isServiceExternalTrafficPolicyTypeLocal bool) (intstr.IntOrString, error) {
458477

459478
portConfigNotExist := targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.HealthCheckPort == nil
479+
480+
if portConfigNotExist && isServiceExternalTrafficPolicyTypeLocal {
481+
return intstr.FromInt32(svc.Spec.HealthCheckNodePort), nil
482+
}
483+
460484
if portConfigNotExist || *targetGroupProps.HealthCheckConfig.HealthCheckPort == shared_constants.HealthCheckPortTrafficPort {
461485
return intstr.FromString(shared_constants.HealthCheckPortTrafficPort), nil
462486
}
@@ -480,10 +504,13 @@ func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckPort(targetGro
480504
return intstr.IntOrString{}, errors.New("cannot use named healthCheckPort for IP TargetType when service's targetPort is a named port")
481505
}
482506

483-
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckProtocol(targetGroupProps *elbv2gw.TargetGroupProps, tgProtocol elbv2model.Protocol) elbv2model.Protocol {
507+
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckProtocol(targetGroupProps *elbv2gw.TargetGroupProps, tgProtocol elbv2model.Protocol, isServiceExternalTrafficPolicyTypeLocal bool) elbv2model.Protocol {
484508

485509
if targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.HealthCheckProtocol == nil {
486510
if builder.loadBalancerType == elbv2model.LoadBalancerTypeNetwork {
511+
if isServiceExternalTrafficPolicyTypeLocal {
512+
return builder.defaultHealthCheckProtocolForInstanceModeLocal
513+
}
487514
return elbv2model.ProtocolTCP
488515
}
489516
return tgProtocol
@@ -502,7 +529,7 @@ func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckProtocol(targe
502529
}
503530
}
504531

505-
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckPath(targetGroupProps *elbv2gw.TargetGroupProps, tgProtocolVersion *elbv2model.ProtocolVersion, hcProtocol elbv2model.Protocol) *string {
532+
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckPath(targetGroupProps *elbv2gw.TargetGroupProps, tgProtocolVersion *elbv2model.ProtocolVersion, hcProtocol elbv2model.Protocol, isServiceExternalTrafficPolicyTypeLocal bool) *string {
506533
if hcProtocol == elbv2model.ProtocolTCP {
507534
return nil
508535
}
@@ -515,6 +542,12 @@ func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckPath(targetGro
515542
return &builder.defaultHealthCheckPathGRPC
516543
}
517544

545+
if targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.HealthCheckPath == nil {
546+
if builder.loadBalancerType == elbv2model.LoadBalancerTypeNetwork && isServiceExternalTrafficPolicyTypeLocal {
547+
return &builder.defaultHealthCheckPathForInstanceModeLocal
548+
}
549+
}
550+
518551
return &builder.defaultHealthCheckPathHTTP
519552
}
520553

@@ -544,30 +577,42 @@ func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckMatcher(target
544577
}
545578
}
546579

547-
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckIntervalSeconds(targetGroupProps *elbv2gw.TargetGroupProps) int32 {
580+
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckIntervalSeconds(targetGroupProps *elbv2gw.TargetGroupProps, isServiceExternalTrafficPolicyTypeLocal bool) int32 {
548581
if targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.HealthCheckInterval == nil {
549-
return builder.defaultHealthCheckInterval
582+
return map[bool]int32{
583+
true: builder.defaultHealthCheckIntervalForInstanceModeLocal,
584+
false: builder.defaultHealthCheckInterval,
585+
}[isServiceExternalTrafficPolicyTypeLocal]
550586
}
551587
return *targetGroupProps.HealthCheckConfig.HealthCheckInterval
552588
}
553589

554-
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckTimeoutSeconds(targetGroupProps *elbv2gw.TargetGroupProps) int32 {
590+
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckTimeoutSeconds(targetGroupProps *elbv2gw.TargetGroupProps, isServiceExternalTrafficPolicyTypeLocal bool) int32 {
555591
if targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.HealthCheckTimeout == nil {
556-
return builder.defaultHealthCheckTimeout
592+
return map[bool]int32{
593+
true: builder.defaultHealthCheckTimeoutForInstanceModeLocal,
594+
false: builder.defaultHealthCheckTimeout,
595+
}[isServiceExternalTrafficPolicyTypeLocal]
557596
}
558597
return *targetGroupProps.HealthCheckConfig.HealthCheckTimeout
559598
}
560599

561-
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckHealthyThresholdCount(targetGroupProps *elbv2gw.TargetGroupProps) int32 {
600+
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckHealthyThresholdCount(targetGroupProps *elbv2gw.TargetGroupProps, isServiceExternalTrafficPolicyTypeLocal bool) int32 {
562601
if targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.HealthyThresholdCount == nil {
563-
return builder.defaultHealthyThresholdCount
602+
return map[bool]int32{
603+
true: builder.defaultHealthCheckHealthyThresholdForInstanceModeLocal,
604+
false: builder.defaultHealthyThresholdCount,
605+
}[isServiceExternalTrafficPolicyTypeLocal]
564606
}
565607
return *targetGroupProps.HealthCheckConfig.HealthyThresholdCount
566608
}
567609

568-
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckUnhealthyThresholdCount(targetGroupProps *elbv2gw.TargetGroupProps) int32 {
610+
func (builder *targetGroupBuilderImpl) buildTargetGroupHealthCheckUnhealthyThresholdCount(targetGroupProps *elbv2gw.TargetGroupProps, isServiceExternalTrafficPolicyTypeLocal bool) int32 {
569611
if targetGroupProps == nil || targetGroupProps.HealthCheckConfig == nil || targetGroupProps.HealthCheckConfig.UnhealthyThresholdCount == nil {
570-
return builder.defaultHealthCheckUnhealthyThresholdCount
612+
return map[bool]int32{
613+
true: builder.defaultHealthCheckUnhealthyThresholdForInstanceModeLocal,
614+
false: builder.defaultHealthCheckUnhealthyThresholdCount,
615+
}[isServiceExternalTrafficPolicyTypeLocal]
571616
}
572617
return *targetGroupProps.HealthCheckConfig.UnhealthyThresholdCount
573618
}

pkg/gateway/model/model_build_target_group_test.go

Lines changed: 55 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,31 +1201,36 @@ func Test_buildTargetGroupProtocolVersion(t *testing.T) {
12011201

12021202
func Test_buildTargetGroupHealthCheckPort(t *testing.T) {
12031203
testCases := []struct {
1204-
name string
1205-
targetGroupProps *elbv2gw.TargetGroupProps
1206-
targetType elbv2model.TargetType
1207-
svc *corev1.Service
1208-
expected intstr.IntOrString
1209-
expectErr bool
1204+
name string
1205+
isServiceExternalTrafficPolicyTypeLocal bool
1206+
targetGroupProps *elbv2gw.TargetGroupProps
1207+
targetType elbv2model.TargetType
1208+
svc *corev1.Service
1209+
expected intstr.IntOrString
1210+
expectErr bool
12101211
}{
12111212
{
1212-
name: "nil props",
1213-
expected: intstr.FromString(shared_constants.HealthCheckPortTrafficPort),
1213+
name: "nil props",
1214+
isServiceExternalTrafficPolicyTypeLocal: false,
1215+
expected: intstr.FromString(shared_constants.HealthCheckPortTrafficPort),
12141216
},
12151217
{
1216-
name: "nil hc props",
1217-
targetGroupProps: &elbv2gw.TargetGroupProps{},
1218-
expected: intstr.FromString(shared_constants.HealthCheckPortTrafficPort),
1218+
name: "nil hc props",
1219+
isServiceExternalTrafficPolicyTypeLocal: false,
1220+
targetGroupProps: &elbv2gw.TargetGroupProps{},
1221+
expected: intstr.FromString(shared_constants.HealthCheckPortTrafficPort),
12191222
},
12201223
{
1221-
name: "nil hc port",
1224+
name: "nil hc port",
1225+
isServiceExternalTrafficPolicyTypeLocal: false,
12221226
targetGroupProps: &elbv2gw.TargetGroupProps{
12231227
HealthCheckConfig: &elbv2gw.HealthCheckConfiguration{},
12241228
},
12251229
expected: intstr.FromString(shared_constants.HealthCheckPortTrafficPort),
12261230
},
12271231
{
1228-
name: "explicit is use traffic port hc port",
1232+
name: "explicit is use traffic port hc port",
1233+
isServiceExternalTrafficPolicyTypeLocal: false,
12291234
targetGroupProps: &elbv2gw.TargetGroupProps{
12301235
HealthCheckConfig: &elbv2gw.HealthCheckConfiguration{
12311236
HealthCheckPort: awssdk.String(shared_constants.HealthCheckPortTrafficPort),
@@ -1234,7 +1239,8 @@ func Test_buildTargetGroupHealthCheckPort(t *testing.T) {
12341239
expected: intstr.FromString(shared_constants.HealthCheckPortTrafficPort),
12351240
},
12361241
{
1237-
name: "explicit port",
1242+
name: "explicit port",
1243+
isServiceExternalTrafficPolicyTypeLocal: false,
12381244
targetGroupProps: &elbv2gw.TargetGroupProps{
12391245
HealthCheckConfig: &elbv2gw.HealthCheckConfiguration{
12401246
HealthCheckPort: awssdk.String("80"),
@@ -1243,7 +1249,8 @@ func Test_buildTargetGroupHealthCheckPort(t *testing.T) {
12431249
expected: intstr.FromInt32(80),
12441250
},
12451251
{
1246-
name: "resolve str port",
1252+
name: "resolve str port",
1253+
isServiceExternalTrafficPolicyTypeLocal: false,
12471254
svc: &corev1.Service{
12481255
Spec: corev1.ServiceSpec{
12491256
Ports: []corev1.ServicePort{
@@ -1262,8 +1269,9 @@ func Test_buildTargetGroupHealthCheckPort(t *testing.T) {
12621269
expected: intstr.FromInt32(80),
12631270
},
12641271
{
1265-
name: "resolve str port - instance",
1266-
targetType: elbv2model.TargetTypeInstance,
1272+
name: "resolve str port - instance",
1273+
isServiceExternalTrafficPolicyTypeLocal: false,
1274+
targetType: elbv2model.TargetTypeInstance,
12671275
svc: &corev1.Service{
12681276
Spec: corev1.ServiceSpec{
12691277
Ports: []corev1.ServicePort{
@@ -1283,7 +1291,8 @@ func Test_buildTargetGroupHealthCheckPort(t *testing.T) {
12831291
expected: intstr.FromInt32(1000),
12841292
},
12851293
{
1286-
name: "resolve str port - resolves to other str port (error)",
1294+
name: "resolve str port - resolves to other str port (error)",
1295+
isServiceExternalTrafficPolicyTypeLocal: false,
12871296
svc: &corev1.Service{
12881297
Spec: corev1.ServiceSpec{
12891298
Ports: []corev1.ServicePort{
@@ -1303,8 +1312,9 @@ func Test_buildTargetGroupHealthCheckPort(t *testing.T) {
13031312
expectErr: true,
13041313
},
13051314
{
1306-
name: "resolve str port - resolves to other str port but instance mode",
1307-
targetType: elbv2model.TargetTypeInstance,
1315+
name: "resolve str port - resolves to other str port but instance mode",
1316+
isServiceExternalTrafficPolicyTypeLocal: false,
1317+
targetType: elbv2model.TargetTypeInstance,
13081318
svc: &corev1.Service{
13091319
Spec: corev1.ServiceSpec{
13101320
Ports: []corev1.ServicePort{
@@ -1324,8 +1334,9 @@ func Test_buildTargetGroupHealthCheckPort(t *testing.T) {
13241334
expected: intstr.FromInt32(1000),
13251335
},
13261336
{
1327-
name: "resolve str port - cant find configured port",
1328-
targetType: elbv2model.TargetTypeInstance,
1337+
name: "resolve str port - cant find configured port",
1338+
isServiceExternalTrafficPolicyTypeLocal: false,
1339+
targetType: elbv2model.TargetTypeInstance,
13291340
svc: &corev1.Service{
13301341
Spec: corev1.ServiceSpec{
13311342
Ports: []corev1.ServicePort{
@@ -1344,12 +1355,23 @@ func Test_buildTargetGroupHealthCheckPort(t *testing.T) {
13441355
},
13451356
expectErr: true,
13461357
},
1358+
{
1359+
name: "with ExternalTrafficPolicyTypeLocal and HealthCheckNodePort specified",
1360+
isServiceExternalTrafficPolicyTypeLocal: true,
1361+
svc: &corev1.Service{
1362+
Spec: corev1.ServiceSpec{
1363+
HealthCheckNodePort: 32000,
1364+
ExternalTrafficPolicy: corev1.ServiceExternalTrafficPolicyTypeLocal,
1365+
},
1366+
},
1367+
expected: intstr.FromInt32(32000),
1368+
},
13471369
}
13481370

13491371
for _, tc := range testCases {
13501372
t.Run(tc.name, func(t *testing.T) {
13511373
builder := targetGroupBuilderImpl{}
1352-
res, err := builder.buildTargetGroupHealthCheckPort(tc.targetGroupProps, tc.targetType, tc.svc)
1374+
res, err := builder.buildTargetGroupHealthCheckPort(tc.targetGroupProps, tc.targetType, tc.svc, tc.isServiceExternalTrafficPolicyTypeLocal)
13531375
if tc.expectErr {
13541376
assert.Error(t, err, res)
13551377
return
@@ -1421,7 +1443,7 @@ func Test_buildTargetGroupHealthCheckProtocol(t *testing.T) {
14211443
loadBalancerType: tc.lbType,
14221444
}
14231445

1424-
res := builder.buildTargetGroupHealthCheckProtocol(tc.targetGroupProps, tc.tgProtocol)
1446+
res := builder.buildTargetGroupHealthCheckProtocol(tc.targetGroupProps, tc.tgProtocol, false)
14251447
assert.Equal(t, tc.expected, res)
14261448
})
14271449
}
@@ -1470,7 +1492,7 @@ func Test_buildTargetGroupHealthCheckPath(t *testing.T) {
14701492
defaultHealthCheckPathGRPC: grpcDefaultPath,
14711493
}
14721494

1473-
res := builder.buildTargetGroupHealthCheckPath(tc.targetGroupProps, tc.tgProtocolVersion, tc.hcProtocol)
1495+
res := builder.buildTargetGroupHealthCheckPath(tc.targetGroupProps, tc.tgProtocolVersion, tc.hcProtocol, false)
14741496
assert.Equal(t, tc.expected, res)
14751497
})
14761498
}
@@ -1575,10 +1597,10 @@ func Test_basicHealthCheckParams(t *testing.T) {
15751597
}
15761598

15771599
for _, prop := range defaultProps {
1578-
assert.Equal(t, int32(1), builder.buildTargetGroupHealthCheckIntervalSeconds(prop))
1579-
assert.Equal(t, int32(2), builder.buildTargetGroupHealthCheckTimeoutSeconds(prop))
1580-
assert.Equal(t, int32(3), builder.buildTargetGroupHealthCheckHealthyThresholdCount(prop))
1581-
assert.Equal(t, int32(4), builder.buildTargetGroupHealthCheckUnhealthyThresholdCount(prop))
1600+
assert.Equal(t, int32(1), builder.buildTargetGroupHealthCheckIntervalSeconds(prop, false))
1601+
assert.Equal(t, int32(2), builder.buildTargetGroupHealthCheckTimeoutSeconds(prop, false))
1602+
assert.Equal(t, int32(3), builder.buildTargetGroupHealthCheckHealthyThresholdCount(prop, false))
1603+
assert.Equal(t, int32(4), builder.buildTargetGroupHealthCheckUnhealthyThresholdCount(prop, false))
15821604
}
15831605

15841606
filledInProps := &elbv2gw.TargetGroupProps{
@@ -1593,10 +1615,10 @@ func Test_basicHealthCheckParams(t *testing.T) {
15931615
Matcher: nil,
15941616
}}
15951617

1596-
assert.Equal(t, int32(10), builder.buildTargetGroupHealthCheckIntervalSeconds(filledInProps))
1597-
assert.Equal(t, int32(20), builder.buildTargetGroupHealthCheckTimeoutSeconds(filledInProps))
1598-
assert.Equal(t, int32(30), builder.buildTargetGroupHealthCheckHealthyThresholdCount(filledInProps))
1599-
assert.Equal(t, int32(40), builder.buildTargetGroupHealthCheckUnhealthyThresholdCount(filledInProps))
1618+
assert.Equal(t, int32(10), builder.buildTargetGroupHealthCheckIntervalSeconds(filledInProps, false))
1619+
assert.Equal(t, int32(20), builder.buildTargetGroupHealthCheckTimeoutSeconds(filledInProps, false))
1620+
assert.Equal(t, int32(30), builder.buildTargetGroupHealthCheckHealthyThresholdCount(filledInProps, false))
1621+
assert.Equal(t, int32(40), builder.buildTargetGroupHealthCheckUnhealthyThresholdCount(filledInProps, false))
16001622
}
16011623

16021624
func Test_targetGroupAttributes(t *testing.T) {

0 commit comments

Comments
 (0)